diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-11-26 23:44:54 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-11-26 23:44:54 +0000 |
commit | 435fb09b93a59d0ca4a363e11d8fd7dad53104a1 (patch) | |
tree | c1a2c9c7c2d1ce0412550e13966b5458cdbb8bbe /gcc/cppmacro.c | |
parent | 1ac38fe63e477e0b4df918e444a29940883f94db (diff) | |
download | gcc-435fb09b93a59d0ca4a363e11d8fd7dad53104a1.tar.gz |
* cppfiles.c (stack_include_file): Don't optimize zero-length
files.
(read_include_file): NUL-terminate read files.
* cpplex.c (handle_newline, skip_escaped_newlines,
get_effective_char, skip_whitespace, parse_identifier,
parse_identifier_slow, parse_number, parse_string,
_cpp_lex_direct): Optimize for the fact that buffers are guaranteed
NUL-terminated.
* cpplib.c (destringize_and_run, cpp_define, handle_assertion):
Be sure buffers are NUL terminated.
* cppmacro.c (warn_of_redefinition): Kill compile warning.
* c-common.c: Include tree-inline.h.
(c_language): Move separate definitions here.
(c_common_init_options, c_common_post_options): New.
(c_common_lang_init): Rename c_common_init.
* c-common.h (c_common_lang_init): Similarly.
(c_common_init_options, c_common_post_options): New.
* c-lang.c (c_post_options): Move body to c_common_post_options.
(c_init_options): Use c_common_init_options.
(c_init): Update.
* langhooks.def: Rearrange.
* langhooks.h: Rearrange, and improve comments.
* toplev.c (do_compile): New function.
(toplev_main): Use it.
(lang_independent_f_options, parse_options_and_default_flags,
process_options): Remove trailing periods.
* Makefile.in: Update.
cp: * decl2.c (c_language): Move to c-common.c.
* lex.c (cxx_post_options, cxx_init_options): Use c-common.c
functions.
(cxx_init): Update.
objc: * objc-act.c (objc_post_options, objc_init_options): Use c-common.c
functions.
(ojbc_init): Update.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47362 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cppmacro.c')
-rw-r--r-- | gcc/cppmacro.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c index 403920c03a3..21d3cb1296b 100644 --- a/gcc/cppmacro.c +++ b/gcc/cppmacro.c @@ -82,7 +82,7 @@ static _cpp_buff *funlike_invocation_p PARAMS ((cpp_reader *, cpp_hashnode *)); static cpp_token *alloc_expansion_token PARAMS ((cpp_reader *, cpp_macro *)); static cpp_token *lex_expansion_token PARAMS ((cpp_reader *, cpp_macro *)); -static int warn_of_redefinition PARAMS ((cpp_reader *, const cpp_hashnode *, +static int warn_of_redefinition PARAMS ((const cpp_hashnode *, const cpp_macro *)); static int save_parameter PARAMS ((cpp_reader *, cpp_macro *, cpp_hashnode *)); static int parse_params PARAMS ((cpp_reader *, cpp_macro *)); @@ -380,6 +380,7 @@ paste_tokens (pfile, plhs, rhs) && (rhs->type == CPP_MULT || rhs->type == CPP_DIV)) *end++ = ' '; end = cpp_spell_token (pfile, rhs, end); + *end = '\0'; cpp_push_buffer (pfile, buf, end - buf, /* from_stage3 */ true, 1); @@ -1112,8 +1113,7 @@ _cpp_backup_tokens (pfile, count) /* Returns non-zero if a macro redefinition warning is required. */ static int -warn_of_redefinition (pfile, node, macro2) - cpp_reader *pfile; +warn_of_redefinition (node, macro2) const cpp_hashnode *node; const cpp_macro *macro2; { @@ -1408,7 +1408,7 @@ _cpp_create_definition (pfile, node) if (node->type != NT_VOID) { - if (warn_of_redefinition (pfile, node, macro)) + if (warn_of_redefinition (node, macro)) { cpp_pedwarn_with_line (pfile, pfile->directive_line, 0, "\"%s\" redefined", NODE_NAME (node)); |