From 335d03ec867d418098bb3d0b312867bd17403fa8 Mon Sep 17 00:00:00 2001
From: Neil Booth <neil@daikokuya.co.uk>
Date: Sun, 3 Aug 2003 12:23:46 +0000
Subject: [PATCH] * cppexp.c (parse_defined): Warn only if -pedantic.

From-SVN: r70116
---
 gcc/ChangeLog | 4 ++++
 gcc/cppexp.c  | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 145cf2c179b9..a242688cbe37 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2003-08-03  Neil Booth  <neil@daikokuya.co.uk>
+
+	* cppexp.c (parse_defined): Warn only if -pedantic.
+
 2003-08-03  Neil Booth  <neil@daikokuya.co.uk>
 
 	* cppfiles.c (stack_file): Use file path.
diff --git a/gcc/cppexp.c b/gcc/cppexp.c
index ef2c1ea07124..b4f1dcc89606 100644
--- a/gcc/cppexp.c
+++ b/gcc/cppexp.c
@@ -487,7 +487,7 @@ parse_defined (cpp_reader *pfile)
 
   if (node)
     {
-      if (pfile->context != initial_context)
+      if (pfile->context != initial_context && CPP_PEDANTIC (pfile))
 	cpp_error (pfile, DL_WARNING,
 		   "this use of \"defined\" may not be portable");
 
-- 
GitLab