From 2784528c88b0abf0496214ef78347939366c3eb9 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Sun, 24 Mar 2002 12:52:28 +0000 Subject: [PATCH] cppinit.c (cpp_handle_option): Set warn_endif_labels if -pedantic here... * cppinit.c (cpp_handle_option): Set warn_endif_labels if -pedantic here... (cpp_post_options): ... not here. From-SVN: r51258 --- gcc/ChangeLog | 6 ++++++ gcc/cppinit.c | 5 +---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3f568562ca2..6fbe7be4f0c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2002-03-24 Neil Booth + + * cppinit.c (cpp_handle_option): Set warn_endif_labels if + -pedantic here... + (cpp_post_options): ... not here. + 2002-03-24 Neil Booth Aldy Hernandez diff --git a/gcc/cppinit.c b/gcc/cppinit.c index d3d59ef4874..0ea8298ba90 100644 --- a/gcc/cppinit.c +++ b/gcc/cppinit.c @@ -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 -- 2.30.2