public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/23689] New: Malformed typedef silently ignored
@ 2005-09-01 23:51 simon_baldwin at yahoo dot com
2005-09-02 13:02 ` [Bug c++/23689] " falk at debian dot org
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: simon_baldwin at yahoo dot com @ 2005-09-01 23:51 UTC (permalink / raw)
To: gcc-bugs
Given the program
typedef enum { ZERO }; // error, malformed typedef, missing identifier
typedef struct dummy {}; // ditto
gcc will silently step over and apparently ignore the typedef, treating the
statement as a simple "enum { ZERO };" rather than a "typedef enum { ZERO }
type_name;" where type_name has been accidentally omitted.
Grammatically, perhaps correct. However, a warning or error message here would
be handy.
--
Summary: Malformed typedef silently ignored
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: simon_baldwin at yahoo dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23689
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/23689] Malformed typedef silently ignored
2005-09-01 23:51 [Bug c++/23689] New: Malformed typedef silently ignored simon_baldwin at yahoo dot com
@ 2005-09-02 13:02 ` falk at debian dot org
2005-09-02 13:25 ` Gabriel Dos Reis
2005-09-02 13:25 ` gdr at integrable-solutions dot net
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: falk at debian dot org @ 2005-09-02 13:02 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From falk at debian dot org 2005-09-02 13:02 -------
Works for me with any gcc version:
falk@juist:/tmp% gcc-3.4 -c test.c
test.c:1: warning: useless keyword or type name in empty declaration
test.c:2: warning: useless keyword or type name in empty declaration
What is the exact version you are using and the exact flags you are passing?
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23689
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/23689] Malformed typedef silently ignored
2005-09-01 23:51 [Bug c++/23689] New: Malformed typedef silently ignored simon_baldwin at yahoo dot com
2005-09-02 13:02 ` [Bug c++/23689] " falk at debian dot org
@ 2005-09-02 13:25 ` gdr at integrable-solutions dot net
2005-09-02 19:12 ` simon_baldwin at yahoo dot com
2005-09-02 19:19 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 6+ messages in thread
From: gdr at integrable-solutions dot net @ 2005-09-02 13:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From gdr at integrable-solutions dot net 2005-09-02 13:25 -------
Subject: Re: Malformed typedef silently ignored
"falk at debian dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| Works for me with any gcc version:
|
| falk@juist:/tmp% gcc-3.4 -c test.c
| test.c:1: warning: useless keyword or type name in empty declaration
| test.c:2: warning: useless keyword or type name in empty declaration
|
| What is the exact version you are using and the exact flags you are passing?
The bug was reported against C++; I believe you're testing with a C
compiler, instead of C++.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23689
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Bug c++/23689] Malformed typedef silently ignored
2005-09-02 13:02 ` [Bug c++/23689] " falk at debian dot org
@ 2005-09-02 13:25 ` Gabriel Dos Reis
0 siblings, 0 replies; 6+ messages in thread
From: Gabriel Dos Reis @ 2005-09-02 13:25 UTC (permalink / raw)
To: gcc-bugzilla; +Cc: gcc-bugs
"falk at debian dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| Works for me with any gcc version:
|
| falk@juist:/tmp% gcc-3.4 -c test.c
| test.c:1: warning: useless keyword or type name in empty declaration
| test.c:2: warning: useless keyword or type name in empty declaration
|
| What is the exact version you are using and the exact flags you are passing?
The bug was reported against C++; I believe you're testing with a C
compiler, instead of C++.
-- Gaby
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/23689] Malformed typedef silently ignored
2005-09-01 23:51 [Bug c++/23689] New: Malformed typedef silently ignored simon_baldwin at yahoo dot com
2005-09-02 13:02 ` [Bug c++/23689] " falk at debian dot org
2005-09-02 13:25 ` gdr at integrable-solutions dot net
@ 2005-09-02 19:12 ` simon_baldwin at yahoo dot com
2005-09-02 19:19 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 6+ messages in thread
From: simon_baldwin at yahoo dot com @ 2005-09-02 19:12 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From simon_baldwin at yahoo dot com 2005-09-02 19:12 -------
The problem's restricted to the C++ front end only, and is common across
multiple releases and at the highest warning settings:
$ cat e.cc
typedef enum { ZERO }; // error, malformed typedef, missing identifier
typedef struct dummy {}; // ditto
$ g++-4.1 -Wall -W -pedantic -c e.cc
$ g++-4.0.1-k8 -Wall -W -pedantic -c e.cc
$ g++-3.4.1 -Wall -W -pedantic -c e.cc
$ g++-3.2.2 -Wall -W -pedantic -c e.cc
$ g++-2.95 -Wall -W -pedantic -c e.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23689
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/23689] Malformed typedef silently ignored
2005-09-01 23:51 [Bug c++/23689] New: Malformed typedef silently ignored simon_baldwin at yahoo dot com
` (2 preceding siblings ...)
2005-09-02 19:12 ` simon_baldwin at yahoo dot com
@ 2005-09-02 19:19 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-02 19:19 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-09-02 19:19:17
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23689
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-09-02 19:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-01 23:51 [Bug c++/23689] New: Malformed typedef silently ignored simon_baldwin at yahoo dot com
2005-09-02 13:02 ` [Bug c++/23689] " falk at debian dot org
2005-09-02 13:25 ` Gabriel Dos Reis
2005-09-02 13:25 ` gdr at integrable-solutions dot net
2005-09-02 19:12 ` simon_baldwin at yahoo dot com
2005-09-02 19:19 ` 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).