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++/15503] [3.4/3.5 regression] nested template problem


------- Additional Comments From bangerth at dealii dot org  2004-05-17 20:43 -------
I'm sure this is legal, and icc7.1 also accepts it. Here is something 
smaller: 
------------------ 
template <typename> struct O {  
    template <typename> struct I {}; 
}; 
  
template <typename T> 
struct S : O<T>::template I<int> {  
    S() : O<T>::template I<int>() { } ; 
};  
--------------------- 
 
g/x> /home/bangerth/bin/gcc-3.3.4-pre/bin/c++ -c x.cc 
 
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc 
x.cc: In constructor `S<T>::S()': 
x.cc:7: error: expected class-name before "template" 
x.cc:7: error: expected `(' before "template" 
x.cc:7: error: expected `{' before "template" 
 
g/x> /home/bangerth/bin/gcc-3.5-pre/bin/c++ -c x.cc 
x.cc: In constructor `S<T>::S()': 
x.cc:7: error: expected class-name before "template" 
x.cc:7: error: expected `(' before "template" 
x.cc:7: error: expected `{' before "template" 
 
In other words, this is a regression. 
 
W. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
      Known to fail|                            |3.4.0 3.5.0
      Known to work|                            |3.3.4
   Last reconfirmed|0000-00-00 00:00:00         |2004-05-17 20:43:34
               date|                            |
            Summary|nested template problem     |[3.4/3.5 regression] nested
                   |                            |template problem
   Target Milestone|---                         |3.4.1


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


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