mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-21 05:00:23 +08:00
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:
parent
bba745c19d
commit
9bdfe70405
@ -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.
|
||||
|
20
gcc/testsuite/g++.dg/other/switch1.C
Normal file
20
gcc/testsuite/g++.dg/other/switch1.C
Normal 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;
|
||||
}
|
||||
}
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user