summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-08 13:34:31 +0000
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-08 13:34:31 +0000
commit075364144167c4c734a4236a34ba2c19a86c42a9 (patch)
treeb1463e67aa227d305406b7b3a8b46208ac5a5ab6
parent6202870611bbb9443c1644094c0b463c9a87e4a0 (diff)
downloadppe42-gcc-075364144167c4c734a4236a34ba2c19a86c42a9.tar.gz
ppe42-gcc-075364144167c4c734a4236a34ba2c19a86c42a9.zip
* cppinit.c (cpp_finish_options): Set first_unused_line to -1.
testsuite: * gcc.dg/cpp/Wunused.c: Update test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63985 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/cppinit.c2
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/cpp/Wunused.c5
4 files changed, 13 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2cfa1001990..0b788053bd4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2003-03-08 Neil Booth <neil@daikokuya.co.uk>
+
+ * cppinit.c (cpp_finish_options): Set first_unused_line to -1.
+
2003-03-08 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/h8300.md (*extzv_16_8): New.
diff --git a/gcc/cppinit.c b/gcc/cppinit.c
index 76b99b0079d..5cbd87feec3 100644
--- a/gcc/cppinit.c
+++ b/gcc/cppinit.c
@@ -625,6 +625,8 @@ cpp_finish_options (pfile)
{
struct pending_option *p;
+ /* Prevent -Wunused-macros with command-line redefinitions. */
+ pfile->first_unused_line = (unsigned int) -1;
_cpp_do_file_change (pfile, LC_RENAME, _("<built-in>"), 1, 0);
init_builtins (pfile);
_cpp_do_file_change (pfile, LC_RENAME, _("<command line>"), 1, 0);
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index d44271e0502..5d7b965d572 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2003-03-08 Neil Booth <neil@daikokuya.co.uk>
+
+ * gcc.dg/cpp/Wunused.c: Update test.
+
Sat Mar 8 14:18:15 CET 2003 Jan Hubicka <jh@suse.cz>
* gcc.dg/inline-3.c: New test.
diff --git a/gcc/testsuite/gcc.dg/cpp/Wunused.c b/gcc/testsuite/gcc.dg/cpp/Wunused.c
index aa099ee79c8..ac363ad04b8 100644
--- a/gcc/testsuite/gcc.dg/cpp/Wunused.c
+++ b/gcc/testsuite/gcc.dg/cpp/Wunused.c
@@ -1,7 +1,8 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc. */
+/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. */
/* { dg-do preprocess } */
-/* { dg-options -Wunused-macros } */
+/* Duplicate command line options should not warn. */
+/* { dg-options "-Wunused-macros -Dfoo -Dfoo" } */
/* Test everything related to -Wunused-macros.
OpenPOWER on IntegriCloud