diff options
author | Jason Merrill <jason@redhat.com> | 2018-04-09 17:16:05 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2018-04-09 17:16:05 -0400 |
commit | 06756ed901c35e2430f924eb6a3998d872eb1040 (patch) | |
tree | a7fa0e912d6592eacf8f68aeb5076dfcf7e5b1aa /gcc | |
parent | 06e8d82eba434c70d409b3d61b37b3427733e904 (diff) | |
download | gcc-06756ed901c35e2430f924eb6a3998d872eb1040.zip gcc-06756ed901c35e2430f924eb6a3998d872eb1040.tar.gz gcc-06756ed901c35e2430f924eb6a3998d872eb1040.tar.bz2 |
PR c++/85279 - dump_expr doesn't understand decltype.
* error.c (dump_expr): Handle DECLTYPE_TYPE.
From-SVN: r259257
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/cp/error.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/decltype67.C | 7 |
3 files changed, 11 insertions, 0 deletions
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 <jason@redhat.com> + 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<typename T> struct A +{ + void foo(decltype(T())::Y); // { dg-error {decltype\(T\(\)\)::Y} } +}; |