Hi,

a stupid thinko of mine (consistent with my confusion at the time about expressions vs types ;) : %qT not %qE for types. Tested x86_64-linux.

Thanks,
Paolo.

//////////////////////

/cp
2011-12-05  Paolo Carlini  <paolo.carl...@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.carl...@oracle.com>

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

Index: testsuite/g++.dg/ext/underlying_type11.C
===================================================================
--- testsuite/g++.dg/ext/underlying_type11.C    (revision 0)
+++ testsuite/g++.dg/ext/underlying_type11.C    (revision 0)
@@ -0,0 +1,3 @@
+// PR c++/51414
+
+__underlying_type(int[1]) i; // { dg-error "int \\\[1\\\]|invalid" }
Index: cp/semantics.c
===================================================================
--- cp/semantics.c      (revision 182005)
+++ cp/semantics.c      (working copy)
@@ -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;
     }
 

Reply via email to