diff options
author | Neil Booth <neilb@earthling.net> | 2000-11-26 17:31:13 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2000-11-26 17:31:13 +0000 |
commit | bdb05a7b49ee8569b9efa1b0e0401b3026e1034e (patch) | |
tree | b125a3451c60a8ac14f5f3f3cd8afb06f601958a /gcc/cpplex.c | |
parent | e1085962754472b391d366d591f66e2413c8faa7 (diff) | |
download | gcc-bdb05a7b49ee8569b9efa1b0e0401b3026e1034e.zip gcc-bdb05a7b49ee8569b9efa1b0e0401b3026e1034e.tar.gz gcc-bdb05a7b49ee8569b9efa1b0e0401b3026e1034e.tar.bz2 |
cpplib.h (struct cpp_reader): Remove lang_asm.
* 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.
From-SVN: r37761
Diffstat (limited to 'gcc/cpplex.c')
-rw-r--r-- | gcc/cpplex.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/cpplex.c b/gcc/cpplex.c index bec14e7..3cfd8e3 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, |