summaryrefslogtreecommitdiff
path: root/gcc/cpplib.c
diff options
context:
space:
mode:
authorpme <pme@138bc75d-0d04-0410-961f-82ee72b054a4>2002-03-22 21:59:04 +0000
committerpme <pme@138bc75d-0d04-0410-961f-82ee72b054a4>2002-03-22 21:59:04 +0000
commit923acdd5d4ba786f9a8343d24ae9668e95e0e016 (patch)
treed57dbbd51916727143458d291e8952b43c8151c0 /gcc/cpplib.c
parenta5e039de1f6e976dfb1fef516d93ee2f3caf75c0 (diff)
downloadgcc-923acdd5d4ba786f9a8343d24ae9668e95e0e016.tar.gz
2002-03-22 Phil Edwards <pme@gcc.gnu.org>
* cpplib.h (struct cpp_options): New member, warn_endif_labels. * cppinit.c (cpp_create_reader): On by default. (cpp_handle_option): Handle -W[no-]endif-labels. (cpp_post_options): Also enable if -pedantic. * cpplib.c (do_else): Use it. (do_endif): Likewise. * doc/cppopts.texi: Document new option. * doc/invoke.texi: Document new option. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51190 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpplib.c')
-rw-r--r--gcc/cpplib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cpplib.c b/gcc/cpplib.c
index d8e34330e28..9a6b077f24b 100644
--- a/gcc/cpplib.c
+++ b/gcc/cpplib.c
@@ -1375,7 +1375,7 @@ do_else (pfile)
ifs->mi_cmacro = 0;
/* Only check EOL if was not originally skipping. */
- if (!ifs->was_skipping)
+ if (!ifs->was_skipping && CPP_OPTION (pfile, warn_endif_labels))
check_eol (pfile);
}
}
@@ -1430,7 +1430,7 @@ do_endif (pfile)
else
{
/* Only check EOL if was not originally skipping. */
- if (!ifs->was_skipping)
+ if (!ifs->was_skipping && CPP_OPTION (pfile, warn_endif_labels))
check_eol (pfile);
/* If potential control macro, we go back outside again. */