This is the mail archive of the gcc-prs@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]

c++/9229: [3.4 regression] [New parser] ICE on illegal number of template parameters


>Number:         9229
>Category:       c++
>Synopsis:       [3.4 regression] [New parser]  ICE on illegal number of template parameters
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          ice-on-illegal-code
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 08 08:06:02 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     bangerth@ticam.utexas.edu
>Release:        unknown-1.0
>Organization:
>Environment:
3.4 after the new parser merge
>Description:
This illegal code now provokes an ICE:
------------------------------
template <class T> class O {
    struct I;
    
    template <class T_>
    friend typename O<T_,void>::I f ();
};
template class O<int>;
-------------------------------

With 3.3 I got:
deal.II/base> /home/bangerth/bin/gcc-3.3-pre/bin/c++ -c c.cc
c.cc:5: error: wrong number of template arguments (2, should be 1)
c.cc:1: error: provided for `template<class T> class O'
c.cc:5: error: `I' is not a class or namespace
c.cc:5: error: ISO C++ forbids declaration of `f' with no type


While 3.4 now adds another ICE:
deal.II/base> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c c.cc
c.cc:5: error: wrong number of template arguments (2, should be 1)
c.cc:1: error: provided for `template<class T> class O'
c.cc:5: internal compiler error: tree check: expected class 't', have 'x' (
   error_mark) in make_typename_type, at cp/decl.c:5692
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

Since a proper message is given before, this is of low
priority.

W.
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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