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]

Another cpplib testcase


I realised that my initial (local) version of the _Pragma patch I
posted earlier today broke the example below, which I don't think is
covered in the testsuite.  So I'll add it.  [The mailed and committed
patch doesn't have the bug].

Neil.

	* gcc.dg/cpp/macro11.c: New test.

Index: gcc.dg/cpp/macro11.c
===================================================================
RCS file: macro11.c
diff -N macro11.c
--- /dev/null	Tue May  5 13:32:27 1998
+++ macro11.c	Tue Oct  2 15:27:31 2001
@@ -0,0 +1,16 @@
+/* Copyright (C) 2001 Free Software Foundation, Inc.  */
+
+/* { dg-do preprocess } */
+
+/* Source: Neil Booth, 2 Oct 2001.
+
+   Tests that we clear the disabled flag that is set by the
+   macro-defined-to-itself optimization (the optimization might not be
+   worth it).  */
+
+#define foo foo
+#undef foo
+#define foo 1
+#if !foo
+#error foo still disabled! 
+#endif


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