re PR c++/14250 (switch() does not seem to see operator int() in template class)

PR c++/14250
	* g++.dg/other/switch1.C: New test.

From-SVN: r78295
This commit is contained in:
Giovanni Bajo 2004-02-23 12:44:22 +00:00
parent bba745c19d
commit 9bdfe70405
2 changed files with 25 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/14250
* g++.dg/other/switch1.C: New test.
2004-02-23 Eric Botcazou <ebotcazou@libertysurf.fr>
* gcc.dg/cast-function-1.c: Adjust for new informative message.

View File

@ -0,0 +1,20 @@
// { dg-do compile }
// Contributed by: Nick Savoiu <savoiu at ics dot uci dot edu>
// PR c++/14250: Incomplete type in switch statement
template <typename T>
struct A {
operator int();
};
struct C1 {
static A<void> t1;
void fun()
{
switch(t1)
{
default: break;
}
}
};