Commit ca2507dc by Paolo Carlini Committed by Paolo Carlini

re PR c++/51414 (Broken diagnostic with invalid use of __underlying_type)

/cp
2011-12-05  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/51414
	* semantics.c (finish_underlying_type): Use %qT, not %qE for the
	error message.

/testsuite
2011-12-05  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/51414
	* g++.dg/ext/underlying_type11.C: New.

From-SVN: r182017
parent 6778ae9d
2011-12-05 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51414
* semantics.c (finish_underlying_type): Use %qT, not %qE for the
error message.
2011-12-05 Jason Merrill <jason@redhat.com> 2011-12-05 Jason Merrill <jason@redhat.com>
* init.c (expand_default_init): Unshare args in ctor delegation. * init.c (expand_default_init): Unshare args in ctor delegation.
......
...@@ -3401,7 +3401,7 @@ finish_underlying_type (tree type) ...@@ -3401,7 +3401,7 @@ finish_underlying_type (tree type)
if (TREE_CODE (type) != ENUMERAL_TYPE) if (TREE_CODE (type) != ENUMERAL_TYPE)
{ {
error ("%qE is not an enumeration type", type); error ("%qT is not an enumeration type", type);
return error_mark_node; return error_mark_node;
} }
......
2011-12-05 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51414
* g++.dg/ext/underlying_type11.C: New.
2011-12-05 Uros Bizjak <ubizjak@gmail.com> 2011-12-05 Uros Bizjak <ubizjak@gmail.com>
PR testsuite/51128 PR testsuite/51128
......
// PR c++/51414
__underlying_type(int[1]) i; // { dg-error "int \\\[1\\\]|invalid" }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment