This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/20655] New: Attempt to use undefined structure tag triggers no diagnostic
- From: "jozef dot behran at krs dot sk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Mar 2005 15:33:31 -0000
- Subject: [Bug c/20655] New: Attempt to use undefined structure tag triggers no diagnostic
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
/*** SNIP ***/
/*
Place this file into `bug.c' (the code between the SNIP comments).
Then try `gcc -c -Wall bug.c'
The compiler silently transforms the type of the structure component
below to some kind of a generic pointer or something.
However it should output a diagnostic on the `UndefinedTag' identifier,
especially when -Wall is specified (as you can see above).
It is OK what the compiler does with this code but a warning should be
produced when the user really cares about them.
Without such a warning things often become confusing when someone
changes the tag in the declaration and forgets to update the tag name
in the pointers.
*/
typedef struct tagType {
struct UndefinedTag *Pointer;
} TType;
/*** SNIP ***/
--
Summary: Attempt to use undefined structure tag triggers no
diagnostic
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jozef dot behran at krs dot sk
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=20655