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++/42056] ICE with invalid use of auto in template


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?


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