Modify

Ticket #6412 (closed Bugs: fixed)

Opened 2 years ago

Last modified 2 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:

Description

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

Attachments

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

Change History

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

comment:1 Changed 2 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 2 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 2 years ago by igaztanaga

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

Fixed in trunka and release branches.

View

Add a comment

Modify Ticket

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


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

 
Note: See TracTickets for help on using tickets.