common.opt (undef): New.
authorJoseph Myers <joseph@codesourcery.com>
Fri, 24 Sep 2010 15:14:40 +0000 (16:14 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Fri, 24 Sep 2010 15:14:40 +0000 (16:14 +0100)
* common.opt (undef): New.

testsuite:
* gcc.dg/cpp/undef-opt-1.c: New test.

From-SVN: r164599

gcc/ChangeLog
gcc/common.opt
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/cpp/undef-opt-1.c [new file with mode: 0644]

index e957d02a335e9d5a969a06bdf829d768cdfcd56b..738ae88f64f0b951dd8f42e52e0737e411584977 100644 (file)
@@ -1,3 +1,7 @@
+2010-09-24  Joseph Myers  <joseph@codesourcery.com>
+
+       * common.opt (undef): New.
+
 2010-09-24  Jakub Jelinek  <jakub@redhat.com>
 
        PR middle-end/45234
index 119a64af0a8754d684e7c5852bf5676394a3f4a1..6b89c3294ed1bf2bad64e01c4a3417fd427edc17 100644 (file)
@@ -1924,6 +1924,10 @@ Driver JoinedOrMissing
 u
 Driver Joined Separate
 
+undef
+Driver
+; C option, but driver must not handle as "-u ndef".
+
 v
 Driver
 
index 659dab282b99a09997a71b5b6b08c4670ee94901..8c526d5ccf09875a9610633d244ea96c6d8c3d53 100644 (file)
@@ -1,3 +1,7 @@
+2010-09-24  Joseph Myers  <joseph@codesourcery.com>
+
+       * gcc.dg/cpp/undef-opt-1.c: New test.
+
 2010-09-24  Jason Merrill  <jason@redhat.com>
 
        * g++.dg/other/error10.C: Adjust expected output.
diff --git a/gcc/testsuite/gcc.dg/cpp/undef-opt-1.c b/gcc/testsuite/gcc.dg/cpp/undef-opt-1.c
new file mode 100644 (file)
index 0000000..99c5246
--- /dev/null
@@ -0,0 +1,8 @@
+/* Test -undef.  A bug in its handling broke glibc builds because
+   "linux" was wrongly defined.  */
+/* { dg-do preprocess } */
+/* { dg-options "-undef" } */
+
+#ifdef linux
+#error -undef broken
+#endif