Ticket #6412 (closed Bugs: fixed)

Opened 5 years ago

Last modified 5 years ago

Use attribute names with underscores for GCC

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


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


boost-interprocess.patch (887 bytes) - added by Petr Machata <pmachata@…> 5 years ago.

Change History

Changed 5 years ago by Petr Machata <pmachata@…>

comment:1 Changed 5 years ago by igaztanaga

Why is the underscore version preferred? I can see no clue in GCC documentation and it might affect other compilers that support GCC syntax.

comment:2 Changed 5 years ago by Petr Machata <pmachata@…>

Because #defining noinline in user code is legitimate, but #defining noinline is not, because such names are reserved. So it should be less likely that attributes with underscores interact with user code.

The documentation curiously doesn't mention this. But it's used by system headers as well as boost in a couple places. I tried it as far back as 3.3 (the oldest that I have around), and it seems well supported.

comment:3 Changed 5 years ago by igaztanaga

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in trunka and release branches.


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

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

Note: See TracTickets for help on using tickets.