Modify

Opened 10 months ago

Closed 9 months ago

Last modified 3 months ago

#12748 closed Bugs (fixed)

Boost.Test defines a variable called VERSION

Reported by: Benoit Sigoure <tsunanet@…> Owned by: Raffi Enficiaud
Milestone: Boost 1.64.0 Component: test
Version: Boost 1.63.0 Severity: Problem
Keywords: Cc:

Description

In commit 86bcffe Boost.Test was changed to define a variable called VERSION. This collides with a #define VERSION usually defined by the GNU Autotools.

My workaround at this point is to #undef VERSION before #includeing Boost.Test but that's not tractable (I'm not gonna chase down every single use of Boost.Test in our large codebase).

Attachments (0)

Change History (6)

comment:1 Changed 10 months ago by Adam Majer <amajer@…>

This is a pretty nasty regression.

Generally, it is a terrible idea to use ALL CAPITAL as variable names. These are reserved, by convention, to be used as #defines.

comment:2 Changed 10 months ago by anonymous

Milestone: To Be DeterminedBoost 1.64.0

Fixed in origin/topic/12748-VERSION-macro-clashes.

comment:3 Changed 10 months ago by Raffi Enficiaud

Owner: changed from Gennadiy Rozental to Raffi Enficiaud

comment:4 Changed 9 months ago by Raffi Enficiaud

Resolution: fixed
Status: newclosed

Merged to master, rev a2b73f5d7568e69162dfac213fab87eea0021ec5

comment:5 Changed 4 months ago by anonymous

Are those variables part of the public API of Boost.Test?

My concern is whether backporting the patch to Fedora's boost-1.63.0 would cause an API incompatibility between Fedora's package and the official Boost 1.63.0 release.

comment:6 Changed 3 months ago by anonymous

Also, why are those variables non-const?!

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Raffi Enficiaud.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.