From bdb05a7b49ee8569b9efa1b0e0401b3026e1034e Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Sun, 26 Nov 2000 17:31:13 +0000 Subject: 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 --- gcc/cppinit.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'gcc/cppinit.c') diff --git a/gcc/cppinit.c b/gcc/cppinit.c index 2f190cd..e0b7c4e 100644 --- a/gcc/cppinit.c +++ b/gcc/cppinit.c @@ -431,10 +431,11 @@ set_lang (pfile, lang) { struct cpp_pending *pend = CPP_OPTION (pfile, pending); - /* Default to zero. */ - CPP_OPTION (pfile, lang_asm) = 0; + /* Defaults. */ + CPP_OPTION (pfile, lang) = lang; CPP_OPTION (pfile, objc) = 0; CPP_OPTION (pfile, cplusplus) = 0; + CPP_OPTION (pfile, extended_numbers) = 1; /* Allowed in GNU C and C99. */ switch (lang) { @@ -444,7 +445,6 @@ set_lang (pfile, lang) CPP_OPTION (pfile, dollars_in_ident) = 1; CPP_OPTION (pfile, cplusplus_comments) = 1; CPP_OPTION (pfile, digraphs) = 1; - CPP_OPTION (pfile, c89) = 0; CPP_OPTION (pfile, c99) = 1; new_pending_directive (pend, "__STDC_VERSION__=199901L", cpp_define); break; @@ -453,7 +453,6 @@ set_lang (pfile, lang) CPP_OPTION (pfile, dollars_in_ident) = 1; CPP_OPTION (pfile, cplusplus_comments) = 1; CPP_OPTION (pfile, digraphs) = 1; - CPP_OPTION (pfile, c89) = 1; CPP_OPTION (pfile, c99) = 0; break; @@ -465,8 +464,8 @@ set_lang (pfile, lang) CPP_OPTION (pfile, dollars_in_ident) = 0; CPP_OPTION (pfile, cplusplus_comments) = 0; CPP_OPTION (pfile, digraphs) = lang == CLK_STDC94; - CPP_OPTION (pfile, c89) = 1; CPP_OPTION (pfile, c99) = 0; + CPP_OPTION (pfile, extended_numbers) = 0; new_pending_directive (pend, "__STRICT_ANSI__", cpp_define); break; case CLK_STDC99: @@ -474,7 +473,6 @@ set_lang (pfile, lang) CPP_OPTION (pfile, dollars_in_ident) = 0; CPP_OPTION (pfile, cplusplus_comments) = 1; CPP_OPTION (pfile, digraphs) = 1; - CPP_OPTION (pfile, c89) = 0; CPP_OPTION (pfile, c99) = 1; new_pending_directive (pend, "__STRICT_ANSI__", cpp_define); new_pending_directive (pend, "__STDC_VERSION__=199901L", cpp_define); @@ -489,7 +487,6 @@ set_lang (pfile, lang) CPP_OPTION (pfile, dollars_in_ident) = 1; CPP_OPTION (pfile, cplusplus_comments) = 1; CPP_OPTION (pfile, digraphs) = 1; - CPP_OPTION (pfile, c89) = 0; CPP_OPTION (pfile, c99) = 0; CPP_OPTION (pfile, objc) = 1; new_pending_directive (pend, "__OBJC__", cpp_define); @@ -503,7 +500,6 @@ set_lang (pfile, lang) CPP_OPTION (pfile, dollars_in_ident) = lang == CLK_GNUCXX; CPP_OPTION (pfile, cplusplus_comments) = 1; CPP_OPTION (pfile, digraphs) = 1; - CPP_OPTION (pfile, c89) = 0; CPP_OPTION (pfile, c99) = 0; new_pending_directive (pend, "__cplusplus", cpp_define); break; @@ -514,9 +510,7 @@ set_lang (pfile, lang) CPP_OPTION (pfile, dollars_in_ident) = 0; /* Maybe not? */ CPP_OPTION (pfile, cplusplus_comments) = 1; CPP_OPTION (pfile, digraphs) = 0; - CPP_OPTION (pfile, c89) = 0; CPP_OPTION (pfile, c99) = 0; - CPP_OPTION (pfile, lang_asm) = 1; new_pending_directive (pend, "__ASSEMBLER__", cpp_define); break; } @@ -979,7 +973,7 @@ cpp_start_read (pfile, fname) CPP_OPTION (pfile, warn_traditional) = 0; /* Do not warn about invalid token pasting if -lang-asm. */ - if (CPP_OPTION (pfile, lang_asm)) + if (CPP_OPTION (pfile, lang) == CLK_ASM) CPP_OPTION (pfile, warn_paste) = 0; /* Set this if it hasn't been set already. */ -- cgit v1.1