Opened 11 years ago

Closed 11 years ago

#6411 closed Bugs (fixed)

Use attribute names with underscores for GCC

Reported by: Petr Machata <pmachata@…> Owned by: John Maddock
Milestone: To Be Determined Component: TR1
Version: Boost 1.48.0 Severity: Problem
Keywords: Cc:

Description

... which should prevent accidental interactions between user-defined macros and boost internals.

Attachments (1)

boost-tr1.patch (591 bytes ) - added by Petr Machata <pmachata@…> 11 years ago.

Download all attachments as: .zip

Change History (5)

by Petr Machata <pmachata@…>, 11 years ago

Attachment: boost-tr1.patch added

comment:1 by anonymous, 11 years ago

Does that work? Note that the documented syntax does not use the extra underscores: http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html. Further if all lower case words like "aligned" are defined as macros, then typically the user will experience far more problems than just this issue?

comment:2 by Petr Machata <pmachata@…>, 11 years ago

Yes, it does. This same page also notes that "you may also specify attributes with `' preceding and following each keyword" which I actually managed to miss twice, otherwise I'd just have linked that page right away. Luckily Michel Morin actually did notice: http://lists.boost.org/Archives/boost/2012/01/189737.php It is documented as far back as 2.95.3.

comment:3 by Petr Machata <pmachata@…>, 11 years ago

Darn, that wiki formatting is killing me. Imagine two underscores between ` and ', and the rest of the sentence not underlined ;)

comment:4 by John Maddock, 11 years ago

Resolution: fixed
Status: newclosed

(In [76773]) Use underscores in attribute names. Fixes #6411.

Note: See TracTickets for help on using tickets.