[Bug c++/56904] New: rejection of legal code in c++11 mode. (maybe namespace lookup problem)

dirk.bonekaemper at dfs dot de gcc-bugzilla@gcc.gnu.org
Wed Apr 10 11:46:00 GMT 2013


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

             Bug #: 56904
           Summary: rejection of legal code in c++11 mode. (maybe
                    namespace lookup problem)
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dirk.bonekaemper@dfs.de


Created attachment 29849
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29849
preprocessed c++ souce for bug report

Problem appears only with -std=c++11.
If I remove the global scope operator from the ::n::S::foo definition, it
compiles.

c++ -v -save-temps -std=c++11 -c gcc-4-8-0-namespace-problem.cc 
Using built-in specs.
COLLECT_GCC=c++
Target: i686-pc-linux-gnu
Configured with: ../../packages/gcc-4.8.0/configure
--prefix=/usr/localdisk/bondi011/gcc-4.8.0 --enable-languages=c,c++
Thread model: posix
gcc version 4.8.0 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++11' '-c' '-shared-libgcc'
'-mtune=generic' '-march=pentiumpro'
 /usr/localdisk/bondi011/gcc-4.8.0/libexec/gcc/i686-pc-linux-gnu/4.8.0/cc1plus
-E -quiet -v -D_GNU_SOURCE gcc-4-8-0-namespace-problem.cc -mtune=generic
-march=pentiumpro -std=c++11 -fpch-preprocess -o gcc-4-8-0-namespace-problem.ii
ignoring nonexistent directory
"/usr/localdisk/bondi011/gcc-4.8.0/lib/gcc/i686-pc-linux-gnu/4.8.0/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:

/usr/localdisk/bondi011/gcc-4.8.0/lib/gcc/i686-pc-linux-gnu/4.8.0/../../../../include/c++/4.8.0

/usr/localdisk/bondi011/gcc-4.8.0/lib/gcc/i686-pc-linux-gnu/4.8.0/../../../../include/c++/4.8.0/i686-pc-linux-gnu

/usr/localdisk/bondi011/gcc-4.8.0/lib/gcc/i686-pc-linux-gnu/4.8.0/../../../../include/c++/4.8.0/backward
 /usr/localdisk/bondi011/gcc-4.8.0/lib/gcc/i686-pc-linux-gnu/4.8.0/include
 /usr/local/include
 /usr/localdisk/bondi011/gcc-4.8.0/include

/usr/localdisk/bondi011/gcc-4.8.0/lib/gcc/i686-pc-linux-gnu/4.8.0/include-fixed
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++11' '-c' '-shared-libgcc'
'-mtune=generic' '-march=pentiumpro'
 /usr/localdisk/bondi011/gcc-4.8.0/libexec/gcc/i686-pc-linux-gnu/4.8.0/cc1plus
-fpreprocessed gcc-4-8-0-namespace-problem.ii -quiet -dumpbase
gcc-4-8-0-namespace-problem.cc -mtune=generic -march=pentiumpro -auxbase
gcc-4-8-0-namespace-problem -std=c++11 -version -o
gcc-4-8-0-namespace-problem.s
GNU C++ (GCC) version 4.8.0 (i686-pc-linux-gnu)
    compiled by GNU C version 4.8.0, GMP version 4.3.2, MPFR version 2.4.2, MPC
version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++ (GCC) version 4.8.0 (i686-pc-linux-gnu)
    compiled by GNU C version 4.8.0, GMP version 4.3.2, MPFR version 2.4.2, MPC
version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 078491655d66ce4db43e7026e58f8fec
gcc-4-8-0-namespace-problem.cc:11:1: error: 'n' in 'enum n::E' does not name a
type
 ::n::E  ::n::S::foo() { return e; }
 ^



More information about the Gcc-bugs mailing list