public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11862] New: ICE on illegal code, in cp_parser_template_id, at cp/parser.c:7515
@ 2003-08-09  3:59 gccbugs at contacts dot eelis dot net
  2003-08-09  4:09 ` [Bug c++/11862] [3.4 Regression] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: gccbugs at contacts dot eelis dot net @ 2003-08-09  3:59 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: ICE on illegal code, in cp_parser_template_id, at
                    cp/parser.c:7515
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gccbugs at contacts dot eelis dot net
                CC: gcc-bugs at gcc dot gnu dot org

The following single (illegal) line:

template <typename> void x (y); x<

causes an ICE in GCC version 3.4 20030723:

t.cpp:1: error: variable or field `x' declared void
t.cpp:1: error: template declaration of `int x'
t.cpp:1: error: `y' was not declared in this scope
t.cpp:2: internal compiler error: in cp_parser_template_id, at cp/parser.c:7515

GCC version 3.2.3 reports the following errors:

t.cpp:1: variable or field `x' declared void
t.cpp:1: template declaration of `int x'
t.cpp:2: parse error at end of input

and doesn't end with an ICE (btw: those first two aren't very good errors).

(Is this phenomenon of bugs being introduced in newer versions known as
'regression'?)


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/11862] [3.4 Regression] ICE on illegal code, in cp_parser_template_id, at cp/parser.c:7515
  2003-08-09  3:59 [Bug c++/11862] New: ICE on illegal code, in cp_parser_template_id, at cp/parser.c:7515 gccbugs at contacts dot eelis dot net
@ 2003-08-09  4:09 ` pinskia at gcc dot gnu dot org
  2003-08-11 14:54 ` bangerth at dealii dot org
  2003-10-19 13:48 ` lerdsuwa at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-09  4:09 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |diagnostic, ice-on-invalid-
                   |                            |code
   Last reconfirmed|0000-00-00 00:00:00         |2003-08-09 04:09:00
               date|                            |
            Summary|ICE on illegal code, in     |[3.4 Regression] ICE on
                   |cp_parser_template_id, at   |illegal code, in
                   |cp/parser.c:7515            |cp_parser_template_id, at
                   |                            |cp/parser.c:7515


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-08-09 04:08 -------
I can confirm this on the mainline (20030808).
This gets a diagnostic so that the error message will be improved.

Yes the phenomenon of bugs being introduced in newer versions known as a regression.

This was introduced when the new parser was merged into the mainline.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/11862] [3.4 Regression] ICE on illegal code, in cp_parser_template_id, at cp/parser.c:7515
  2003-08-09  3:59 [Bug c++/11862] New: ICE on illegal code, in cp_parser_template_id, at cp/parser.c:7515 gccbugs at contacts dot eelis dot net
  2003-08-09  4:09 ` [Bug c++/11862] [3.4 Regression] " pinskia at gcc dot gnu dot org
@ 2003-08-11 14:54 ` bangerth at dealii dot org
  2003-10-19 13:48 ` lerdsuwa at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: bangerth at dealii dot org @ 2003-08-11 14:54 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From bangerth at dealii dot org  2003-08-11 14:54 -------
While the error message can certainly be improved, the origin is the following (I guess): 
gcc looks at y and realizes that this is not a type. It then thinks that it might be 
a variable, in which case the sequence 
  type name (name) 
  (read: void x (y) ) 
would be the declaration of a variable with a given initializer (think: constructor call). But 
variables of type void are not allowed, which is what the message says). 
 
W.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/11862] [3.4 Regression] ICE on illegal code, in cp_parser_template_id, at cp/parser.c:7515
  2003-08-09  3:59 [Bug c++/11862] New: ICE on illegal code, in cp_parser_template_id, at cp/parser.c:7515 gccbugs at contacts dot eelis dot net
  2003-08-09  4:09 ` [Bug c++/11862] [3.4 Regression] " pinskia at gcc dot gnu dot org
  2003-08-11 14:54 ` bangerth at dealii dot org
@ 2003-10-19 13:48 ` lerdsuwa at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2003-10-19 13:48 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


lerdsuwa at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


------- Additional Comments From lerdsuwa at gcc dot gnu dot org  2003-10-19 13:47 -------
Duplicate of PR10583.  Patch in progress.

*** This bug has been marked as a duplicate of 10583 ***


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-10-19 13:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-09  3:59 [Bug c++/11862] New: ICE on illegal code, in cp_parser_template_id, at cp/parser.c:7515 gccbugs at contacts dot eelis dot net
2003-08-09  4:09 ` [Bug c++/11862] [3.4 Regression] " pinskia at gcc dot gnu dot org
2003-08-11 14:54 ` bangerth at dealii dot org
2003-10-19 13:48 ` lerdsuwa 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).