This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix for g++.old-deja/g++.other/enum5.C
- From: "Ben Elliston" <bje at au1 dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: 03 Nov 2004 15:51:11 +1100
- Subject: Fix for g++.old-deja/g++.other/enum5.C
This old test I wrote now appears to work on mainline (with the
exception of some new restrictions on enum attributes introduced by
the overhauled C++ parser, perhaps?) Okay for mainline?
Ben
2004-11-03 Ben Elliston <bje@au.ibm.com>
* g++.old-deja/g++.other/enum5.C (enum conditions): Move the
packed attribute to the definition to satisfy the C++ parser.
Remove xfails.
Index: enum5.C
===================================================================
RCS file: /home/bje/gcc-cvs/gcc/gcc/testsuite/g++.old-deja/g++.other/enum5.C,v
retrieving revision 1.4
diff -u -p -r1.4 enum5.C
--- enum5.C 1 May 2003 02:02:49 -0000 1.4
+++ enum5.C 3 Nov 2004 04:46:54 -0000
@@ -6,9 +6,9 @@
extern "C" void abort();
-enum numbers { one, two, three } __attribute__ ((packed)) nums; // { dg-bogus "" "" { xfail *-*-* } }
-enum colours { red = 1000, green, blue } __attribute__ ((packed)) cols; // { dg-bogus "" "" { xfail *-*-* } }
-enum __attribute__ ((packed)) conditions { fine, rain, cloudy } forecast; // { dg-bogus "" "" { xfail *-*-* } }
+enum numbers { one, two, three } __attribute__ ((packed)) nums;
+enum colours { red = 1000, green, blue } __attribute__ ((packed)) cols;
+enum conditions { fine, rain, cloudy } __attribute__ ((packed)) forecast;
int
main()
@@ -19,7 +19,7 @@ main()
if (sizeof (cols) != 2)
abort ();
- if (sizeof (forecast) != 1) // { dg-bogus "" "" { xfail *-*-* } }
+ if (sizeof (forecast) != 1)
abort ();
return 0;