offsetof1.C: Include cstddef, use non-builtin form of offsetof.
authorRichard Henderson <rth@redhat.com>
Tue, 31 Aug 2004 17:37:32 +0000 (10:37 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Tue, 31 Aug 2004 17:37:32 +0000 (10:37 -0700)
        * g++.dg/other/offsetof1.C: Include cstddef, use non-builtin
        form of offsetof.
        * g++.dg/other/offsetof5.C: Remove duplicate.

From-SVN: r86834

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/other/offsetof1.C
gcc/testsuite/g++.dg/other/offsetof5.C [deleted file]

index 86a392c8f20dc1b54300a73540d00d1f6c02dbd6..e7a17d30e43d0455d92fe91736e2bcf445a7a6d4 100644 (file)
@@ -1,3 +1,9 @@
+2004-08-31  Richard Henderson  <rth@redhat.com>
+
+       * g++.dg/other/offsetof1.C: Include cstddef, use non-builtin
+       form of offsetof.
+       * g++.dg/other/offsetof5.C: Remove duplicate.
+
 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
 
        PR fortran/17244
index 39bb7836cee2ea90abe8026e4a5fb12d7a5baee4..78738892a70817ed74cac813a6a9ca2cdcd90825 100644 (file)
@@ -4,6 +4,9 @@
 // Contributed by Nathan Sidwell 14 Aug 2002 <nathan@codesourcery.com>
 
 // PR c++ 7598, offsetof broke
+// PR c++ 11072, DR 273's solution is broken
+
+#include <cstddef>
 
 struct F
 {
@@ -11,4 +14,4 @@ struct F
   char j;
 };
 
-static int ary[__builtin_offsetof(F, j)];
+static int ary[offsetof(F, j)];
diff --git a/gcc/testsuite/g++.dg/other/offsetof5.C b/gcc/testsuite/g++.dg/other/offsetof5.C
deleted file mode 100644 (file)
index 40a4406..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// { dg-do compile }
-
-// Copyright (C) 2003 Free Software Foundation, Inc.
-// Contributed by Nathan Sidwell 30 June 2003 <nathan@codesourcery.com>
-
-// PR c++ 11072, DR 273's solution is broken
-
-#include <stddef.h>
-
-struct F
-{
-  char i;
-  char j;
-};
-
-static int ary[offsetof (F, j)];
-