public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13558] New: ICE (illegal code) at cp/friend.c:200
@ 2004-01-03 21:12 pommier at gmm dot insa-tlse dot fr
2004-01-03 21:36 ` [Bug c++/13558] [3.4 Regression] " pinskia at gcc dot gnu dot org
` (15 more replies)
0 siblings, 16 replies; 17+ messages in thread
From: pommier at gmm dot insa-tlse dot fr @ 2004-01-03 21:12 UTC (permalink / raw)
To: gcc-bugs
the following code snippet:
class bar { friend class int; };
crashes g++ (GCC) 3.4.0 20031231:
foo.C:1: error: expected identifier
foo.C:1: internal compiler error: tree check: expected class 't', have 'd'
(type_decl) in make_friend_class, at cp/friend.c:200
I don't know if it is related to #3761 or not, so I submit it as a new bug report.
--
Summary: ICE (illegal code) at cp/friend.c:200
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pommier at gmm dot insa-tlse dot fr
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=13558
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/13558] [3.4 Regression] ICE (illegal code) at cp/friend.c:200
2004-01-03 21:12 [Bug c++/13558] New: ICE (illegal code) at cp/friend.c:200 pommier at gmm dot insa-tlse dot fr
@ 2004-01-03 21:36 ` pinskia at gcc dot gnu dot org
2004-01-03 22:11 ` pinskia at gcc dot gnu dot org
` (14 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-03 21:36 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-01-03 21:36 -------
>From Phil's regression hunter: Search converges between 2002-12-27-trunk (#177) and 2002-12
-28-trunk (#178).
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2004-01-03 21:36:51
date| |
Summary|ICE (illegal code) at |[3.4 Regression] ICE
|cp/friend.c:200 |(illegal code) at
| |cp/friend.c:200
Target Milestone|--- |3.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13558
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/13558] [3.4 Regression] ICE (illegal code) at cp/friend.c:200
2004-01-03 21:12 [Bug c++/13558] New: ICE (illegal code) at cp/friend.c:200 pommier at gmm dot insa-tlse dot fr
2004-01-03 21:36 ` [Bug c++/13558] [3.4 Regression] " pinskia at gcc dot gnu dot org
@ 2004-01-03 22:11 ` pinskia at gcc dot gnu dot org
2004-01-04 4:36 ` pinskia at gcc dot gnu dot org
` (13 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-03 22:11 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-01-03 22:11 -------
The new parser came in on that date.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13558
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/13558] [3.4 Regression] ICE (illegal code) at cp/friend.c:200
2004-01-03 21:12 [Bug c++/13558] New: ICE (illegal code) at cp/friend.c:200 pommier at gmm dot insa-tlse dot fr
2004-01-03 21:36 ` [Bug c++/13558] [3.4 Regression] " pinskia at gcc dot gnu dot org
2004-01-03 22:11 ` pinskia at gcc dot gnu dot org
@ 2004-01-04 4:36 ` pinskia at gcc dot gnu dot org
2004-01-04 4:37 ` pinskia at gcc dot gnu dot org
` (12 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-04 4:36 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-01-04 04:36 -------
This is not error recovery because the error message is even a regression, I think I have
a fix for this.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13558
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/13558] [3.4 Regression] ICE (illegal code) at cp/friend.c:200
2004-01-03 21:12 [Bug c++/13558] New: ICE (illegal code) at cp/friend.c:200 pommier at gmm dot insa-tlse dot fr
` (2 preceding siblings ...)
2004-01-04 4:36 ` pinskia at gcc dot gnu dot org
@ 2004-01-04 4:37 ` pinskia at gcc dot gnu dot org
2004-01-04 7:13 ` pinskia at gcc dot gnu dot org
` (11 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-04 4:37 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-01-04 04:37 -------
Created an attachment (id=5406)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5406&action=view)
Patch which fixes this
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13558
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/13558] [3.4 Regression] ICE (illegal code) at cp/friend.c:200
2004-01-03 21:12 [Bug c++/13558] New: ICE (illegal code) at cp/friend.c:200 pommier at gmm dot insa-tlse dot fr
` (3 preceding siblings ...)
2004-01-04 4:37 ` pinskia at gcc dot gnu dot org
@ 2004-01-04 7:13 ` pinskia at gcc dot gnu dot org
2004-01-04 8:02 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-04 7:13 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-01-04 07:13 -------
Note also this testcase ICE in the same place and the patch fixes it also:
class bar { friend int; };
The error messages after for the testcase here:
pr13558.cc:1: error: a class-key must be used when declaring a friend
pr13558.cc:1: error: invalid type `int' declared `friend'
For the one in comment #0:
pr13558.cc:1: error: expected identifier
pr13558.cc:1: error: invalid type `int' declared `friend'
I think this is okay error messages and better than what 3.3 gave:
above:
accepted it but warned:
pr13558.cc:1: warning: friend declaration requires class-key, i.e. `friend int'
one in comment #0:
pr13558.cc:1: error: expected identifier
pr13558.cc:1: error: invalid type `int' declared `friend'
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13558
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/13558] [3.4 Regression] ICE (illegal code) at cp/friend.c:200
2004-01-03 21:12 [Bug c++/13558] New: ICE (illegal code) at cp/friend.c:200 pommier at gmm dot insa-tlse dot fr
` (4 preceding siblings ...)
2004-01-04 7:13 ` pinskia at gcc dot gnu dot org
@ 2004-01-04 8:02 ` pinskia at gcc dot gnu dot org
2004-01-04 15:01 ` pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-04 8:02 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-01-04 08:02 -------
one more thing this does not ICE with checking disabled.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-checking
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13558
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/13558] [3.4 Regression] ICE (illegal code) at cp/friend.c:200
2004-01-03 21:12 [Bug c++/13558] New: ICE (illegal code) at cp/friend.c:200 pommier at gmm dot insa-tlse dot fr
` (5 preceding siblings ...)
2004-01-04 8:02 ` pinskia at gcc dot gnu dot org
@ 2004-01-04 15:01 ` pinskia at gcc dot gnu dot org
2004-01-04 16:54 ` gdr at integrable-solutions dot net
` (8 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-04 15:01 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-01-04 15:01 -------
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-01/msg00160.html>.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13558
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/13558] [3.4 Regression] ICE (illegal code) at cp/friend.c:200
2004-01-03 21:12 [Bug c++/13558] New: ICE (illegal code) at cp/friend.c:200 pommier at gmm dot insa-tlse dot fr
` (6 preceding siblings ...)
2004-01-04 15:01 ` pinskia at gcc dot gnu dot org
@ 2004-01-04 16:54 ` gdr at integrable-solutions dot net
2004-01-05 4:19 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: gdr at integrable-solutions dot net @ 2004-01-04 16:54 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From gdr at integrable-solutions dot net 2004-01-04 16:54 -------
Subject: Re: [3.4 Regression] ICE (illegal code) at cp/friend.c:200
"pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| Note also this testcase ICE in the same place and the patch fixes it also:
| class bar { friend int; };
|
| The error messages after for the testcase here:
| pr13558.cc:1: error: a class-key must be used when declaring a friend
I don't like this new diagnostic because it is misleading.
We've got a DR resolution that allows things like
friend typename T::X;
It would be interesting to read the paper in the pre-Kona2003 mailing
by Mike Miller on these issues.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13558
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/13558] [3.4 Regression] ICE (illegal code) at cp/friend.c:200
2004-01-03 21:12 [Bug c++/13558] New: ICE (illegal code) at cp/friend.c:200 pommier at gmm dot insa-tlse dot fr
` (7 preceding siblings ...)
2004-01-04 16:54 ` gdr at integrable-solutions dot net
@ 2004-01-05 4:19 ` pinskia at gcc dot gnu dot org
2004-01-09 4:44 ` giovannibajo at libero dot it
` (6 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-05 4:19 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-01-05 04:19 -------
I am not taking responsable to change the error message and I am not going to move it to the
parser also, so I am not working on this any more.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|pinskia at gcc dot gnu dot |unassigned at gcc dot gnu
|org |dot org
Status|ASSIGNED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13558
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/13558] [3.4 Regression] ICE (illegal code) at cp/friend.c:200
2004-01-03 21:12 [Bug c++/13558] New: ICE (illegal code) at cp/friend.c:200 pommier at gmm dot insa-tlse dot fr
` (8 preceding siblings ...)
2004-01-05 4:19 ` pinskia at gcc dot gnu dot org
@ 2004-01-09 4:44 ` giovannibajo at libero dot it
2004-01-09 14:11 ` gdr at integrable-solutions dot net
` (5 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: giovannibajo at libero dot it @ 2004-01-09 4:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From giovannibajo at libero dot it 2004-01-09 04:44 -------
Gaby,
which DR are you referring to? There is an old DR (360 IIRC) which says that we
don't need typename in elaborated type specifiers, thus allowing:
friend class T::X;
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |giovannibajo at libero dot
| |it, gdr at integrable-
| |solutions dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13558
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/13558] [3.4 Regression] ICE (illegal code) at cp/friend.c:200
2004-01-03 21:12 [Bug c++/13558] New: ICE (illegal code) at cp/friend.c:200 pommier at gmm dot insa-tlse dot fr
` (9 preceding siblings ...)
2004-01-09 4:44 ` giovannibajo at libero dot it
@ 2004-01-09 14:11 ` gdr at integrable-solutions dot net
2004-01-10 2:24 ` gdr at integrable-solutions dot net
` (4 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: gdr at integrable-solutions dot net @ 2004-01-09 14:11 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From gdr at integrable-solutions dot net 2004-01-09 14:11 -------
Subject: Re: [3.4 Regression] ICE (illegal code) at cp/friend.c:200
"giovannibajo at libero dot it" <gcc-bugzilla@gcc.gnu.org> writes:
| Gaby,
|
| which DR are you referring to? There is an old DR (360 IIRC) which says that we
| don't need typename in elaborated type specifiers, thus allowing:
|
| friend class T::X;
I don't have the exact number. But in the pre-Kona2003 mailing, there
is a paper by Mike Miller on this issue, which was discussed by both
the Evolution Group and the Core Group; Core adopted a slightly
different version of the resolution adopted by Evolution. But the
point of the resolution is to allow friend typename T::X.
If you allow friend class T::X and X turns out to be a union, you
get another trouble because every class shall be declared with the
consistent class-key. The resolution went further to allow
friend T;
where T is a template parameter.
(My laptop was stolen yesterday and I don't have reference here me,
but the document must be on the WG21 website)
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13558
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/13558] [3.4 Regression] ICE (illegal code) at cp/friend.c:200
2004-01-03 21:12 [Bug c++/13558] New: ICE (illegal code) at cp/friend.c:200 pommier at gmm dot insa-tlse dot fr
` (10 preceding siblings ...)
2004-01-09 14:11 ` gdr at integrable-solutions dot net
@ 2004-01-10 2:24 ` gdr at integrable-solutions dot net
2004-01-10 10:53 ` giovannibajo at libero dot it
` (3 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: gdr at integrable-solutions dot net @ 2004-01-10 2:24 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From gdr at integrable-solutions dot net 2004-01-10 02:24 -------
Subject: Re: [3.4 Regression] ICE (illegal code) at cp/friend.c:200
"giovannibajo at libero dot it" <gcc-bugzilla@gcc.gnu.org> writes:
| Gaby,
|
| which DR are you referring to? There is an old DR (360 IIRC) which says that we
| don't need typename in elaborated type specifiers, thus allowing:
|
| friend class T::X;
see
http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1520.pdf
that paper was discussed by both EWG and CWG. The executive summary
is that
friend T;
is allowed -- there are some few restrictions on T, but the class-key
"class" is no longer required.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13558
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/13558] [3.4 Regression] ICE (illegal code) at cp/friend.c:200
2004-01-03 21:12 [Bug c++/13558] New: ICE (illegal code) at cp/friend.c:200 pommier at gmm dot insa-tlse dot fr
` (11 preceding siblings ...)
2004-01-10 2:24 ` gdr at integrable-solutions dot net
@ 2004-01-10 10:53 ` giovannibajo at libero dot it
2004-01-13 0:44 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: giovannibajo at libero dot it @ 2004-01-10 10:53 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From giovannibajo at libero dot it 2004-01-10 10:53 -------
Subject: Re: [3.4 Regression] ICE (illegal code) at cp/friend.c:200
gdr at integrable-solutions dot net wrote:
> http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1520.pdf
Thanks, it's really interesting.
Giovanni Bajo
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13558
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/13558] [3.4 Regression] ICE (illegal code) at cp/friend.c:200
2004-01-03 21:12 [Bug c++/13558] New: ICE (illegal code) at cp/friend.c:200 pommier at gmm dot insa-tlse dot fr
` (12 preceding siblings ...)
2004-01-10 10:53 ` giovannibajo at libero dot it
@ 2004-01-13 0:44 ` cvs-commit at gcc dot gnu dot org
2004-01-13 1:03 ` steven at gcc dot gnu dot org
2004-01-13 1:22 ` gdr at integrable-solutions dot net
15 siblings, 0 replies; 17+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-01-13 0:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-01-13 00:44 -------
Subject: Bug 13558
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: steven@gcc.gnu.org 2004-01-13 00:44:51
Modified files:
gcc/cp : parser.c ChangeLog
Log message:
PR c++/13558
* parser.c (cp_parser_member_declaration): Any non-type is also
not a class or a function.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.151&r2=1.152
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3873&r2=1.3874
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13558
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/13558] [3.4 Regression] ICE (illegal code) at cp/friend.c:200
2004-01-03 21:12 [Bug c++/13558] New: ICE (illegal code) at cp/friend.c:200 pommier at gmm dot insa-tlse dot fr
` (13 preceding siblings ...)
2004-01-13 0:44 ` cvs-commit at gcc dot gnu dot org
@ 2004-01-13 1:03 ` steven at gcc dot gnu dot org
2004-01-13 1:22 ` gdr at integrable-solutions dot net
15 siblings, 0 replies; 17+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-01-13 1:03 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steven at gcc dot gnu dot org 2004-01-13 01:03 -------
Whooo-hoooooo!
Gaby, Giovanni, perhaps your discussion on the first diagnostic deserves its
own PR?
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13558
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/13558] [3.4 Regression] ICE (illegal code) at cp/friend.c:200
2004-01-03 21:12 [Bug c++/13558] New: ICE (illegal code) at cp/friend.c:200 pommier at gmm dot insa-tlse dot fr
` (14 preceding siblings ...)
2004-01-13 1:03 ` steven at gcc dot gnu dot org
@ 2004-01-13 1:22 ` gdr at integrable-solutions dot net
15 siblings, 0 replies; 17+ messages in thread
From: gdr at integrable-solutions dot net @ 2004-01-13 1:22 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From gdr at integrable-solutions dot net 2004-01-13 01:22 -------
Subject: Re: [3.4 Regression] ICE (illegal code) at cp/friend.c:200
"steven at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| Gaby, Giovanni, perhaps your discussion on the first diagnostic deserves its
| own PR?
Most probably, my objection still holds.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13558
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2004-01-13 1:22 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-03 21:12 [Bug c++/13558] New: ICE (illegal code) at cp/friend.c:200 pommier at gmm dot insa-tlse dot fr
2004-01-03 21:36 ` [Bug c++/13558] [3.4 Regression] " pinskia at gcc dot gnu dot org
2004-01-03 22:11 ` pinskia at gcc dot gnu dot org
2004-01-04 4:36 ` pinskia at gcc dot gnu dot org
2004-01-04 4:37 ` pinskia at gcc dot gnu dot org
2004-01-04 7:13 ` pinskia at gcc dot gnu dot org
2004-01-04 8:02 ` pinskia at gcc dot gnu dot org
2004-01-04 15:01 ` pinskia at gcc dot gnu dot org
2004-01-04 16:54 ` gdr at integrable-solutions dot net
2004-01-05 4:19 ` pinskia at gcc dot gnu dot org
2004-01-09 4:44 ` giovannibajo at libero dot it
2004-01-09 14:11 ` gdr at integrable-solutions dot net
2004-01-10 2:24 ` gdr at integrable-solutions dot net
2004-01-10 10:53 ` giovannibajo at libero dot it
2004-01-13 0:44 ` cvs-commit at gcc dot gnu dot org
2004-01-13 1:03 ` steven at gcc dot gnu dot org
2004-01-13 1:22 ` gdr at integrable-solutions dot net
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).