Commit 0df4ae96 by Kriang Lerdsuwanakij Committed by Kriang Lerdsuwanakij

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
parent 99a7d107
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> 2003-02-14 Nathan Sidwell <nathan@codesourcery.com>
* search.c: ANSIfy function declarations and definitions. * search.c: ANSIfy function declarations and definitions.
......
...@@ -687,6 +687,7 @@ dump_type_prefix (t, flags) ...@@ -687,6 +687,7 @@ dump_type_prefix (t, flags)
case TYPENAME_TYPE: case TYPENAME_TYPE:
case COMPLEX_TYPE: case COMPLEX_TYPE:
case VECTOR_TYPE: case VECTOR_TYPE:
case TYPEOF_TYPE:
dump_type (t, flags); dump_type (t, flags);
padding = before; padding = before;
break; break;
...@@ -783,6 +784,7 @@ dump_type_suffix (t, flags) ...@@ -783,6 +784,7 @@ dump_type_suffix (t, flags)
case TYPENAME_TYPE: case TYPENAME_TYPE:
case COMPLEX_TYPE: case COMPLEX_TYPE:
case VECTOR_TYPE: case VECTOR_TYPE:
case TYPEOF_TYPE:
break; break;
default: default:
......
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> 2003-02-15 Roger Sayle <roger@eyesopen.com>
* gcc.dg/i386-387-3.c: New test case. * gcc.dg/i386-387-3.c: New test case.
......
// { 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); }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment