[Bug c++/67256] [C++11] Global scope contaminated with symbols from mathcalls.h

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Aug 18 12:27:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67256

Jonathan Wakely <redi at gcc dot gnu.org> changed:

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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
17.6.1.2 [headers] specifically says:

  It is unspecified whether these names are first declared within the global
  namespace scope and are then injected into namespace std by explicit using-
  declarations.

A conforming implementation can define ::log and ::sin when any standard header
is included, and so your code will never be portable if you reuse those names
for namespaces.



More information about the Gcc-bugs mailing list