[Bug c++/79326] New: mistakenly rejects valid C++ code on x86_64-linux-gnu

su at cs dot ucdavis.edu gcc-bugzilla@gcc.gnu.org
Wed Feb 1 16:25:00 GMT 2017


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

            Bug ID: 79326
           Summary: mistakenly rejects valid C++ code on x86_64-linux-gnu
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

It seems to affect at least all versions 4.6.x and later. 

$ g++-trunk -v
Using built-in specs.
COLLECT_GCC=g++-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/7.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/usr/local/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 7.0.1 20170201 (experimental) [trunk revision 245083] (GCC) 
$ 
$ clang++ -c small.cpp
$ icc -c small.cpp
$ 
$ g++-trunk -c small.cpp
small.cpp:2:24: error: type of ‘foo<int>’ is unknown
 __typeof__ (foo < int >) bar;
                        ^
$ 


------------------------------------


template < typename T > T foo (T); 
__typeof__ (foo < int >) bar;


More information about the Gcc-bugs mailing list