From: Paolo Carlini Date: Fri, 30 Jan 2009 15:03:10 +0000 (+0000) Subject: re PR c++/33465 (Broken diagnostic: 'fix_trunc_expr' and 'float_expr' not supported... X-Git-Tag: releases/gcc-4.4.0~693 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1fae3e66dac0f62eafa859d144d56c704536cf7a;p=thirdparty%2Fgcc.git re PR c++/33465 (Broken diagnostic: 'fix_trunc_expr' and 'float_expr' not supported by dump_expr) /cp 2009-01-30 Paolo Carlini PR c++/33465 * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR. /testsuite 2009-01-30 Paolo Carlini PR c++/33465 * g++.dg/parse/error34.C: New. * g++.dg/parse/error35.C: Likewise. /cp 2009-01-30 Paolo Carlini PR c++/38655 * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE. /testsuite 2009-01-30 Paolo Carlini PR c++/38655 * g++.dg/cpp0x/decltype-38655.C: New. From-SVN: r143790 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index afa84bea4eb8..7595491e2d0a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,13 @@ +2009-01-30 Paolo Carlini + + PR c++/33465 + * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR. + +2009-01-30 Paolo Carlini + + PR c++/38655 + * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE. + 2009-01-29 Paolo Carlini * typeck.c (invalid_nonstatic_memfn_p): Use diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 16c962809d7f..e2cb8bf0ecc5 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -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; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 722203bf13f0..ff88ca947666 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2009-01-30 Paolo Carlini + + PR c++/33465 + * g++.dg/parse/error34.C: New. + * g++.dg/parse/error35.C: Likewise. + +2009-01-30 Paolo Carlini + + PR c++/38655 + * g++.dg/cpp0x/decltype-38655.C: New. + 2009-01-30 Jakub Jelinek 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 index 000000000000..689be9fa4742 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/decltype-38655.C @@ -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 index 000000000000..449ea689ad9a --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/error34.C @@ -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 index 000000000000..59e726a31f2e --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/error35.C @@ -0,0 +1,8 @@ +// PR c++/33465 + +int foo(double); + +void bar(int i) +{ + foo(i)(); // { dg-error "foo\\(\\(double\\)i\\)" } +}