summaryrefslogtreecommitdiff
path: root/gcc/cpplex.c
diff options
context:
space:
mode:
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2000-11-26 17:31:13 +0000
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2000-11-26 17:31:13 +0000
commit5db5d0571db08403250a08d13546545741080da2 (patch)
treeb125a3451c60a8ac14f5f3f3cd8afb06f601958a /gcc/cpplex.c
parent7302865bf8517375d18bbd72b77187ce66ff6f4f (diff)
downloadgcc-5db5d0571db08403250a08d13546545741080da2.tar.gz
* cpplib.h (struct cpp_reader): Remove lang_asm.
(struct cpp_options): Remove c89. New members lang, extended_numbers. * cppexp.c (parse_number): Use them. * cpphash.h (VALID_SIGN): Use them. * cppinit.c (set_lang, cpp_start_read): Update. * cpplex.c (parse_string, _cpp_lex_token): Update. * cpplib.c (_cpp_handle_directive): Update. * cppmacro.c (parse_args): Update. * cppmain.c (scan_buffer): Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37761 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpplex.c')
-rw-r--r--gcc/cpplex.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/cpplex.c b/gcc/cpplex.c
index bec14e76042..3cfd8e3e072 100644
--- a/gcc/cpplex.c
+++ b/gcc/cpplex.c
@@ -673,7 +673,7 @@ parse_string (pfile, token, terminator)
/* In assembly language, silently terminate string and
character literals at end of line. This is a kludge
around not knowing where comments are. */
- if (CPP_OPTION (pfile, lang_asm) && terminator != '>')
+ if (CPP_OPTION (pfile, lang) == CLK_ASM && terminator != '>')
break;
/* Character constants and header names may not extend over
@@ -1007,11 +1007,9 @@ _cpp_lex_token (pfile, result)
&& !CPP_IN_SYSTEM_HEADER (pfile))
break;
- /* We silently allow C++ comments in system headers,
- irrespective of conformance mode, because lots of
- broken systems do that and trying to clean it up in
- fixincludes is a nightmare. */
- if (CPP_OPTION (pfile, c89) && CPP_PEDANTIC (pfile)
+ /* Warn about comments only if pedantically GNUC89, and not
+ in system headers. */
+ if (CPP_OPTION (pfile, lang) == CLK_GNUC89 && CPP_PEDANTIC (pfile)
&& ! buffer->warned_cplusplus_comments)
{
cpp_pedwarn (pfile,