re PR c++/13683 (bogus warning about passing non-PODs through ellipsis)
authorGiovanni Bajo <giovannibajo@gcc.gnu.org>
Fri, 30 Jan 2004 15:12:45 +0000 (15:12 +0000)
committerGiovanni Bajo <giovannibajo@gcc.gnu.org>
Fri, 30 Jan 2004 15:12:45 +0000 (15:12 +0000)
PR c++/13683
* g++.dg/template/sizeof6.C: New test.

From-SVN: r76964

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

index 4f95129b9e99fbce0b716ef0b00660dc48246759..b1ba65bd5b7341d576a9259618a35b9f41dbe6f6 100644 (file)
@@ -1,3 +1,8 @@
+2004-01-30  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
+
+       PR c++/13683
+       * g++.dg/template/sizeof6.C: New test.
+
 2004-01-30  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        * gcc.dg/fwritable-strings-1.c: New test.
diff --git a/gcc/testsuite/g++.dg/template/sizeof6.C b/gcc/testsuite/g++.dg/template/sizeof6.C
new file mode 100644 (file)
index 0000000..3ef3794
--- /dev/null
@@ -0,0 +1,13 @@
+// { dg-do compile }
+// Contributed by Giovanni Bajo <giovannibajo at gcc dot gnu dot org>
+// PR c++/13683: bogus warning about passing non-PODs through ellipsis
+
+struct B {};
+struct NonPOD : B {};
+
+struct A
+{
+  static int check(...);
+  static NonPOD GetNonPOD(void);
+  enum { value = sizeof(A::check(A::GetNonPOD())) };
+};