aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2008-09-23 17:47:32 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2008-09-23 17:47:32 +0000
commitc9891b705812b5b23c8f071752cf4b64a703a258 (patch)
treed73fd59f3546730fef5c59b6fa2e5136f9740f66
parent8839907955ae3ad3240fc48dd082f5758e8dfa41 (diff)
downloadgcc-c9891b705812b5b23c8f071752cf4b64a703a258.zip
gcc-c9891b705812b5b23c8f071752cf4b64a703a258.tar.gz
gcc-c9891b705812b5b23c8f071752cf4b64a703a258.tar.bz2
* c-ppoutput.c (cb_used_define): Do nothing for a builtin node.
From-SVN: r140604
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/c-ppoutput.c2
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/cpp/cmdlne-dU-23.c5
4 files changed, 15 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 45c2c3c..d289790 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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,
diff --git a/gcc/c-ppoutput.c b/gcc/c-ppoutput.c
index 9475b21..f5a3a78 100644
--- a/gcc/c-ppoutput.c
+++ b/gcc/c-ppoutput.c
@@ -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;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 4ec69d5..a4f4291 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 0000000..c99a43b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-23.c
@@ -0,0 +1,5 @@
+/* { dg-do preprocess } */
+/* { dg-options "-P -dU" } */
+/* { dg-final { scan-file-not cmdlne-dU-23.i "__FILE__" } } */
+#ifdef __FILE__
+#endif