error in previous patch

Paul Rubin phr-2006@nightsong.com
Mon Oct 2 18:11:00 GMT 2006


Sorry, I slipped and forgot to update the command line option in
testsuite/gcc.dg/cpp/pragma-exp1.c.  The corrected patch for that file
follows:

Index: testsuite/gcc.dg/cpp/pragma-exp1.c
===================================================================
--- testsuite/gcc.dg/cpp/pragma-exp1.c	(revision 0)
+++ testsuite/gcc.dg/cpp/pragma-exp1.c	(revision 0)
@@ -0,0 +1,48 @@
+/* { dg-do preprocess } */
+/* { dg-options -fexpand-pragmas } */
+
+/* test that expand-pragmas causes pragma <preprocessor symbol>
+   to get expanded */
+
+#pragma frobozz
+int x = 3;
+
+#define frobozz muffin
+#pragma frobozz
+
+/* make sure there's not unwanted token pasting */
+#define FOO abc
+#define BAR def
+#pragma FOO BAR ghi
+
+/* check that STDC pragmas aren't expanded, per C99 */
+#pragma STDC abc FOO xyz
+
+/* even if STDC is redefined */
+#define STDC blah
+#pragma STDC abc2 FOO xyz
+
+/* expand a macro with arguments */
+#define ADD(x,y,z) x+y+z
+
+/* check that macro with args gets expanded correctly at beginning of
+   pragma */
+#pragma ADD(a,b,c) xyz
+
+/* and also when not at the beginning */
+#pragma xyz ADD(a,b,c)
+
+/* check that omp macro still properly expands */
+#pragma omp frobozz
+
+
+/* { dg-final { scan-file pragma-exp1.i "#pragma frobozz" } } */
+/* { dg-final { scan-file pragma-exp1.i "#pragma muffin" } } */
+/* { dg-final { scan-file pragma-exp1.i "#pragma abc def ghi" } } */
+/* { dg-final { scan-file pragma-exp1.i "#pragma STDC abc FOO xyz" } } */
+/* { dg-final { scan-file pragma-exp1.i "#pragma STDC abc2 FOO xyz" } } */
+/* { dg-final { scan-file-not pragma-exp1.i "#pragma STDC abc abc xyz" } } */
+/* { dg-final { scan-file-not pragma-exp1.i "#pragma blah" } } */
+/* { dg-final { scan-file pragma-exp1.i "#pragma a\\+b\\+c xyz" } } */
+/* { dg-final { scan-file pragma-exp1.i "#pragma xyz a\\+b\\+c" } } */
+/* { dg-final { scan-file pragma-exp1.i "#pragma omp muffin" } } */



More information about the Gcc-patches mailing list