* cppexp.c (parse_defined): Warn only if -pedantic.
authorNeil Booth <neil@daikokuya.co.uk>
Sun, 3 Aug 2003 12:23:46 +0000 (12:23 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Sun, 3 Aug 2003 12:23:46 +0000 (12:23 +0000)
From-SVN: r70116

gcc/ChangeLog
gcc/cppexp.c

index 145cf2c179b95bb9824b051189bbc496c36cbbf9..a242688cbe378fb5c9b9a8656b15c1defdab4841 100644 (file)
@@ -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.
index ef2c1ea07124a6bf02eb0af0a58b3e4349d2e973..b4f1dcc896060038a628dcff40fd0e9bbc6effd7 100644 (file)
@@ -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");