This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]