cppinit.c (cpp_handle_option): Set warn_endif_labels if -pedantic here...
authorNeil Booth <neil@daikokuya.demon.co.uk>
Sun, 24 Mar 2002 12:52:28 +0000 (12:52 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Sun, 24 Mar 2002 12:52:28 +0000 (12:52 +0000)
* cppinit.c (cpp_handle_option): Set warn_endif_labels if
-pedantic here...
(cpp_post_options): ... not here.

From-SVN: r51258

gcc/ChangeLog
gcc/cppinit.c

index 3f568562ca2e081968dee818b92ef85b68d721dd..6fbe7be4f0cd26564cda18fee6cd6bc78073b068 100644 (file)
@@ -1,3 +1,9 @@
+2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
+
+       * cppinit.c (cpp_handle_option): Set warn_endif_labels if
+       -pedantic here...
+       (cpp_post_options): ... not here.
+
 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
            Aldy Hernandez  <aldyh@redhat.com>
 
index d3d59ef4874eeb1eeb033f1a74223cc7275205dc..0ea8298ba9062d3e4438ccdca112951a061d36d8 100644 (file)
@@ -1470,6 +1470,7 @@ cpp_handle_option (pfile, argc, argv, ignore)
          /* fall through */
        case OPT_pedantic:
          CPP_OPTION (pfile, pedantic) = 1;
+         CPP_OPTION (pfile, warn_endif_labels) = 1;
          break;
        case OPT_trigraphs:
          CPP_OPTION (pfile, trigraphs) = 1;
@@ -1837,10 +1838,6 @@ cpp_post_options (pfile)
        || CPP_OPTION (pfile, deps_file)
        || CPP_OPTION (pfile, deps_phony_targets)))
     cpp_fatal (pfile, "you must additionally specify either -M or -MM");
-
-  /* Some things should always be on in pedantic mode.  */
-  if (CPP_OPTION (pfile, pedantic) == 1)
-    CPP_OPTION (pfile, warn_endif_labels) = 1;
 }
 
 /* Set up dependency-file output.  On exit, if print_deps is non-zero