public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/4707] g++ complains about a "typedef", but no typedefs are there
[not found] <20011026153600.4707.dlux@spam.dlux.hu>
@ 2003-08-24 18:05 ` pinskia at gcc dot gnu dot org
2003-08-24 20:58 ` dlux at spam dot dlux dot hu
` (2 subsequent siblings)
3 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-24 18:05 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=4707
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-08-24 18:05 -------
On the mainline I get this:
pr4707.cc: In member function `void A<T>::foo()':
pr4707.cc:3: error: expected primary-expression
pr4707.cc: At global scope:
pr4707.cc:7: error: extraneous `int' ignored
pr4707.cc:7: error: template declaration of `typedef struct A<T> INT'
Is this fixed as it does not complain about a typedef not is not there any more?
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/4707] g++ complains about a "typedef", but no typedefs are there
[not found] <20011026153600.4707.dlux@spam.dlux.hu>
2003-08-24 18:05 ` [Bug c++/4707] g++ complains about a "typedef", but no typedefs are there pinskia at gcc dot gnu dot org
@ 2003-08-24 20:58 ` dlux at spam dot dlux dot hu
2003-08-25 15:28 ` bangerth at dealii dot org
2003-12-09 16:44 ` dhazeghi at yahoo dot com
3 siblings, 0 replies; 4+ messages in thread
From: dlux at spam dot dlux dot hu @ 2003-08-24 20:58 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=4707
------- Additional Comments From dlux at spam dot dlux dot hu 2003-08-24 20:58 -------
gcc 3.4 snapshots seems to be changed a lot in this area.
The current debian gcc snapshot (2003.08.15) returns with a lot of errors to my
code (http://hacks.dlux.hu/gcc-bug/typedefbug.gz), which I don't really
understand. In fact, this does not contain the original error message, but
contains million others.
I can't really decide if this solved the problem or not.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/4707] g++ complains about a "typedef", but no typedefs are there
[not found] <20011026153600.4707.dlux@spam.dlux.hu>
2003-08-24 18:05 ` [Bug c++/4707] g++ complains about a "typedef", but no typedefs are there pinskia at gcc dot gnu dot org
2003-08-24 20:58 ` dlux at spam dot dlux dot hu
@ 2003-08-25 15:28 ` bangerth at dealii dot org
2003-12-09 16:44 ` dhazeghi at yahoo dot com
3 siblings, 0 replies; 4+ messages in thread
From: bangerth at dealii dot org @ 2003-08-25 15:28 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=4707
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
------- Additional Comments From bangerth at dealii dot org 2003-08-25 15:28 -------
I think the messages are about the best the compiler can do. To explain where they
come from, remember that a typedef can not only have the form
typedef int INT;
but also this abomination:
int typedef INT;
Now, with a structure, this is legal:
struct A { int i; } typedef INT;
The problem comes here: in the reduced testcase, we have a template, not a structure,
which cannot be typedef'd. Furthernore, since the compiler sees the infix-form of the
typedef (rather than the usual prefix form), the only thing that can come after the "typedef"
can be a single name, so that's where the "extraneous `int' ignored" comes from.
Given this strange form of the typedef declaration, I think the compiler can do not better
than what it is presently giving, so I close the report.
W.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/4707] g++ complains about a "typedef", but no typedefs are there
[not found] <20011026153600.4707.dlux@spam.dlux.hu>
` (2 preceding siblings ...)
2003-08-25 15:28 ` bangerth at dealii dot org
@ 2003-12-09 16:44 ` dhazeghi at yahoo dot com
3 siblings, 0 replies; 4+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-12-09 16:44 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |3.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4707
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-12-09 16:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20011026153600.4707.dlux@spam.dlux.hu>
2003-08-24 18:05 ` [Bug c++/4707] g++ complains about a "typedef", but no typedefs are there pinskia at gcc dot gnu dot org
2003-08-24 20:58 ` dlux at spam dot dlux dot hu
2003-08-25 15:28 ` bangerth at dealii dot org
2003-12-09 16:44 ` dhazeghi at yahoo dot com
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).