OSDN Git Service

PR c++/13683
authorgiovannibajo <giovannibajo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 30 Jan 2004 15:12:45 +0000 (15:12 +0000)
committergiovannibajo <giovannibajo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 30 Jan 2004 15:12:45 +0000 (15:12 +0000)
* g++.dg/template/sizeof6.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76964 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 4f95129..b1ba65b 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())) };
+};