aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2011-12-05 18:21:18 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2011-12-05 18:21:18 +0000
commitca2507dca9de619c94a9a38a47c2fb6e727e3229 (patch)
treeaee05ef56b1512b960520d88b0ce3213b80ea7a0
parent6778ae9d4b9cbd7b994b2bae61a26181e79dc809 (diff)
downloadgcc-ca2507dca9de619c94a9a38a47c2fb6e727e3229.zip
gcc-ca2507dca9de619c94a9a38a47c2fb6e727e3229.tar.gz
gcc-ca2507dca9de619c94a9a38a47c2fb6e727e3229.tar.bz2
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
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/semantics.c2
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/ext/underlying_type11.C3
4 files changed, 15 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index fe4696b..ac8e311 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+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>
* init.c (expand_default_init): Unshare args in ctor delegation.
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 3c9853a..cca601d 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -3401,7 +3401,7 @@ finish_underlying_type (tree 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;
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index fac85fe..1886e24 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+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>
PR testsuite/51128
diff --git a/gcc/testsuite/g++.dg/ext/underlying_type11.C b/gcc/testsuite/g++.dg/ext/underlying_type11.C
new file mode 100644
index 0000000..72ee434
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/underlying_type11.C
@@ -0,0 +1,3 @@
+// PR c++/51414
+
+__underlying_type(int[1]) i; // { dg-error "int \\\[1\\\]|invalid" }