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
This commit is contained in:
Kriang Lerdsuwanakij 2003-02-16 17:04:27 +00:00 committed by Kriang Lerdsuwanakij
parent 99a7d107b6
commit 0df4ae9648
4 changed files with 26 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/9459
* error.c (dump_type_prefix): Handle TYPEOF_TYPE.
(dump_type_suffix): Likewise.
2003-02-14 Nathan Sidwell <nathan@codesourcery.com>
* search.c: ANSIfy function declarations and definitions.

View File

@ -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:

View File

@ -1,3 +1,8 @@
2003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/9459
* g++.dg/ext/typeof4.C: New test.
2003-02-15 Roger Sayle <roger@eyesopen.com>
* gcc.dg/i386-387-3.c: New test case.

View File

@ -0,0 +1,13 @@
// { dg-do compile }
// { dg-options "" }
// Origin: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
// PR c++/9459: typeof in return type of template function
void foo (int) {}
void foo (double) {}
template <typename C>
typeof(foo(1))
bar () { return foo(1); }