Age | Commit message (Collapse) | Author | Files | Lines |
|
* cpplib.h (struct cpp_name): Now struct cpp_string.
(CPP_INT, CPP_FLOAT, CPP_NUMBER, CPP_COMMENT,
CPP_HEADER_NAME): Change to type S.
(struct cpp_token): Rename 'name' field to 'str'. Add 'node'
field, a cpp_hashnode *. All references to val.name updated
to use val.str or val.node as appropriate.
(struct cpp_reader): Add spec_nodes field.
(cpp_idcmp): Now cpp_ideq; takes a token * and a char *.
* cpphash.h (struct spec_nodes): New.
(enum spell_type): Reorder. Only SPELL_STRING tokens use
val.str. All references to 'spelling > SPELL_NONE' updated to
match.
(CPP_IN_SYSTEM_HEADER): Check pfile->buffer and
pfile->buffer->inc are not NULL before dereferencing them.
* cpplex.c (parse_name): Take a pointer to the current token,
plus current position and limit as args; return the new
position; don't copy the text of a name into the string
buffer, instead call cpp_lookup and store the node pointer.
If extending a token, copy out the text of the old into a
scratch buffer, append the new, look that up and store the new
node pointer. Inline.
(maybe_paste_with_next): If the result of paste is a NAME,
then look up the pasted text and store its node pointer.
(lex_line): Adjust for new parse_name interface.
Check for L"str", L'str' using spec_nodes->n_L.
(spell_token): SPELL_IDENT tokens have their spelling in
val.node->name. Handle SPELL_STRING tokens that don't have
string delimiters.
(_cpp_expand_name_space,
(can_paste): Check for L ## "str" using spec_nodes->n_L.
(cpp_get_token, special_symbol): No need to call cpp_lookup.
(cpp_idcmp): Now cpp_ideq; take a token * and a const char *;
return 1=equal 0=not, not a tristate.
* cpphash.c (var_args_str): Delete.
(find_param): Compare node fields directly.
(is__va_args__): Use CPP_PEDANTIC. Just compare
token->val.node with spec_nodes->n__VA_ARGS__.
(dump_funlike_macro): Don't use var_args_str.
* cpplib.c (_cpp_check_directive): Just walk through
spec_nodes->dirs comparing pointers.
(get_define_node, do_pragma_poison, detect_if_not_defined,
parse_ifdef): The identifier has already been looked up.
(do_ifdef, do_ifndef): parse_ifdef won't return a poisoned
node.
(do_if): Only call detect_if_not_defined at beginning of file.
(_cpp_parse_assertion): Only copy string pointers for
SPELL_STRING tokens.
(pragma_dispatch): Take a node pointer and examine its name
field.
(_cpp_init_stacks): Also initialize the spec_nodes structure.
* cppinit.c (cpp_reader_init): Call _cpp_init_stacks after
_cpp_init_macros.
(cpp_cleanup): Free pfile->spec_nodes. Call _cpp_cleanup_* in
reverse order from the corresponding _cpp_init_* routines.
* cppexp.c (parse_number, parse_charconst, parse_defined,
lex): Check val.node->type instead of calling cpp_defined.
Use spec_nodes entries where appropriate.
* fix-header.c, scan-decls.c: Update for interface changes.
From-SVN: r34926
|
|
2000-07-03 Zack Weinberg <zack@wolery.cumb.org>
* fix-header.c (struct partial_proto): Remove unnecessary fields.
(recognized_extern, recognized_function, read_scan_file):
Update for new scheme.
(check_protection): It's still a multiple include guard even
if it doesn't always trigger.
* scan-decls.c (skip_to_closing_brace, scan_decls): Update for
new scheme.
* scan.h: Declare struct cpp_token. Update prototypes.
2000-07-03 Neil Booth <neilb@earthling.net>
Zack Weinberg <zack@wolery.cumb.org>
Complete overhaul of the lexer and macro expander.
* cpphash.c (object_defn, funct_defn, push_macro_expansion,
arg, arglist, argdata, reflist, collect_objlike_expansion,
collect_funlike_expansion, collect_params,
warn_trad_stringify, trad_stringify, duplicate_arg_p, add_pat,
unsafe_chars, macarg, compare_defs, special_symbol,
scan_arguments, stringify, funlike_macroexpand,
_cpp_quote_string, monthnames): Delete.
(cpp_lookup, _cpp_free_definition, dump_funlike_macro,
_cpp_create_definition, _cpp_dump_definition,
dump_hash_helper): Adjust.
(find_param, count_params, parse_define, var_args_str,
check_macro_redefinition, save_expansion): New.
* cpplex.c (skip_block_comment, skip_line_comment, parse_name,
parse_string, output_line_command, trigraph_replace,
lex_line, cpp_push_buffer, cpp_pop_buffer, cpp_output_tokens,
cpp_scan_buffer_nooutput, cpp_scan_buffer, cpp_free_toklist,
cpp_idcmp, _cpp_get_directive_token, _cpp_init_input_buffer,
_cpp_skip_rest_of_line): Modify.
(maybe_macroexpand, skip_comment, copy_comment, skip_string,
find_position, null_warning, bump_column, expand_name_space,
pedantic_whitespace, _cpp_output_list, _cpp_slice_toklist,
_cpp_squeeze_toklist, _cpp_scan_until, _cpp_skip_hspace,
_cpp_parse_name, _cpp_lex_token, cpp_get_non_space_token,
_cpp_prescan): Delete.
(dump_param_spelling, process_directive, lex_next,
is_macro_disabled, stringify_arg, expand_context_stack,
output_token, make_string_token, alloc_number_token,
special_symbol, duplicate_token, maybe_paste_with_next,
can_paste, prevent_macro_expansion, restore_macro_expansion,
get_temp_token, release_temp_tokens, quote_string,
token_names, token_spellings, _cpp_expand_name_space,
_cpp_glue_header_name, _cpp_reserve_name_space,
digraph_spellings, trigraph_ok, skip_whitespace, save_comment,
placemarker_token, eof_token, cpp_context, macro_args,
get_raw_token, parse_arg, parse_args, save_token,
push_arg_context, push_macro_context, pop_context,
do_pop_context, free_macro_args, _cpp_get_line,
_cpp_run_directive): New.
* cpplib.c (validate_else, parse_include, push_conditional,
pass_thru_directive, read_line_number, parse_ifdef,
detect_if_not_defined, _cpp_check_directive, do_define,
do_undef, do_include, do_import, do_include_next, do_error,
do_warning, do_ident, do_pragma, pragma_dispatch, gcc_pragmas,
top_pragmas, do_pragma_gcc, do_pragma_implementation,
do_pragma_poison, do_pragma_system_header,
do_pragma_dependency, do_sccs, do_ifdef, do_ifndef, do_else,
dl_elif, do_endif, _cpp_unwind_if_stack, do_assert,
do_unassert, cpp_define, cpp_undef, cpp_assert, cpp_unassert,
cpp_defined): Update for new scheme.
(strtoul_for_line, get_define_node, dump_macro_name,
_cpp_check_linemarker, _cpp_parse_assertion): New.
(_cpp_handle_directive, do_pragma_default): Delete.
* cpphash.h (struct predicate): Now struct answer.
(enum spell_type, struct token_spelling, struct directive,
directive_handler): New.
Update prototypes. Remove unused macros.
* cpplib.h: Update prototypes. Remove unused macros,
structure definitions, and fields.
* cpperror.c (print_containing_files, v_message): Adjust.
* cppexp.c (parse_assertion, lex, parse_escape,
_cpp_parse_expr): Adjust.
* cppfiles.c (open_include_file, _cpp_execute_include,
_cpp_compare_file_date, cpp_read_file, read_include_file):
Adjust.
* cppinit.c (dump_special_to_buffer): Delete.
(append_include_chain, merge_include_chains, cpp_reader_init,
cpp_cleanup, initialize_builtins, builtin_array, cpp_start_read,
cpp_finish, handle_option, print_help): Adjust.
* cppmain.c (main): Adjust.
testsuite:
2000-07-03 Zack Weinberg <zack@wolery.cumb.org>
* testsuite/gcc.dg/cpp/19951025-1.c: Adjust regexps.
* testsuite/gcc.dg/cpp/19990703-1.c: Likewise.
* testsuite/gcc.dg/cpp/20000625-1.c: Likewise.
* testsuite/gcc.dg/cpp/20000625-2.c: Likewise.
* testsuite/gcc.dg/cpp/macro1.c,
testsuite/gcc.dg/cpp/paste1.c, testsuite/gcc.dg/cpp/paste2.c,
testsuite/gcc.dg/cpp/paste3.c, testsuite/gcc.dg/cpp/paste4.c,
testsuite/gcc.dg/cpp/strify1.c,
testsuite/gcc.dg/cpp/strify2.c: New tests.
From-SVN: r34859
|
|
* cpplib.h (CPP_POP, parse_cleanup_t): Delete.
(cpp_buffer): Remove cleanup, seen_eof, manual_pop members.
* cppfiles.c (file_cleanup): Delete.
* cpphash.c (macro_cleanup): Delete.
(collect_objlike_expansion, collect_funlike_expansion,
macarg, scan_arguments): Remove CPP_POP case.
* cpplex.c (null_cleanup): Delete.
(cpp_pop_buffer): Do the work that was done in the cleanups
here. Call _cpp_unwind_if_stack from here.
(_cpp_expand_to_buffer, cpp_scan_buffer_nooutput,
cpp_scan_buffer): Run until we see CPP_EOF and the top of
stack is the buffer _below_ the one we stacked.
(cpp_get_token): Always pop an exhausted buffer. Return
CPP_EOF unless it's a macro buffer. Don't call _cpp_handle_eof.
* cpplib.c (skip_if_group): Don't call cpp_get_token to
increment the line number.
(_cpp_handle_eof): Rename to _cpp_unwind_if_stack.
* fix-header.c (read_scan_file) [parsing getchar()]: Run until
we see CPP_EOF and the top of stack is the buffer _below_ the
one we stacked.
* scan-decls.c: Likewise.
From-SVN: r33611
|
|
* cpplex.c (cpp_idcmp): New function.
* cpplib.h: Prototype it.
* scan_decls.c (scan_decls): Use it to inspect token names.
* fix-header.c (read_scan_file): Likewise. Set system_header_p on
the file being run through the preprocessor.
(check_macro_names): Provide length of token to cpp_defined.
* Makefile.in: Remove stale warning message.
From-SVN: r33552
|
|
* cpplib.h (enum cpp_ttype): Add token types for all
punctuators. Distinguish pp-numbers from valid C numbers.
Give some tokens better names. Initialize from macro.
(struct cpp_name, cpp_token, cpp_toklist): New data
structures.
Update prototypes.
* cpplex.c (bump_column, expand_name_space,
expand_token_space, init_token_list, cpp_output_list,
_cpp_scan_line): New functions.
(output_line_command): Add third argument, new line number.
* cpphash.h: Update prototypes.
* cppexp.c, cpphash.c, cpplib.c, scan-decls.c: Update for new
token names.
From-SVN: r33289
|
|
* cppexp.c, cpphash.c, cpphash.h, cpplex.c, cpplib.c,
cpplib.h, cppmain.c, fix-header.c, scan-decls.c: Replace
cpp_token with cpp_ttype everywhere.
* cpperror.c, cpphash.c, cpplex.c, cpplib.c, scan-decls.c:
Replace cpp_buf_line_and_col with CPP_BUF_LINE and/or
CPP_BUF_COL. Line and column numbers are unsigned int, not
long.
* cpplex.c (cpp_buf_line_and_col): Delete.
* cpplib.h (struct cpp_buffer, struct cpp_reader): Change
'long lineno' to 'unsigned int lineno'.
(CPP_BUF_LINE, CPP_BUF_COL): New macros.
From-SVN: r33076
|
|
From-SVN: r32179
|
|
* builtins.c (expand_builtin_strlen): Initialize variable `icode'.
* calls.c (expand_call): Likewise for
`old_stack_arg_under_construction'.
* cpphash.c (macroexpand): Likewise for `args' and `rest_zero'.
* function.c (pad_to_arg_alignment): Likewise for `save_var' and
`save_constant'.
* gcc.c (execute): Likewise for `ut' and `st'.
* genattrtab.c (attr_rtx): Likewise for `rt_val'.
* genopinit.c (gen_insn): Likewise for `m1', `m2' and `op'.
* jump.c (jump_optimize_1): Likewise for `temp2'.
* local-alloc.c (block_alloc): Likewise for `r1'.
* loop.c (recombine_givs): Likewise for `life_start' and `life_end'.
* reg-stack.c (check_asm_stack_operands): Likewise for `clobber_reg'.
(subst_asm_stack_regs): Likewise for `clobber_reg' and `clobber_loc'.
* regmove.c (fixup_match_1): Likewise for `insn_const', `dst_node'
and `set2'.
* reload.c (find_reloads): Likewise for `goal_alternative_number'
and `goal_earlyclobber'.
* scan-decls.c (scan_decls): Likewise for `prev_id_end'.
* sdbout.c (sdbout_one_type): Likewise for `member_scl'.
* stupid.c (stupid_life_analysis): Likewise for `chain'.
* unroll.c (copy_loop_body): Likewise for `copy'.
* varasm.c (output_constructor): Likewise for `byte'.
ch:
* actions.c (update_else_range_for_int_const): Initialize
variables `lowval' and `highval'.
(update_else_range_for_range): Likewise for `low_range_val' and
`high_range_val'.
cp:
* class.c (warn_hidden): Initialize variable `fndecl'.
From-SVN: r31207
|
|
* print-tree.c (print_node, indent_to): Remove redundant prototypes.
* profile.c (instrument_arcs, output_gcov_string,
tablejump_entry_p): Add static prototypes.
(output_gcov_string): Constify a char*.
* regmove.c (replacement_quality, fixup_match_2): Add static
prototypes.
* resource.h (reg_dead_p): Add extern prototype.
* rtl.c (trim_filename): Add static prototype.
* scan-decls.c (skip_to_closing_brace): Likewise.
* stmt.c (expand_decl_cleanup_no_eh): Hide definition.
(expand_end_case): Initialize variable `range'.
(emit_case_nodes): Remove unused prototype `rtx_fn'.
* varasm.c (asm_emit_uninitialised): Add static prototype.
(asm_emit_uninitialised, assemble_variable): Mark parameter with
ATTRIBUTE_UNUSED.
From-SVN: r29784
|
|
* loop.c (insert_bct): Hide the definition of variables
`increment_direction', `compare_direction', `add_iteration' and
`loop_var_mode'.
* recog.c (mode_dependent_address_p): Mark parameter `addr' with
ATTRIBUTE_UNUSED. Mark label `win' with ATTRIBUTE_UNUSED_LABEL.
(mode_independent_operand): Mark label `lose' with
ATTRIBUTE_UNUSED_LABEL.
* regclass.c (n_occurrences): Remove prototype and definition.
* reload.c (find_reloads_address_1): Mark variable `tem' with
ATTRIBUTE_UNUSED.
* reload1.c (reload): Cast the first two arguments of `bcopy' to PTR.
* sbitmap.c (sbitmap_copy): Likewise.
* scan-decls.c (scan_decls): Hide label `handle_comma'.
* toplev.c (output_lang_identify): Mark prototype with
ATTRIBUTE_UNUSED.
* tree.c (make_node): Cast the first argument of `bzero' to PTR.
(make_tree_vec): Likewise.
(build1): Likewise.
* varasm.c (assemble_static_space): Mark variable `tem' with
ATTRIBUTE_UNUSED.
From-SVN: r24740
|
|
* alias.c (record_alias_subset): Remove ignored `&'.
(init_alias_once): Likewise.
* c-lex.c (UNGETC): Cast first argument of comma expression to void.
* config/mips/mips.c (mips_asm_file_end): Cast the result of
fwrite to `int' when comparing against one.
* config/mips/mips.h (CAN_ELIMINATE): Add parens around && within ||.
(INITIAL_ELIMINATION_OFFSET): Add braces to avoid ambiguous `else'.
* cse.c (rehash_using_reg): Change type of variable `i' to
unsigned int.
* dwarf2out.c (initial_return_save): Cast -1 to unsigned before
assigning it to one.
* except.c (duplicate_eh_handlers): Remove unused variable `tmp'.
* final.c (final_scan_insn): Likewise for variable `i'.
(output_asm_insn): Cast a char to unsigned char when used as an
array index.
* gcse.c (compute_pre_ppinout): Cast -1 to SBITMAP_ELT_TYPE when
assigning it to one.
* loop.c (strength_reduce): Remove unused variables `count' and `temp'.
* recog.c (preprocess_constraints): Cast a char to unsigned char
when used as an array index.
* regmove.c (find_matches): Likewise.
* reload1.c (calculate_needs): Add default case in switch.
(eliminate_regs_in_insn): Initialize variable `offset'.
(set_offsets_for_label): Change type of variable `i' to unsigned.
(reload_as_needed): Wrap variable `i' in macro check on
AUTO_INC_DEC || INSN_CLOBBERS_REGNO_P.
* scan-decls.c (scan_decls): Mark parameters `argc' and `argv'
with ATTRIBUTE_UNUSED. Cast variable `start_written' to size_t
when comparing against one.
* stor-layout.c (layout_decl): Cast maximum_field_alignment to
unsigned when comparing against one. Likewise for
GET_MODE_ALIGNMENT().
(layout_record): Cast record_align to int when comparing against a
signed value.
(layout_type): Cast TYPE_ALIGN() to int when comparing against a
signed value.
* tree.c (get_identifier): Cast variable `len' to unsigned when
comparing against one.
(maybe_get_identifier): Likewise
From-SVN: r24403
|
|
{ht}config.h & tm.h just before the config/...
* configure.in (host_xm_file, build_xm_file, xm_file, tm_file):
Arrange to include gansidecl.h in {ht}config.h & tm.h just
before the config/ directory headers.
(tm_file_list, host_xm_file_list, build_xm_file_list): Handle
gansidecl.h in the list of dependencies.
* Makefile.in (RTL_BASE_H): Don't depend on gansidecl.h.
(TREE_H, DEMANGLE_H, RECOG_H, REGS_H, libgcc2.a, stmp-multilib,
mbchar.o, collect2.o, pexecute.o, vfprintf.o, splay-tree.o, gcc.o,
gencheck.o, choose-temp.o, mkstemp.o, mkstemp.o, prefix.o,
dyn-string.o, cexp.o, cccp.o, cppmain.o, cpplib.o, cpperror.o,
cppexp.o, cppfiles.o, cpphash.o, cppalloc.o, scan-decls.o):
Likewise.
* cccp.c: Don't include gansidecl.h.
* cexp.y: Likewise.
* collect2.c: Likewise.
* config/c4x/c4x.c: Likewise.
* config/v850/v850.h: Likewise.
* cppalloc.c: Likewise.
* cpperror.c: Likewise.
* cppexp.c: Likewise.
* cppfiles.c: Likewise.
* cpphash.c: Likewise.
* cpplib.c: Likewise.
* cppmain.c: Likewise.
* cppulp.c: Likewise.
* demangle.h: Likewise.
* doprint.c: Likewise.
* dyn-string.c: Likewise.
* eh-common.h: Likewise.
* fix-header.c: Likewise.
* frame.c: Likewise.
* gcc.c: Likewise.
* gcov.c: Likewise.
* gen-protos.c: Likewise.
* gencheck.c: Likewise.
* halfpic.h: Likewise.
* hash.c: Likewise.
* machmode.h: Likewise.
* mbchar.c: Likewise.
* prefix.c: Likewise.
* protoize.c: Likewise.
* recog.h: Likewise.
* rtl.h: Likewise.
* scan-decls.c: Likewise.
* tree.h: Likewise.
* varray.h: Likewise.
From-SVN: r23558
|
|
* Makefile.in (print-rtl.o): Depend on bitmap.h.
(dbxout.o): Depend on toplev.h.
($(SCHED_PREFIX)sched.o): Likewise.
($(out_object_file)): Likewise for system.h and toplev.h.
(cppmain.o): Depend on gansidecl.h.
(cpplib.o): Likewise.
(cpperror.o): Likewise.
(cppexp.o): Likewise.
(cpphash.o): Likewise.
(cppalloc.o): Likewise.
(fix-header.o): Depend on cpplib.h and cpphash.h.
(scan-decls.o): Depend on gansidecl.h.
* basic-block.h (free_regset_vector): Add prototype.
* cccp.c (check_precompiled): Mark parameter `fname' with
ATTRIBUTE_UNUSED.
(do_assert): Likewise for `op' and `keyword'.
(do_unassert): Likewise.
(do_line): Likewise for `keyword'.
(do_error): Likewise for `op' and `keyword'.
(do_warning): Likewise.
(do_ident): Likewise for `keyword'.
(do_pragma): Likewise for `limit', `op' and `keyword'.
(do_sccs): Likewise.
(do_if): Likewise for `keyword'.
(do_elif): Likewise.
(do_else): Likewise.
(do_endif): Likewise.
* collect2.c (getenv): Remove redundant prototype.
(collect_exit, collect_execute, dump_file): Likewise.
(dump_list): Wrap prototype and definition in COLLECT_EXPORT_LIST.
(dump_prefix_list): Hide prototype and definition.
* sparc.c: Include toplev.h.
(intreg_operand): Mark parameter `mode' with ATTRIBUTE_UNUSED.
(symbolic_memory_operand): Likewise.
(sp64_medium_pic_operand): Likewise.
(data_segment_operand): Likewise.
(text_segment_operand): Likewise.
(splittable_symbolic_memory_operand): Likewise.
(splittable_immediate_memory_operand): Likewise.
(eq_or_neq): Likewise.
(normal_comp_operator): Likewise.
(noov_compare_op): Likewise.
(v9_regcmp_op): Likewise.
(v8plus_regcmp_op): Likewise.
(extend_op): Likewise.
(cc_arithop): Likewise.
(cc_arithopn): Likewise.
(small_int): Likewise.
(uns_small_int): Likewise.
(clobbered_register): Likewise.
(legitimize_pic_address): Likewise.
(delay_operand): Likewise.
(sparc_builtin_saveregs): Remove unused variable `stdarg'.
* sparc.h (order_regs_for_local_alloc, eligible_for_return_delay,
sparc_issue_rate, v8plus_regcmp_p): Add prototypes.
* sparc.md (cmpdi_v8plus): Add abort for default case in switch.
* cppalloc.c: Include gansidecl.h.
* cpperror.c: Include stdarg.h/varargs.h and gansidecl.h.
(cpp_file_line_for_message): Mark parameter `pfile' with
ATTRIBUTE_UNUSED.
(v_cpp_message): New function.
(cpp_message): Use it. Also convert to variable arguments.
(cpp_fatal): Likewise.
(cpp_pfatal_with_name): Constify parameter `name'.
* cppexp.c: Move gansidecl.h before cpplib.h.
* cpphash.c: Likewise.
* cpphash.h (hashf, delete_macro): Add prototypes.
* cpplib.c: Include stdarg.h/varargs.h and move gansidecl.h before
cpplib.h. Don't include errno.h.
(update_path): Add arguments to prototype.
(cpp_fatal, cpp_file_line_for_message, cpp_message, delete_macro,
cpp_print_containing_files): Remove redundant prototypes.
(cpp_hash_cleanup, add_import, append_include_chain,
make_assertion, path_include, initialize_builtins,
initialize_char_syntax, finclude, validate_else, comp_def_part,
lookup_import, redundant_include_p, is_system_include,
read_name_map, read_filename_string, open_include_file,
check_macro_name, compare_defs, compare_token_lists,
eval_if_expression, change_newlines): Add prototype arguments.
(hashf): Remove redundant prototype.
(read_token_list, free_token_list, safe_read, xcalloc, savestring,
conditional_skip, skip_if_group): Add prototype arguments.
(fdopen): Remove redundant prototype.
(do_define, do_line, do_include, do_undef, do_error, do_pragma,
do_ident, do_if, do_xifdef, do_else, do_elif, do_endif, do_sccs,
do_once, do_assert, do_unassert, do_warning): Add prototype arguments.
(struct directive): Add prototype arguments to function pointer
member `func'.
(handle_directive): Add missing arguments to call to `do_line'.
(do_include): Mark parameters `unused1' and `unused2' with
ATTRIBUTE_UNUSED.
(do_line): Likewise for `keyword' and new parameters `unused1' and
`unused2'.
(do_error): Likewise for `keyword'.
(do_warning): Likewise. Also add missing argument `pfile' in call
to cpp_pedwarn.
(do_once): Mark parameter `keyword', `unused1' and `unused2' with
ATTRIBUTE_UNUSED.
(do_ident): Likewise for `keyword', `buf' and `limit'.
(do_pragma): Likewise. Also add missing arguments in call to do_once.
(do_sccs): Mark parameter `keyword', `buf' and `limit' with
ATTRIBUTE_UNUSED.
(do_if): Likewise for `keyword'.
(do_elif): Likewise.
(eval_if_expression): Likewise for `buf' and `length'.
(do_xifdef): Likewise for `unused1' and `unused2'.
(do_else): Likewise for `keyword', `buf' and `limit'.
(do_endif): Likewise.
(parse_name): Add missing argument `pfile' in call to cpp_pedwarn.
(cpp_handle_options): Remove superfluous NULL argument in call to
cpp_fatal.
(cpp_handle_options): Likewise.
(do_assert): Mark parameter `keyword', `buf' and `limit' with
ATTRIBUTE_UNUSED.
(do_unassert): Likewise.
(cpp_print_file_and_line): Add missing argument `pfile' in call to
cpp_file_line_for_message.
(v_cpp_error): New function.
(cpp_error): Use it. Also accept variable arguments.
(v_cpp_warning): New function.
(cpp_warning): Use it. Also accept variable arguments.
(cpp_pedwarn): Accept variable arguments.
(v_cpp_error_with_line): New function
(cpp_error_with_line): Use it. Accept variable arguments.
(v_cpp_warning_with_line): New function.
(cpp_warning_with_line): Use it. Accept variable arguments. Hide
definition.
(cpp_pedwarn_with_line): Accept variable arguments.
(cpp_pedwarn_with_file_and_line): Likewise.
(cpp_error_from_errno): Constify parameter `name'. Add missing
argument `pfile' in call to cpp_file_line_for_message.
(cpp_perror_with_name): Constify parameter `name'.
* cpplib.h: Define PARAMS() in terms of PROTO().
(fatal): Remove redundant prototype.
(cpp_error, cpp_warning, cpp_pedwarn, cpp_error_with_line,
cpp_pedwarn_with_line, cpp_pedwarn_with_file_and_line,
cpp_error_from_errno, cpp_perror_with_name, cpp_pfatal_with_name,
cpp_fatal, cpp_message, cpp_pfatal_with_name,
cpp_file_line_for_message, cpp_print_containing_files): Add
arguments to prototypes.
(scan_decls, cpp_finish): Add prototypes.
* cppmain.c: Include gansidecl.h.
(main): Remove unused variable `i'.
* dbxout.c: Include toplev.h.
* demangle.h (do_tlink, collect_execute, collect_exit,
collect_wait, dump_file, file_exists): Add prototype.
* dwarf2out.c (dwarf_type_encoding_name, decl_start_label): Hide
prototype and definition.
(gen_unspecified_parameters_die): Don't assign results of call to
function new_die() to unused variable `parm_die'.
(dwarf2out_line): Mark parameter `filename' with ATTRIBUTE_UNUSED.
(dwarf2out_define): Likewise for `lineno' and `buffer'.
* dwarfout.c (output_unsigned_leb128, output_signed_leb128): Hide
prototype and definition.
(output_die): Add prototype arguments to function pointer arg.
(output_unspecified_parameters_die): Mark parameter `arg' with
ATTRIBUTE_UNUSED.
* except.c (output_exception_table_entry): Remove unused variable
`eh_entry'.
* except.h (expand_fixup_region_start, expand_fixup_region_end):
Add prototypes.
* expr.c (do_jump_by_parts_equality_rtx): Remove prototype.
* expr.h (do_jump_by_parts_equality_rtx): Add prototype.
* fix-header.c: Include stdarg.h/varargs.h, move gansidecl.h
before cpplib.h, include cpphash.h, remove redundant prototype of
cpp_fatal, don't define `const', add a prototype for `fatal'.
(cpp_file_line_for_message): Add missing arguments `pfile'.
(v_cpp_message): New function.
(cpp_message): Use it.
(v_fatal): New function.
(fatal, cpp_fatal): Use it.
(cpp_pfatal_with_name): Constify parameter `name'.
* flow.c (free_regset_vector): Remove redundant prototype.
* function.c (round_down): Wrap prototype and definition with
macro ARGS_GROW_DOWNWARD.
(record_insns): Wrap prototype and definition with
defined (HAVE_prologue) || defined (HAVE_epilogue).
* gansidecl.h (ATTRIBUTE_PRINTF_4, ATTRIBUTE_PRINTF_5): New macros.
* gen-protos.c: Include gansidecl.h.
(hashf): Don't make it static, constify parameter `name'.
* genattrtab.c (check_attr_test): Change XEXP() to XSTR() to match
specifier %s in calls to function `fatal'.
* haifa-sched.c: Include toplev.h.
(find_rgns): Remove unused variable `j'.
* integrate.c (note_modified_parmregs): Mark parameter `x' with
ATTRIBUTE_UNUSED.
(mark_stores): Likewise.
* jump.c (mark_modified_reg): Likewise.
* output.h (insn_current_reference_address): Add prototype.
(eh_frame_section): Likewise.
* print-rtl.c: Include bitmap.h.
* reload1.c (reload): Wrap variables `note' and `next' in macro
PRESERVE_DEATH_INFO_REGNO_P.
(forget_old_reloads_1): Mark parameter `ignored' with
ATTRIBUTE_UNUSED.
(choose_reload_regs): Remove unused variable `in'.
(reload_cse_invalidate_mem): Mark parameter `ignore' with
ATTRIBUTE_UNUSED.
(reload_cse_check_clobber): Likewise.
* rtl.h (expand_null_return, reg_classes_intersect_p): Add prototype.
(mark_elimination): Fix typo in prototype.
* scan-decls.c: Include gansidecl.h.
* tree.h (using_eh_for_cleanups, supports_one_only): Add prototype.
From-SVN: r19867
|
|
* Makefile.in (c-lang.o): Depend on c-tree.h, c-lex.h and toplev.h.
(c-lex.o): Depend on output.h.
(c-common.o): Likewise.
(stmt.o): Likewise.
(calls.o): Likewise.
(integrate.o): Depend on toplev.h.
(regclass.o): Depend on output.h.
(final.o): Depend on reload.h.
* c-common.c: Include output.h.
(check_format_info): Remove unused variable `integral_format'.
* c-decl.c (print_lang_decl): Mark parameters `file', `node' and
`indent' with ATTRIBUTE_UNUSED.
(print_lang_type): Likewise.
(maybe_build_cleanup): Likewise for parameter `decl'.
(copy_lang_decl): Likewise for parameter `node'.
* c-lang.c: Include c-tree.h, c-lex.h and toplev.h.
(lang_print_xnode): Mark parameters `file', `node' and `indent'
with ATTRIBUTE_UNUSED.
(lookup_interface): Likewise for parameter `arg'.
(is_class_name): Likewise.
(maybe_objc_check_decl): Likewise for parameter `decl'.
(maybe_objc_comptypes): Likewise for parameters `lhs', `rhs' and
`reflexive'.
(maybe_objc_method_name): Likewise for parameter `decl'.
(build_objc_string): Likewise for parameters `len' and `str'.
* c-lex.c: Include output.h.
* c-lex.h (position_after_white_space): Correct typo in prototype.
* c-tree.h (finish_file, c_expand_start_cond, c_expand_start_else,
c_expand_end_cond, init_iterators): Add prototypes.
* caller-save.c (set_reg_live): Mark parameters `reg' and `setter'
with ATTRIBUTE_UNUSED.
* calls.c: Include output.h.
* cccp.c (pipe_closed): Mark parameter `signo' with
ATTRIBUTE_UNUSED.
* combine.c: Move inclusion of expr.h to after insn-config.h.
* iris6.h (ASM_IDENTIFY_GCC, ASM_IDENTIFY_LANGUAGE): Don't define
as empty, rather define as ((void)0).
* sparc.c (sparc_check_64): Add braces around ambiguous `else'.
Add parentheses around assignment used as truth value.
* cplus-dem.c (squangle_mop_up): Change return type to void.
(internal_cplus_demangle): Remove unused parameter `options'.
All callers changed.
(cplus_demangle_opname): Remove function wide variable `int i' and
replace with `size_t i' at each location where it is used.
(cplus_demangle_opname): change type of `i' from int to size_t.
* cppexp.c (right_shift): Mark parameter `pfile' with
ATTRIBUTE_UNUSED.
* cpphash.c (cpp_lookup): Likewise.
(cpp_hash_cleanup): Likewise.
* cpplib.c (parse_name): Add a prototype and make it static.
(null_underflow): Mark parameter `pfile' with ATTRIBUTE_UNUSED.
(null_cleanup): Likewise for parameters `pbuf' and `pfile'.
(macro_cleanup): Likewise for parameter `pfile'.
(file_cleanup): Likewise.
* cpplib.h (cpp_reader_init, cpp_options_init, cpp_start_read,
cpp_read_check_assertion, skip_rest_of_line): Add prototypes.
* crtstuff.c (force_to_data, __CTOR_LIST__, force_to_data,
__DTOR_END__, __FRAME_END__): Mark with ATTRIBUTE_UNUSED.
* cse.c (cse_check_loop_start): Mark parameter `set' with
ATTRIBUTE_UNUSED.
* dbxout.c (flag_minimal_debug, have_used_extensions,
source_label_number): Move inside macro wrapper check against
defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO).
* dwarf2out.c (gen_entry_point_die): Hide prototype and definition.
* except.h (doing_eh): Provide prototype.
* expr.c: Move inclusion of expr.h to after insn-config.h.
* final.c: Include reload.h.
(shorten_branches): Cast the first argument of bzero to char *.
* fix-header.c (cpp_print_containing_files): Mark parameter
`pfile' with ATTRIBUTE_UNUSED.
(cpp_fatal): Likewise.
* flow.c (find_basic_blocks_1): Cast the first argument of bzero
to char *.
* genattrtab.c (make_length_attrs): Change the type of variable
`i' from int to size_t.
(zero_fn): Mark parameter `exp' with ATTRIBUTE_UNUSED.
(one_fn): Likewise.
* genextract.c (main): When generating insn-extract.c, mark
variable `junk' with ATTRIBUTE_UNUSED.
* gengenrtl.c (gencode): When generating genrtl.c, cast the first
argument of bzero to char*.
* integrate.c: Include toplev.h.
* libgcc2.c: Wrap `struct exception_table' and
`find_exception_handler' in macro DWARF2_UNWIND_INFO.
* objc/Make-lang.in (objc-act.o): Depend on toplev.h.
* objc/objc-act.c: Include toplev.h.
(lang_print_xnode): Mark parameters `file', `node' and `indent'
with ATTRIBUTE_UNUSED.
(finish_protocol): Likewise for parameter `protocol'.
* output.h (declare_weak): Add prototype.
(decode_reg_name): Don't wrap with TREE_CODE macro.
(assemble_alias): Add prototype.
* regclass.c: Include output.h.
* reload.h (reloads_conflict): Add prototype.
* rtl.h (print_rtl_single, mark_elimiation, reg_class_subset_p,
output_func_start_profiler): Add prototypes.
* rtlanal.c (reg_set_p_1): Mark parameters `x' and `pat' with
ATTRIBUTE_UNUSED.
* scan-decls.c: Include scan.h.
* scan.h (recognized_function, recognized_extern): Add prototypes.
* stmt.c: Include output.h.
* toplev.c (error_for_asm, warning_for_asm): Remove prototypes.
(output_lang_identify): Hide prototype and definition.
(float_signal): Mark parameter `signo' with ATTRIBUTE_UNUSED.
(pipe_closed): Likewise.
* toplev.h (count_error, strip_off_ending, error_for_asm,
warning_for_asm): Add prototypes.
From-SVN: r19712
|
|
* Makefile.in (cppalloc.o, cpperror.o, cppexp.o, cpphash.o,
cpplib.o, cppmain.o, fix-header.o, gcov.o, gen-protos.o,
gengenrtl.o, halfpic.o, hash.o, scan-decls.o, scan.o): Depend on
system.h.
* cpphash.c: Include config.h.
* cppalloc.c: Include system.h. Add parameters to various
function prototypes.
* cpperror.c: Likewise.
* cppexp.c: Likewise.
* cpphash.c: Likewise.
* cpplib.c: Likewise.
* cppmain.c: Likewise.
* fix-header.c: Likewise.
* gcov.c: Likewise.
* gen-protos.c: Likewise.
* gengenrtl.c: Likewise.
* halfpic.c: Likewise.
* hash.c: Likewise.
* scan-decls.c: Likewise.
* scan.c: Likewise.
From-SVN: r18911
|
|
* c-lang.c (finish_file): Wrap variable `void_list_node' with macro
test !ASM_OUTPUT_CONSTRUCTOR || !ASM_OUTPUT_DESTRUCTOR.
* calls.c (emit_call_1): Wrap variable `already_popped' with macro
test !ACCUMULATE_OUTGOING_ARGS.
* collect2.c (write_c_file_glob): Wrap function definition in
macro test !LD_INIT_SWITCH.
* combine.c (try_combine): Wrap variables `cc_use' and
`compare_mode' in macro test EXTRA_CC_MODES.
* cpplib.c (do_ident): Remove unused variable `len'.
(skip_if_group): Remove unused variables `at_beg_of_line' and
`after_ident'.
(cpp_get_token): Remove unused variable `dummy'.
* dbxout.c (scope_labelno): Move static variable definition inside
the one function scope where it is used.
(dbxout_function_end): Wrap prototype and definition in
macro test !NO_DBX_FUNCTION_END.
* dwarf2out.c (add_subscript_info): Wrap variable `dimension_number'
in macro test !MIPS_DEBUGGING_INFO.
* expr.c (expand_builtin_setjmp): Move declaration of variable `i'
into the scope where it is used. Wrap empty else-statement body
in braces.
* fix-header.c: Fix typo in comment.
(inf_skip_spaces): Cast results of INF_UNGET to (void).
(check_protection, main): Likewise.
* flow.c (find_basic_blocks_1): Remove dangling comment text.
* function.c (contains): Wrap prototype and definition in macro
test HAVE_prologue || HAVE_epilogue.
(fixup_var_refs_1): Remove unused variable `width'.
* gen-protos.c (main): Remove unused variable `optr'.
* haifa-sched.c (debug_control_flow): Remove unused variable `j'.
* libgcc2.c (__udiv_w_sdiv): Provide dummy return value of 0.
(__sjpopnthrow): Remove unused variable `jmpbuf'.
(__throw): Remove unused variable `val'.
* protoize.c: Check for a previously existing definition before
defining *_OK macros.
* scan-decls.c (scan_decls): Remove unused variable `old_written'.
From-SVN: r18654
|
|
* bitmap.c (bitmap_clear): Ensure `inline' is at the beginning
of the declaration.
* c-decl.c (finish_decl): Use parentheses around && within ||.
* rtl.c: Include stdlib.h.
(read_skip_spaces): Add parentheses around assignments used as
truth values.
(read_rtx): Initialize list_rtx.
* cppexp.c (parse_number): Use || when operands are truth values.
* alias.c (find_base_value): Add default case.
(memrefs_conflict): Likewise.
* combine.c (sets_function_arg_p): Likewise.
* genemit.c (gen_exp): Likewise.
* local-alloc.c (contains_replace_regs): Likewise.
* rtlanal.c (jmp_uses_reg_or_mem): Likewise.
* fold-const.c (fold_convert): Use "&&" for truth values.
(fold): Add default case.
* sdbout.c (sdbout_field_types): Fix typo in declaration.
(sdbout_one_type): Add default case.
* alpha.c (alpha_sa_mask): Prototype only if OPEN_VMS.
(some_operand): Add default case.
(input_operand): Likewise.
(signed_comparison_operator): Likewise.
(divmod_operator): Likewise.
(alpha_set_memflags_1): Likewise.
* reload1.c (reload_cse_simplify_operands): Ensure function
always returns a value.
* scan-decls.c (scan_decls): Likewise.
* c-lex.c (skip_white_space): Fix typo in declaraion.
* c-typeck.c (comp_target_types): Add parentheses around assignment
used as truth value.
(print_spelling): Likewise.
(constructor_implicit, constructor_result): Remove unused variables.
* collect2.c (scan_library): Protect prototype with
#ifdef SCAN_LIBRARIES.
* emit-rtl.c (find_line_note): Fix typo in declaration.
* final.c (asm_insn_count): Protect prototype with
#ifdef HAVE_ATTR_length.
* flow.c (find_auto_inc): Protect prototype with #ifdef AUTO_INC_DEC.
(try_pre_increment_1, try_pre_increment): Likewise.
* regclass.c (auto_inc_dec_reg_p): Protect prototype with
#ifdef FORBIDDEN_INC_DEC_CLASSES. Make return type explicit.
* gcov-io.h (__store_long, __write_long, __read_long): Fix
unsigned/signed comparisons.
* gcov.c (read_files): Remove unused "first_type" variable.
(scan _for_source_files): Initialize s_ptr.
(function_summary): Eliminate "%lf" formatting, use %ld for
longs.
(output_data): Initialize branch_probs and last_line_num.
Eliminate "%lf" formatting, use "%ld" for longs.
Co-Authored-By: Jeffrey A Law <law@cygnus.com>
From-SVN: r17158
|
|
From-SVN: r12390
|
|
From-SVN: r10008
|
|
From-SVN: r9965
|
|
From-SVN: r9964
|
|
declarators.
From-SVN: r9912
|
|
From-SVN: r9316
|
|
(scan_decls): After seeing an extern variable
declaration, goto new_statement to read a new token, rather
than going to handle_statement (which uses the current token).
From-SVN: r6037
|
|
Remove unused #ifdef OLD.
From-SVN: r5912
|
|
handle whitespace differently, and keep track of line number.
From-SVN: r5890
|
|
From-SVN: r5765
|
|
From-SVN: r5125
|
|
From-SVN: r4986
|