This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/42056] ICE with invalid use of auto in template
- From: "paolo.carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 26 May 2011 16:15:15 +0000
- Subject: [Bug c++/42056] ICE with invalid use of auto in template
- Auto-submitted: auto-generated
- References: <bug-42056-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42056
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-05-26 16:14:51 UTC ---
To summarize, in current 4.6 and mainline at least, a C++0x warning is emitted
in C++03 mode and then both snippets are simply accepted. Errors are then
produced at instantiation time. Indeed, cp_parser_simple_type_specifier does
just:
case RID_AUTO:
maybe_warn_cpp0x (CPP0X_AUTO);
type = make_auto ();
break;
thus, by design, no chances for hard errors at parsing time. Jason, do we want
to improve this?