From: Jason Merrill Date: Mon, 9 Apr 2018 21:16:05 +0000 (-0400) Subject: PR c++/85279 - dump_expr doesn't understand decltype. X-Git-Tag: upstream/12.2.0~32417 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=06756ed901c35e2430f924eb6a3998d872eb1040;p=platform%2Fupstream%2Fgcc.git PR c++/85279 - dump_expr doesn't understand decltype. * error.c (dump_expr): Handle DECLTYPE_TYPE. From-SVN: r259257 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 37f446f..c8eae2e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2018-04-09 Jason Merrill + PR c++/85279 - dump_expr doesn't understand decltype. + * error.c (dump_expr): Handle DECLTYPE_TYPE. + PR c++/85262 - ICE with redundant qualification on constructor. * call.c (build_new_method_call_1): Move make_args_non_dependent after A::A() handling. diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 75e853a..f27b700 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -2714,6 +2714,7 @@ dump_expr (cxx_pretty_printer *pp, tree t, int flags) case INTEGER_TYPE: case COMPLEX_TYPE: case VECTOR_TYPE: + case DECLTYPE_TYPE: pp_type_specifier_seq (pp, t); break; diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype67.C b/gcc/testsuite/g++.dg/cpp0x/decltype67.C new file mode 100644 index 0000000..e8042ac --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/decltype67.C @@ -0,0 +1,7 @@ +// PR c++/85279 +// { dg-do compile { target c++11 } } + +template struct A +{ + void foo(decltype(T())::Y); // { dg-error {decltype\(T\(\)\)::Y} } +};