This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/15392] New: g++: ?parse-error on valid?


Not sure, but it seems to reject valid. 
---------------------------- 
template<typename G> 
class A { 
public: 
    template<typename T> 
    void do_smth() 
    {} 
 
    template<typename T> 
    void xxx() 
    { 
        A::do_smth<T>(); 
    } 
}; 
 
 
void test() 
{ 
    A<int> a; 
 
    a.xxx<double>(); 
} 
----------------------- 
 
[kirr@tugrik tmp]$ g++ -Wall -c template.cpp  
template.cpp: In member function `void A<G>::xxx()': 
template.cpp:11: error: expected primary-expression before '>' token 
template.cpp:11: error: expected primary-expression before ')' token 
 
[kirr@tugrik tmp]$ g++ -v 
Reading specs from 
/usr/local/gcc-3.4.0-nocheck/lib/gcc/i686-pc-linux-gnu/3.4.0/specs 
Configured with: ../gcc-3.4.0/configure --prefix=/usr/local/gcc-3.4.0-nocheck 
--with-gnu-as --with-gnu-ld --enable-threads=posix --with-arch=i686 
--with-tune=pentium4 --enable-__cxa_atexit --enable-languages=c,c++,f77 
--disable-checking --disable-nls 
Thread model: posix 
gcc version 3.4.0

-- 
           Summary: g++: ?parse-error on valid?
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: smelkov at mph1 dot phys dot spbu dot ru
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]