]> gcc.gnu.org Git - gcc.git/commitdiff
re PR c++/14250 (switch() does not seem to see operator int() in template class)
authorGiovanni Bajo <giovannibajo@gcc.gnu.org>
Mon, 23 Feb 2004 12:44:22 +0000 (12:44 +0000)
committerGiovanni Bajo <giovannibajo@gcc.gnu.org>
Mon, 23 Feb 2004 12:44:22 +0000 (12:44 +0000)
PR c++/14250
* g++.dg/other/switch1.C: New test.

From-SVN: r78295

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/other/switch1.C [new file with mode: 0644]

index f62f2946be5fb5643723c84c5a29d06ea530264b..40ea07f019071ff6526811fe422ea7172e38489f 100644 (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.
diff --git a/gcc/testsuite/g++.dg/other/switch1.C b/gcc/testsuite/g++.dg/other/switch1.C
new file mode 100644 (file)
index 0000000..a22d2b5
--- /dev/null
@@ -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; 
+   } 
+  } 
+}; 
This page took 0.105839 seconds and 5 git commands to generate.