Modify

Opened 6 years ago

Closed 6 years ago

#6412 closed Bugs (fixed)

Use attribute names with underscores for GCC

Reported by: Petr Machata <pmachata@…> Owned by: Ion Gaztañaga
Milestone: To Be Determined Component: interprocess
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-interprocess.patch (887 bytes) - added by Petr Machata <pmachata@…> 6 years ago.

Download all attachments as: .zip

Change History (4)

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

Attachment: boost-interprocess.patch added

comment:1 Changed 6 years ago by Ion Gaztañaga

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 6 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 6 years ago by Ion Gaztañaga

Resolution: fixed
Status: newclosed

Fixed in trunka and release branches.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ion Gaztañaga.
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.