Re: [Boost-bugs] [Boost C++ Libraries] #3729: boost.log and 1.41.0 : external linkage error

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3729: boost.log and 1.41.0 : external linkage error
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-01-29 19:19:06


#3729: boost.log and 1.41.0 : external linkage error
-----------------------------------------+----------------------------------
  Reporter: lb <lburgazzoli@…> | Owner: igaztanaga
      Type: Bugs | Status: closed
 Milestone: Boost 1.42.0 | Component: intrusive
   Version: Boost 1.41.0 | Severity: Problem
Resolution: invalid | Keywords:
-----------------------------------------+----------------------------------
Changes (by andysem):

  * status: new => closed
  * resolution: => invalid

Comment:

 From the Boost developers ML:

> The combination of gcc version (gcc 4.2.x), the reported error reason
> (has not external linkage) and the type in the error location
> including names in an anonymous namespace (occurrences of<unnamed>)
> lead me to believe this is the same as a problem I've encountered a
> number of times, most recently yesterday.
>
> The issue seems to be that gcc 4.2 contains (the beginnings of?) an
> optimization to exclude symbols from anonymous namespaces from the set
> of external linker symbols, as a space optimization, and possibly with
> other benefits. Unfortunately, in gcc 4.2 this seems to have been
> somewhat botched because these symbols still need to be treated as
> having external linkage as far as various C++ language features are
> concerned, and that doesn't appear to be done correctly. These
> problems seem to have been addressed in gcc 4.3.
>
> The only workaround I've found for this is to change the relevant
> anonymous namespace to be a named namespace, typically some "detail"
> or "impl" type of namespace since these aren't supposed to be public
> names. I've only encountered this problem with gcc 4.2.x; 4.1 doesn't
> have the (attempt at) the relevant optimization, and this problem
> seems to have been fixed in gcc 4.3.

 -- Kim Barrett

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3729#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:02 UTC