From: Kriang Lerdsuwanakij Date: Sun, 16 Feb 2003 17:04:27 +0000 (+0000) Subject: re PR c++/9459 (typeof in return type specification of template not supported) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0df4ae9648bf9f28ddf74037a5ed7b83d355d7d6;p=gcc.git re PR c++/9459 (typeof in return type specification of template not supported) PR c++/9459 * error.c (dump_type_prefix): Handle TYPEOF_TYPE. (dump_type_suffix): Likewise. * g++.dg/ext/typeof4.C: New test. From-SVN: r62973 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 2ddc227941e..85bc0e46c6b 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2003-02-16 Kriang Lerdsuwanakij + + PR c++/9459 + * error.c (dump_type_prefix): Handle TYPEOF_TYPE. + (dump_type_suffix): Likewise. + 2003-02-14 Nathan Sidwell * search.c: ANSIfy function declarations and definitions. diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 9fe4167483e..5938057706d 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -687,6 +687,7 @@ dump_type_prefix (t, flags) case TYPENAME_TYPE: case COMPLEX_TYPE: case VECTOR_TYPE: + case TYPEOF_TYPE: dump_type (t, flags); padding = before; break; @@ -783,6 +784,7 @@ dump_type_suffix (t, flags) case TYPENAME_TYPE: case COMPLEX_TYPE: case VECTOR_TYPE: + case TYPEOF_TYPE: break; default: diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 18044bbf1b6..39436e8d9ee 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2003-02-16 Kriang Lerdsuwanakij + + PR c++/9459 + * g++.dg/ext/typeof4.C: New test. + 2003-02-15 Roger Sayle * gcc.dg/i386-387-3.c: New test case. diff --git a/gcc/testsuite/g++.dg/ext/typeof4.C b/gcc/testsuite/g++.dg/ext/typeof4.C new file mode 100644 index 00000000000..2f423703514 --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/typeof4.C @@ -0,0 +1,13 @@ +// { dg-do compile } +// { dg-options "" } + +// Origin: Wolfgang Bangerth + +// PR c++/9459: typeof in return type of template function + +void foo (int) {} +void foo (double) {} + +template +typeof(foo(1)) +bar () { return foo(1); }