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++/17391] New: [3.3 regression] template parameter accepted on typedef name


The following (invalid) code compiles in 3.3.1 through to 3.3.4 and current 3.3
branch CVS, and appears to construct a foo<double>. It produces the expected
error in the original 3.3 release and in 2.95.4, 3.0.4, 3.2.3 and 3.4.1.

It therefore appears to be a 3.3 branch regression introduced in 3.3.1.


// test case

template< typename T >
struct foo { };

int main(void)
{
  typedef foo<int> bar;

  bar<double> baz; // this line is invalid
}

-- 
           Summary: [3.3 regression] template parameter accepted on typedef
                    name
           Product: gcc
           Version: 3.3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zak at transversal dot com
                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=17391


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