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]

PATCH: tweak gcc.dg/cpp/trad/include.c test


When running the GCC testsuite on newlib targets,
gcc.dg/cpp/trad/include.c fails because newlib's stdio.h header uses ##.
-traditional-cpp causes the preprocessor to warn about these.

There are two ways to fix this: (1) mangle newlib's stdio.h header to
avoid these just so that we can run the tests with -traditional-cpp or
(2) just choose a different and equally available header.

I felt that (2) was the easiest change.  Okay for the trunk?

Ben

2006-12-19  Ben Elliston  <bje@au.ibm.com>

        * gcc.dg/cpp/trad/include.c: #include stdlib.h instead of stdio.h,
        as newlib's stdio.h uses non-traditional cpp constructs.

Index: trad/include.c
===================================================================
--- trad/include.c      (revision 120017)
+++ trad/include.c      (working copy)
@@ -4,6 +4,6 @@
 
 /* { dg-do preprocess } */
 
-#define __STDC__ 1     /* Stop complaints about non-ISO compilers.  */
-#define stdio 1
-#include <stdio.h>             /* { dg-bogus "o such file or directory" } */
+#define __STDC__ 1             /* Stop complaints about non-ISO compilers.  */
+#define stdlib 1
+#include <stdlib.h>            /* { dg-bogus "o such file or directory" } */



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