public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/19253] New: [3.4/4.0 regression] bad error message / ICE for invalid template parameter
@ 2005-01-04 14:31 reichelt at gcc dot gnu dot org
  2005-01-04 15:47 ` [Bug c++/19253] " pinskia at gcc dot gnu dot org
                   ` (12 more replies)
  0 siblings, 13 replies; 23+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-01-04 14:31 UTC (permalink / raw)
  To: gcc-bugs

The following invalid testcase causes an ICE on mainline:

=================================
namespace N {}

template<typename> struct A
{
    A<typename N::X<int> > a;
};
=================================

  bug.cc:5: error: 'X' in namespace 'N' does not name a type
  bug.cc:5: internal compiler error: in make_typename_type, at cp/decl.c:2685
  Please submit a full bug report, [etc.]

Mark, the ICE was introduced by your patch for PR18738:
http://gcc.gnu.org/ml/gcc-cvs/2004-12/msg00592.html

Before we got a regression w.r.t. the error message.
Right before the ICE we had:

  bug.cc:5: error: no class template named `X' in `N'
  bug.cc:5: error: no class template named `X' in `N'
  bug.cc:5: error: missing `>' to terminate the template argument list
  bug.cc:5: error: template argument 1 is invalid
  bug.cc:5: error: no class template named `X' in `N'
  bug.cc:5: error: no class template named `X' in `N'
  bug.cc:5: error: missing `>' to terminate the template argument list
  bug.cc:5: error: template argument 1 is invalid
  bug.cc:5: error: no class template named `X' in `N'
  bug.cc:5: error: no class template named `X' in `N'
  bug.cc:5: error: missing `>' to terminate the template argument list
  bug.cc:5: error: template argument 1 is invalid
  bug.cc:5: error: no class template named `X' in `N'
  bug.cc:5: error: no class template named `X' in `N'
  bug.cc:5: error: missing `>' to terminate the template argument list
  bug.cc:5: error: template argument 1 is invalid
  bug.cc:5: error: `A< <template-parameter-1-1> >' is not a template
  bug.cc:5: error: no class template named `X' in `N'
  bug.cc:5: error: no class template named `X' in `N'
  bug.cc:5: error: expected `(' before '<' token
  bug.cc:5: error: expected primary-expression before "int"
  bug.cc:5: error: expected `>' before "int"
  bug.cc:5: error: missing `>' to terminate the template argument list
  bug.cc:5: error: expected unqualified-id before '>' token

(This is probably a new record, 10 times the same message!)

Alexandre, this was introduced by your patch for PR18757:
http://gcc.gnu.org/ml/gcc-cvs/2004-12/msg00382.html

Before we only had the following error message:

  bug.cc:5: error: 'X' in namespace 'N' does not name a type
  bug.cc:5: error: no class template named 'X' in 'N'
  bug.cc:5: error: missing '>' to terminate the template argument list
  bug.cc:5: error: template argument 1 is invalid
  bug.cc:5: error: expected unqualified-id before '>' token

which is much better.

While the ICE is only present on mainline (because the patch for
PR18738 has not been backported yet) the error message regression
also affects the 3.4 branch.

-- 
           Summary: [3.4/4.0 regression] bad error message / ICE for invalid
                    template parameter
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, error-recovery, diagnostic
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org
                CC: aoliva at gcc dot gnu dot org,gcc-bugs at gcc dot gnu
                    dot org,mmitchel at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 23+ messages in thread
[parent not found: <bug-19253-1771@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2006-01-27 16:31 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-04 14:31 [Bug c++/19253] New: [3.4/4.0 regression] bad error message / ICE for invalid template parameter reichelt at gcc dot gnu dot org
2005-01-04 15:47 ` [Bug c++/19253] " pinskia at gcc dot gnu dot org
2005-01-04 16:45 ` reichelt at gcc dot gnu dot org
2005-01-06 15:36 ` nathan at gcc dot gnu dot org
2005-01-29  2:08 ` cvs-commit at gcc dot gnu dot org
2005-01-29  2:10 ` [Bug c++/19253] [3.4 " mmitchel at gcc dot gnu dot org
2005-02-11 21:41 ` [Bug c++/19253] [3.4/4.0 " reichelt at gcc dot gnu dot org
2005-02-11 21:45 ` reichelt at gcc dot gnu dot org
2005-02-11 22:50 ` bangerth at dealii dot org
2005-02-14 20:21 ` reichelt at gcc dot gnu dot org
2005-05-19 17:48 ` [Bug c++/19253] [3.4/4.0/4.1 " mmitchel at gcc dot gnu dot org
2005-07-22 21:18 ` pinskia at gcc dot gnu dot org
2005-09-06 15:27 ` reichelt at gcc dot gnu dot org
2005-09-27 16:24 ` mmitchel at gcc dot gnu dot org
     [not found] <bug-19253-1771@http.gcc.gnu.org/bugzilla/>
2005-10-31  2:10 ` mmitchel at gcc dot gnu dot org
2005-10-31 16:10 ` bangerth at dealii dot org
2005-11-02 21:34 ` mmitchel at gcc dot gnu dot org
2005-11-02 21:35 ` mmitchel at gcc dot gnu dot org
2005-11-02 21:50 ` mmitchel at gcc dot gnu dot org
2005-11-15 19:14 ` reichelt at gcc dot gnu dot org
2005-11-15 19:19 ` reichelt at gcc dot gnu dot org
2005-11-21 15:56 ` pinskia at gcc dot gnu dot org
2006-01-27 16:31 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).