From: Gabriel Dos Reis Date: Sun, 15 Feb 2004 15:00:54 +0000 (+0000) Subject: re PR c++/14085 (when compiling template functors) X-Git-Tag: releases/gcc-4.0.0~10102 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bf3e82838383870195d5981acb31d2ad16bf7adf;p=thirdparty%2Fgcc.git re PR c++/14085 (when compiling template functors) PR c++/14085 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM. From-SVN: r77852 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 9117cdf6cd6b..60a0354ab11d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2004-02-15 Gabriel Dos Reis + + PR c++/14085 + * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM. + 2004-02-14 Kriang Lerdsuwanakij PR c++/13635 diff --git a/gcc/cp/error.c b/gcc/cp/error.c index ece263559484..a276f7b71ad0 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -940,6 +940,13 @@ dump_decl (tree t, int flags) dump_expr (t, flags); break; + case TEMPLATE_TYPE_PARM: + if (flags & TFF_DECL_SPECIFIERS) + pp_cxx_declaration (cxx_pp, t); + else + pp_type_id (cxx_pp, t); + break; + default: pp_unsupported_tree (cxx_pp, t); /* Fall through to error. */ diff --git a/gcc/testsuite/g++.dg/other/nontype-1.C b/gcc/testsuite/g++.dg/other/nontype-1.C new file mode 100644 index 000000000000..5a1fcd978215 --- /dev/null +++ b/gcc/testsuite/g++.dg/other/nontype-1.C @@ -0,0 +1,7 @@ +template +bool asfun(Op f, + Op::first_argument_type a, // { dg-error "not a type" } + Op::second_argument_type b) // { dg-error "not a type" } +{ // { dg-error "no type" } + return Op(a, b); +}