re PR c++/35333 (Broken diagnostic for complex builtin)
authorPaolo Carlini <pcarlini@suse.de>
Mon, 25 Feb 2008 19:04:50 +0000 (19:04 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Mon, 25 Feb 2008 19:04:50 +0000 (19:04 +0000)
/cp
2008-02-25  Paolo Carlini  <pcarlini@suse.de>

        PR c++/35333
        * error.c (dump_expr): Handle CONJ_EXPR.

/testsuite
2008-02-25  Paolo Carlini  <pcarlini@suse.de>

        PR c++/35333
        * g++.dg/other/error26.C: New.

/cp
2008-02-25  Paolo Carlini  <pcarlini@suse.de>

        PR c++/35338
        * error.c (dump_type): Handle FIXED_POINT_TYPE.
(dump_expr): Handle FIXED_CST.

/testsuite
2008-02-25  Paolo Carlini  <pcarlini@suse.de>

        PR c++/35338
        * g++.dg/other/error25.C: New.

From-SVN: r132634

gcc/cp/ChangeLog
gcc/cp/error.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/other/error25.C [new file with mode: 0644]
gcc/testsuite/g++.dg/other/error26.C [new file with mode: 0644]

index 3341c1bd48feb7dd7d964873a26714fd6ff3c52f..388b2c002e7ae8ef6b1986485d935e55a01a5cf9 100644 (file)
@@ -1,3 +1,14 @@
+2008-02-25  Paolo Carlini  <pcarlini@suse.de>
+
+        PR c++/35333
+        * error.c (dump_expr): Handle CONJ_EXPR.
+
+2008-02-25  Paolo Carlini  <pcarlini@suse.de>
+
+        PR c++/35338
+        * error.c (dump_type): Handle FIXED_POINT_TYPE.
+       (dump_expr): Handle FIXED_CST.
+
 2008-02-24  Jason Merrill  <jason@redhat.com>
 
        * parser.c (cp_parser_declaration): Handle "inline namespace".
index 678fd9dd46630ab58040b605a8172f486cb5a830..94e43c05f9ce4cc395180582866e75220e76027e 100644 (file)
@@ -326,6 +326,7 @@ dump_type (tree t, int flags)
     case BOOLEAN_TYPE:
     case COMPLEX_TYPE:
     case VECTOR_TYPE:
+    case FIXED_POINT_TYPE:
       pp_type_specifier_seq (cxx_pp, t);
       break;
 
@@ -2044,7 +2045,9 @@ dump_expr (tree t, int flags)
     case VEC_DELETE_EXPR:
     case MODOP_EXPR:
     case ABS_EXPR:
+    case CONJ_EXPR:
     case VECTOR_CST:
+    case FIXED_CST:
       pp_expression (cxx_pp, t);
       break;
 
index 0e3977d2820ebef871b987a153dac79fb525f07e..415cae7ccc5ac2e2efaf5a67acccfe0d19b69061 100644 (file)
@@ -1,3 +1,13 @@
+2008-02-25  Paolo Carlini  <pcarlini@suse.de>
+
+        PR c++/35333
+        * g++.dg/other/error26.C: New.
+
+2008-02-25  Paolo Carlini  <pcarlini@suse.de>
+
+        PR c++/35338
+        * g++.dg/other/error25.C: New.
+
 2008-02-25  Andreas Krebbel  <krebbel1@de.ibm.com>
 
        PR target/35258
diff --git a/gcc/testsuite/g++.dg/other/error25.C b/gcc/testsuite/g++.dg/other/error25.C
new file mode 100644 (file)
index 0000000..3bd9842
--- /dev/null
@@ -0,0 +1,5 @@
+// PR c++/35338
+// { dg-options "" }
+
+int i = 0r; // { dg-error "unnamed-fixed" }
+bool b = !0r; // { dg-error "0.0|argument" }
diff --git a/gcc/testsuite/g++.dg/other/error26.C b/gcc/testsuite/g++.dg/other/error26.C
new file mode 100644 (file)
index 0000000..fb2c8b7
--- /dev/null
@@ -0,0 +1,6 @@
+// PR c++/35333
+
+void foo(__complex__ double x)
+{
+  __builtin_conj(x)(); // { dg-error "~x" }
+}