* c-ppoutput.c (cb_used_define): Do nothing for a builtin node.
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 23 Sep 2008 17:47:32 +0000 (17:47 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 23 Sep 2008 17:47:32 +0000 (17:47 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140604 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/c-ppoutput.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/cpp/cmdlne-dU-23.c [new file with mode: 0644]

index 45c2c3c..d289790 100644 (file)
@@ -1,3 +1,7 @@
+2008-09-23  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * c-ppoutput.c (cb_used_define): Do nothing for a builtin node.
+
 2008-09-23  Aldy Hernandez  <aldyh@redhat.com>
 
        * c-tree.h: Add argument to c_objc_common_truthvalue_conversion,
index 9475b21..f5a3a78 100644 (file)
@@ -406,6 +406,8 @@ cb_used_define (cpp_reader *pfile, source_location line ATTRIBUTE_UNUSED,
                cpp_hashnode *node)
 {
   macro_queue *q;
+  if (node->flags & NODE_BUILTIN)
+    return;
   q = XNEW (macro_queue);
   q->macro = xstrdup ((const char *) cpp_macro_definition (pfile, node));
   q->next = define_queue;
index 4ec69d5..a4f4291 100644 (file)
@@ -1,3 +1,7 @@
+2008-09-23  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * gcc.dg/cpp/cmdlne-dU-23.c: New test.
+
 2008-09-23  Aldy Hernandez  <aldyh@redhat.com>
 
        * gcc.dg/Walways-true-1.c: Test column numbers.
diff --git a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-23.c b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-23.c
new file mode 100644 (file)
index 0000000..c99a43b
--- /dev/null
@@ -0,0 +1,5 @@
+/* { dg-do preprocess } */
+/* { dg-options "-P -dU" } */
+/* { dg-final { scan-file-not cmdlne-dU-23.i "__FILE__" } } */
+#ifdef __FILE__
+#endif