http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21120
Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|gcc-bugs at gcc dot gnu.org |jason at gcc dot gnu.org --- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-01-03 10:24:07 UTC --- I think the reason we are not erroring out is that, eg the first snippet, is parsed like: struct A {}; void foo() { struct A; } which is fine (and my guess is consistent with the int case). In any case, typeof is a very old extension (now obsoleted by decltype in C++) and we have been accepting the syntax for such a long time, I don't think we really want to "fix" this anyway. Closing?