diff options
author | Neil Booth <neil@daikokuya.demon.co.uk> | 2002-06-07 06:26:32 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2002-06-07 06:26:32 +0000 |
commit | c70f6ed31478e27420d2038d09f3a343422db22f (patch) | |
tree | 6aed42053a56ed0593bc263de6125d7efc67c493 /gcc/cppmacro.c | |
parent | aec2ac46a748e1d224db7cf7ce05a4516918c8ff (diff) | |
download | gcc-c70f6ed31478e27420d2038d09f3a343422db22f.zip gcc-c70f6ed31478e27420d2038d09f3a343422db22f.tar.gz gcc-c70f6ed31478e27420d2038d09f3a343422db22f.tar.bz2 |
cpptrad.c (struct block, [...]): New.
* cpptrad.c (struct block, BLOCK_HEADER_LEN, BLOCK_LEN,
scan_parameters, save_replacement_text, replacement_length): New.
(scan_out_logical_line): Take a macro and save parameters if
non-NULL.
(_cpp_logical_line_trad): Update.
(_cpp_create_trad_definition): Update to handle function-like
macros.
* cpplex.c (new_buff): Update.
(struct dummy, DEFAULT_ALIGNMENT, CPP_ALIGN): Move...
* cpphash.h: ...here.
(CPP_ALIGN2, _cpp_save_parameter): New.
* cppmacro.c (save_parameter): Rename, export.
(parse_params): Update.
From-SVN: r54331
Diffstat (limited to 'gcc/cppmacro.c')
-rw-r--r-- | gcc/cppmacro.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c index 0b1f0ff..5e954d4 100644 --- a/gcc/cppmacro.c +++ b/gcc/cppmacro.c @@ -70,7 +70,6 @@ static cpp_token *alloc_expansion_token PARAMS ((cpp_reader *, cpp_macro *)); static cpp_token *lex_expansion_token PARAMS ((cpp_reader *, cpp_macro *)); static bool warn_of_redefinition PARAMS ((cpp_reader *, 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 *)); static void check_trad_stringification PARAMS ((cpp_reader *, const cpp_macro *, @@ -1197,8 +1196,8 @@ _cpp_free_definition (h) /* Save parameter NODE to the parameter list of macro MACRO. Returns zero on success, non-zero if the parameter is a duplicate. */ -static int -save_parameter (pfile, macro, node) +bool +_cpp_save_parameter (pfile, macro, node) cpp_reader *pfile; cpp_macro *macro; cpp_hashnode *node; @@ -1255,7 +1254,7 @@ parse_params (pfile, macro) } prev_ident = 1; - if (save_parameter (pfile, macro, token->val.node)) + if (_cpp_save_parameter (pfile, macro, token->val.node)) return 0; continue; @@ -1277,7 +1276,8 @@ parse_params (pfile, macro) macro->variadic = 1; if (!prev_ident) { - save_parameter (pfile, macro, pfile->spec_nodes.n__VA_ARGS__); + _cpp_save_parameter (pfile, macro, + pfile->spec_nodes.n__VA_ARGS__); pfile->state.va_args_ok = 1; if (! CPP_OPTION (pfile, c99) && CPP_OPTION (pfile, pedantic)) cpp_error (pfile, DL_PEDWARN, |