This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

error in previous patch


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" } } */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]