]> gcc.gnu.org Git - gcc.git/commitdiff
re PR c++/33465 (Broken diagnostic: 'fix_trunc_expr' and 'float_expr' not supported...
authorPaolo Carlini <paolo.carlini@oracle.com>
Fri, 30 Jan 2009 15:03:10 +0000 (15:03 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 30 Jan 2009 15:03:10 +0000 (15:03 +0000)
/cp
2009-01-30  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/33465
* error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.

/testsuite
2009-01-30  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/33465
* g++.dg/parse/error34.C: New.
* g++.dg/parse/error35.C: Likewise.

/cp
2009-01-30  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/38655
* error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.

/testsuite
2009-01-30  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/38655
* g++.dg/cpp0x/decltype-38655.C: New.

From-SVN: r143790

gcc/cp/ChangeLog
gcc/cp/error.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/decltype-38655.C [new file with mode: 0644]
gcc/testsuite/g++.dg/parse/error34.C [new file with mode: 0644]
gcc/testsuite/g++.dg/parse/error35.C [new file with mode: 0644]

index afa84bea4eb89cd78eaaac0b9b243850a081f9c7..7595491e2d0a9d8b6236d349841d40b2f48c4a1f 100644 (file)
@@ -1,3 +1,13 @@
+2009-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/33465
+       * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
+
+2009-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/38655
+       * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
+
 2009-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
 
        * typeck.c (invalid_nonstatic_memfn_p): Use
index 16c962809d7f7eb90867f694e0e32f2bdcc5c5b1..e2cb8bf0ecc5880be4517c7ed2f1e2bd7b465b02 100644 (file)
@@ -626,6 +626,7 @@ dump_type_prefix (tree t, int flags)
     case TYPEOF_TYPE:
     case DECLTYPE_TYPE:
     case TYPE_PACK_EXPANSION:
+    case FIXED_POINT_TYPE:
       dump_type (t, flags);
       pp_base (cxx_pp)->padding = pp_before;
       break;
@@ -724,6 +725,7 @@ dump_type_suffix (tree t, int flags)
     case TYPEOF_TYPE:
     case DECLTYPE_TYPE:
     case TYPE_PACK_EXPANSION:
+    case FIXED_POINT_TYPE:
       break;
 
     default:
@@ -2073,6 +2075,8 @@ dump_expr (tree t, int flags)
     case LTGT_EXPR:
     case COMPLEX_EXPR:
     case BIT_FIELD_REF:
+    case FIX_TRUNC_EXPR:
+    case FLOAT_EXPR:
       pp_expression (cxx_pp, t);
       break;
 
index 722203bf13f076a3d7145e5065581a07d30b282a..ff88ca9476668c01066c39ecd5683bc201a48f13 100644 (file)
@@ -1,3 +1,14 @@
+2009-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/33465
+       * g++.dg/parse/error34.C: New.
+       * g++.dg/parse/error35.C: Likewise.
+
+2009-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/38655
+       * g++.dg/cpp0x/decltype-38655.C: New.
+
 2009-01-30  Jakub Jelinek  <jakub@redhat.com>
 
        PR target/39002
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype-38655.C b/gcc/testsuite/g++.dg/cpp0x/decltype-38655.C
new file mode 100644 (file)
index 0000000..689be9f
--- /dev/null
@@ -0,0 +1,4 @@
+// PR c++/38655
+// { dg-options "" }
+
+__decltype(0r)* p = 1; // { dg-error "unnamed-fixed" }
diff --git a/gcc/testsuite/g++.dg/parse/error34.C b/gcc/testsuite/g++.dg/parse/error34.C
new file mode 100644 (file)
index 0000000..449ea68
--- /dev/null
@@ -0,0 +1,8 @@
+// PR c++/33465
+
+int foo(int);
+
+void bar(double d)
+{
+  foo(d)();  // { dg-error "foo\\(\\(int\\)d\\)" }
+}
diff --git a/gcc/testsuite/g++.dg/parse/error35.C b/gcc/testsuite/g++.dg/parse/error35.C
new file mode 100644 (file)
index 0000000..59e726a
--- /dev/null
@@ -0,0 +1,8 @@
+// PR c++/33465
+
+int foo(double);
+
+void bar(int i)
+{
+  foo(i)();  // { dg-error "foo\\(\\(double\\)i\\)" }
+}
This page took 0.089621 seconds and 5 git commands to generate.