This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: tweak gcc.dg/cpp/trad/include.c test
- From: Ben Elliston <bje at au1 dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: janis187 at us dot ibm dot com
- Date: Tue, 19 Dec 2006 11:09:30 +1100
- Subject: 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" } */