[Bug tree-optimization/40222] anon namespace function emitted when all uses inlined

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri May 22 00:32:00 GMT 2009



------- Comment #1 from pinskia at gcc dot gnu dot org  2009-05-22 00:31 -------
The problem is the same as described in PR 36959:

get_global looks like:
namespace
{
  abi::__cxa_eh_globals*
  get_global() throw()
  {
    static __thread abi::__cxa_eh_globals global;
    return &global;
  }
} // anonymous namespace


So we have a static variable inside the function which causes the C++ front-end
to say the function is used.

*** This bug has been marked as a duplicate of 36959 ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40222



More information about the Gcc-bugs mailing list