Opened 11 years ago

Closed 11 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@…> 11 years ago.

Download all attachments as: .zip

Change History (4)

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

Attachment: boost-interprocess.patch added

comment:1 by Ion Gaztañaga, 11 years ago

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 by Petr Machata <pmachata@…>, 11 years ago

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

Resolution: fixed
Status: newclosed

Fixed in trunka and release branches.

Note: See TracTickets for help on using tickets.