[Bug c/88525] gcc thinks that C11 program does not declare anything but it does.
joseph at codesourcery dot com
gcc-bugzilla@gcc.gnu.org
Mon Dec 17 23:04:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88525
--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
I'd say the enum member a is declared by a contained struct-declaration,
not by the declaration itself.
The case of reading the text to allow for a declarator inside a
struct-declaration was addressed in response to C90 DR#115 by adding (in
C99) the "(other than the parameters of a function or the members of a
structure or union)" now present after "declarator". I expect it simply
wasn't noticed at the time that much the same issue would apply to tags,
and enum members, declared inside of a structure or union. I think the
intent stated in that DR response applies here as well: "In the case of an
aggregate, the intent was to require a tag or declarator for the aggregate
itself.".
More information about the Gcc-bugs
mailing list