[Bug c++/51786] [c++0x] Invalid declaration with decltype accepted

paolo.carlini at oracle dot com gcc-bugzilla@gcc.gnu.org
Tue Oct 16 10:49:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51786

--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-10-16 10:49:22 UTC ---
The problem is that by the time at the end of cp_parser_simple_declaration we
call check_tag_decl (via shadow_tag), which is supposed to check that the
simple declaration is valid, we already called finish_decltype_type thus it
doesn't see the decltype, it sees something like:

void foo() { struct A; }

a valid simple declaration.



More information about the Gcc-bugs mailing list