------- Additional Comments From jozef dot behran at krs dot sk 2005-04-01
19:49 -------
> This is still valid code because the struct could be defined below still.
But if the struct is not defined anywhere (not even below its use), a warning
should
occur. If you send the first declaration to the compiler without sending the
second
one, you should see a warning about an undeclared structure. However if you
send your example to the compiler as you mentioned it, no warnings should
appear. This warning should at least indicate the users that there may be
something wrong with their code and that they should check for typos or so.
Note that the code is valid, but unusual. If you see a structure tag used
somewhere without being declared, most likely it is a bug in the code.
Otherwise
the compiler may give the user very strange error/warning messages that may
confuse him seriously (a structure type seeming not to be compatible with
itself).
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20655