summaryrefslogtreecommitdiffstats
path: root/gcc/c-lex.c
Commit message (Collapse)AuthorAgeFilesLines
...
* * flags.h (enum debug_info_type): Remove DWARF_DEBUG.zack2004-08-251-1/+1
| | | | | | | | | | | | | | | * defaults.h (PREFERRED_DEBUGGING_TYPE): Remove check for DWARF_DEBUGGING_INFO from choice-of-definition chain; restructure using C89 features (#elif, #error). * c-lex.c, final.c, opts.c, config/cris/cris.c, config/frv/frv.c * config/sh/sh.h: Remove references to DWARF_DEBUG. * doc/invoke.texi: Remove references to DWARF version 1; clarify why -gdwarf-2<n> doesn't work. cp: * class.c, search.c: Remove references to DWARF_DEBUG. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86540 138bc75d-0d04-0410-961f-82ee72b054a4
* .:nathan2004-08-151-12/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tree.h (build_int_cst): New. (build_int_2): Remove. * tree.c (build_int_2): Remove. (build_int_cst): New. (make_vector_type, build_common_tree_nodes, build_common_tree_nodes_2): Use build_int_cst. * builtins.c (expand_builtin_prefetch, expand_builtin_strstr, expand_builtin_strpbrk, expand_builtin_fputs, build_string_literal, expand_builtin_printf, expand_builtin_sprintf, fold_builtin_lround, fold_builtin_bitop, fold_builtin_bitop, fold_builtin_isascii, fold_builtin_toascii, fold_builtin_isdigit, simplify_builtin_strstr, simplify_builtin_strpbrk, fold_builtin_fputs, simplify_builtin_sprintf): Use build_int_cst. * c-common.c (start_fname_decls, fix_string_type, c_common_nodes_and_builtins, c_init_attributes, shorten_compare): Likewise. * c-decl.c (complete_array_type, check_bitfield_type_and_width): Likewise. * c-lex.c (interpret_integer, lex_charconst): Likewise. * c-parse.in (primary): <TYPES_COMPATIBLE_P> Likewise. * c-pretty-print.c (pp_c_integer_constant): Likewise. * c-typeck.c (really_start_incremental_init, push_init_level, set_nonincremental_init_from_string): Likewise. * calls.c (load_register_parameters): Likewise. * convert.c (convert_to_pointer): Likewise. * coverage.c (coverage_counter_alloc, tree_coverage_counter_ref, build_fn_info_type, build_ctr_info_value, build_gcov_info): Likewise. * except.c (init_eh, assign_filter_values, assign_filter_values): Likewise. * expmed.c (store_fixed_bit_field, extract_bit_field, extract_fixed_bit_field, extract_split_bit_field, expand_shift, expand_mult_const, expand_mult_highpart_adjust, extract_high_half, expand_sdiv_pow2, expand_divmod, make_tree): Likewise. * expr.c (convert_move, emit_group_load, emit_group_store, expand_assignment, store_constructor, store_field, expand_expr_real_1, reduce_to_bit_field_precision): Likewise. * fold-const.c (force_fit_type, int_const_binop, fold_convert_const, invert_truthvalue, optimize_bit_field_compare, decode_field_reference, all_ones_mask_p, constant_boolean_node, fold_div_compare, fold, fold_read_from_constant_string, fold_negate_const, fold_abs_const, fold_not_const): Likewise. * function.c (assign_parm_setup_block): Likewise. * stmt.c (shift_return_value, expand_end_case_type, estimate_case_costs): Likewise. * stor-layout.c (layout_type, initialize_sizetypes, set_min_and_max_values_for_integral_type): Likewise. * tree-chrec.c (chrec_fold_multiply_poly_poly, reset_evolution_in_loop): Likewise. * tree-chrec.h (build_polynomial_chrec): Likewise. * tree-complex.c (build_replicated_const): Likewise. * tree-eh.c (honor_protect_cleanup_actions, lower_try_finally_onedest, lower_try_finally_copy, lower_try_finally_switch): Likewise. * tree-mudflap.c (mf_build_string, mx_register_decls, mudflap_register_call, mudflap_enqueue_constant): Likewise. * tree-nested.c (get_trampoline_type, get_nl_goto_field): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree-ssa-ccp.c (widen_bitfield, maybe_fold_offset_to_array_ref): Likewise. * tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Likewise. * tree-ssa-loop-niter.c (number_of_iterations_cond, loop_niter_by_eval, upper_bound_in_type, lower_bound_in_type): Likewise. * config/alpha/alpha.c (alpha_initialize_trampoline, alpha_va_start, alpha_gimplify_va_arg_1): Use build_int_cst. * config/arm/arm.c (arm_get_cookie_size): Likewise. * config/c4x/c4x.c (c4x_gimplify_va_arg_expr): Likewise. * config/i386/i386.c (ix86_va_start, ix86_gimplify_va_arg): Likewise. * config/i860/i860.c (i860_va_start): Likewise. * config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise. * config/mips/mips.c (mips_build_builtin_va_list, mips_va_start, mips_gimplify_va_arg_expr): Likewise. * config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise. * config/rs6000/rs6000.c (rs6000_va_start, rs6000_gimplify_va_arg, add_compiler_branch_island): Likewise. * config/s390/s390.c (s390_va_start): Likewise. * config/sh/sh.c (sh_va_start): Likewise. * config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start): Likewise. * config/xtensa/xtensa.c (xtensa_va_start, xtensa_gimplify_va_arg_expr): Likewise. * objc/objc-act.c (build_objc_string_object, build_objc_symtab_template, init_def_list, init_objc_symtab, init_module_descriptor, generate_static_references, build_selector_translation_table, get_proto_encoding, build_typed_selector_reference, build_selector_reference, build_next_objc_exception_stuff, build_method_prototype_list_template, generate_descriptor_table, generate_protocols, build_protocol_initializer, build_ivar_list_template, build_method_list_template, build_ivar_list_initializer, generate_ivars_list, generate_dispatch_table, generate_protocol_list, build_category_initializer, build_shared_structure_initializer, generate_shared_structures, handle_impent, generate_objc_image_info): Use build_int_cst. ada: * cuintp.c (UI_To_gnu): Use build_int_cst.. * trans.c (Exception_Handler_to_gnu_sjlj, gnat_to_gnu): Likewise. * utils.c (init_gigi_decls): Likewise. * utils2.c (build_call_raise): Likewise. cp: * call.c (convert_class_to_reference, build_user_type_conversion_1, convert_like_real, build_java_interface_fn_ref, build_special_member_call): Use build_int_cst. * class.c (build_vtbl_initializer): Likewise. * cp-gimplify.c (cp_gimplify_expr): Likewise. * cvt.c (cp_convert_to_pointer): Likewise. * decl.c (cxx_init_decl_processing, complete_array_type): Likewise. * decl2.c (start_static_initialization_or_destruction, generate_ctor_or_dtor_function): Likewise. * except.c (build_throw): Likewise. * lex.c (cxx_init): Likewise. * mangle.c (write_integer_cst): Likewise. * rtti.c (build_headof, get_tinfo_decl_dynamic, build_dynamic_cast_1, ptr_initializer, ptm_initializer, get_pseudo_ti_init): Likewise. * search.c (get_dynamic_cast_base_type): Likewise. * tree.c (build_shared_int_cst): Likewise. fortran: * trans-array.c (gfc_trans_array_constructor_value): Use build_int_cst. * trans-const.c (gfc_build_string_const, gfc_init_constants, gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise. * trans-decl.c (gfc_get_symbol_decl): Likewise. * trans-intrinsic.c (gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_len, prepare_arg_info): Likewise. * trans-io.c (add_case, set_error_locus, build_dt, transfer_expr): Likewise. * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause, gfc_trans_stop, gfc_trans_character_select): Likewise. * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise. * trans.c (gfc_trans_runtime_check): Likewise. java: * boehm.c (get_boehm_type_descriptor): Use build_int_cst. * class.c (build_utf8_ref, build_static_field_ref, make_field_value, make_method_value, get_dispatch_table, make_class_data, emit_symbol_table, emit_catch_table): Likewise. * constants.c (get_tag_node, build_ref_from_constant_pool, build_constants_constructor): Likewise. * decl.c (java_init_decl_processing): Likewise. * expr.c (build_java_array_length_access, build_newarray, expand_java_multianewarray, expand_java_pushc, expand_iinc, build_java_binop, build_field_ref, expand_java_add_case, expand_java_call, build_known_method_ref, build_invokevirtual, build_invokeinterface, build_jni_stub): Likewise. * java-gimplify.c (java_gimplify_new_array_init): Likewise. * jcf-parse.c (get_constant): Likewise. * lex.c (do_java_lex): Likewise. * parse.y (patch_binop, patch_unaryop, patch_cast, build_null_of_type, patch_newarray): Likewise. * resource.c (compile_resource_data): Likewise. * typeck.c (build_prim_array_type): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86022 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-lex.c (narrowest_unsigned_type, narrowest_signed_type): Takenathan2004-08-041-23/+35
| | | | | | | | low/high pair. Do range checking directly. (interpret_integer): Adjust. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85559 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (C_PRAGMA_H): New variable to track dependenciesbernie2004-07-261-2/+2
| | | | | | | | | | of c-pragma.h. * c-pragma.h (c_lex, c_lex_with_flags): Change returntype to enum cpp_ttype. * c-lex.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85174 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (reorder_block_def): Rename to reorder_block_def_p.bernie2004-07-251-2/+2
| | | | | | | | | | | | | | | | | | * c-common.c: Add missing casts from void * to other types. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-pragma.c: Likewise. * c-typeck.c: Likewise. * defaults.h: Likewise. * genconstants.c: Likewise. * gengtype-lex.l: Likewise. * genmodes.c: Likewise. * read-rtl.c: Likewise. * rtl.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85166 138bc75d-0d04-0410-961f-82ee72b054a4
* * bitmap.c: Use type-safe memory allocation macros from libiberty.bernie2004-07-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | * c-common.c: Likewise. * c-decl.c: Likewise. * c-lang.c: Likewise. * c-lex.c: Likewise. * c-opts.c: Likewise. * c-parse.in: Likewise. * c-typeck.c: Likewise. * genconditions.c: Likewise. * gengtype-lex.l: Likewise. * gengtype-yacc.y: Likewise. * gengtype.c: Likewise. * genmodes.c: Likewise. * gensupport.c: Likewise. * read-rtl.c: Likewise. * read-rtl.c (read_constants): Use INSERT instead of TRUE in call to htab_find_slot(). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85163 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-decl.c (groktypename, groktypename_in_param_context): Renamebernie2004-07-251-6/+6
| | | | | | | | variable typename to type_name. * c-lex.c (interpret_float): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85161 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c: Convert ATTRIBUTE_UNUSED to ARG_UNUSED in parameterbernie2004-07-251-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | lists. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-opts.c: Likewise. * c-pragma.c: Likewise. * c-typeck.c: Likewise. * gencheck.c: Likewise. * genconditions.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype.c: Likewise. * gensupport.c: Likewise. * ggc-none.c: Likewise. * langhooks.c: Likewise. * statistics.h: Likewise. * stub-objc.c: Likewise. * java/decl.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85128 138bc75d-0d04-0410-961f-82ee72b054a4
* * rtl.h (plus_constant): Delete.zack2004-07-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | (plus_constant_wide): Rename to plus_constant. (plus_constant_for_output_wide): Delete vestigial prototype. (GEN_INT): Remove unnecessary cast. * tree.h (build_int_2, size_int_type): Delete. (build_int_2_wide): Rename to build_int_2. (size_int_wide): Rename to size_int_kind. (size_int_type_wide): Rename to size_int_type. (size_int, ssize_int, bitsize_int, sbitsize_int): Use size_int_kind. Remove unnecessary cast. * tree.c (build_int_2_wide): Rename build_int_2; update comment. * explow.c (plus_constant_wide): Rename plus_constant; update comment. * fold-const.c (size_int_wide): Rename size_int_kind. Use size_int_type. (size_int_type_wide): Rename size_int_type. (int_const_binop): Use size_int_type. * c-lex.c (interpret_integer): Use build_int_2. * final.c (split_double): Remove unnecessary casts. * tree-ssa-ccp.c (maybe_fold_offset_to_array_ref): Use build_int_2. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84976 138bc75d-0d04-0410-961f-82ee72b054a4
* Conditionally compile support for --enable-mapped_location.bothner2004-06-301-0/+21
| | | | | | | | | | | | | | | | | | | | * basic-block.h (struct edge_def): Use new source_locus typedef. * c-common.c (fname_decl): Update save/clear/store of input_location. (c_do_switch_warnings): Update for USE_MAPPED_LOCATION case. * c-decl.c: Likewise. * c-dump.c (dump_stmt): Likewise. * c-gimplify.c (c-gimplify.c): Generalize using SET_EXPR_LOCATION. * c-lex.c (cb_line_change): If USE_MAPPED_LOCATION use token's src_loc to set input_location direction, rather than using linemap_lookup. (fe_file_change, cb_def_pragma): Again use source_location directly. * c-opts.c (saved_lineno): Remove static variable. (c_common_post_options, c_common_init): Don't bothner to save, clear and restore input_Location - now handled by lang_dependent_init. * function.c (init_function_start): Use new DECL_IS_BUILTIN macro. * xcoffout.c (xcoff_assign_fundamental_type_number): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83919 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/ChangeLog:aoliva2004-06-151-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | * c-pragma.h (c_lex_string_translate): Change type to int. * c-parse.in: Change all assignments of c_lex_string_translate to true and false to 1 and 0. * c-lex.c (c_lex_string_translate): Likewise. (lex_string): Convert string without translation in the -1 case. gcc/cp/ChangeLog: * parser.c: Change all assignments of c_lex_string_translate to true and false to 1 and 0. (cp_lexer_read_token): Convert type of the translated string. (cp_parser_skip_to_closing_parentheses): Preserve original value of c_lex_string_translate, and set it to -1 while running. (cp_parser_cache_group): Likewise. (cp_parser_cache_group_1): Renamed. (cp_parser_asm_operand_list): Remove redundant setting of c_lex_string_translate. (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]: Handle chained strings. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83201 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-06-01 Jerry Quinn <jlquinn@optonline.net>jlquinn2004-06-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (EXPR_H): Add insn-config.h, function.h, $(RTL_H), flags.h, $(TREE_H), $(MACHMODE_H), $(EXPR_H). (ALIAS_H, EMIT_RTL_H): New. (cselib.o): Replace EXPR_H with EMIT_RTL_H. (cfgcleanup.o): Add EMIT_RTL_H. (alias.o): Replace EXPR_H with EMIT_RTL_H and ALIAS_H. * alias.c: Replace expr.h with emit-rtl.h and alias.h. * attribs.c, c-lex.c, c-obj-common.c, c-semantics.c: Remove expr.h. * cfgcleanup.c, cselib.c: Replace expr.h with emit-rtl.h. * expr.h: Add include guard. Include function.h, rtl.h, flags.h, tree.h, machmode.h, insn-config.h, alias.h, emit-rtl.h. (get_varargs_alias_set, get_frame_alias_set, record_base_value, record_alias_subset, new_alias_set, can_address_p): Move to alias.h. (set_mem_alias_set, set_mem_align, set_mem_expr, set_mem_offset, set_mem_size): Move to emit-rtl.h. * emit-rtl.h: New. * alias.h: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82568 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-02-26 Eric Christopher <echristo@redhat.com>echristo2004-02-271-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/target-supports.exp (check-iconv-available): New function. * lib/gcc-dg.exp (dg-require-iconv): New function. Use above. * gcc.dg/charset: New directory. * gcc.dg/charset/charset.exp: New file. * gcc.dg/charset/asm1.c: Ditto. * gcc.dg/charset/asm2.c: Ditto. * gcc.dg/charset/asm3.c: Ditto. * gcc.dg/charset/asm4.c: Ditto. * gcc.dg/charset/asm5.c: Ditto. * gcc.dg/charset/attribute1.c: Ditto. * gcc.dg/charset/attribute2.c: Ditto. * gcc.dg/charset/string1.c: Ditto. * g++.dg/charset: New directory. * g++.dg/dg.exp: Add here. Special options. * g++.dg/charset/charset.exp: New file. * g++.dg/charset/asm1.c: Ditto. * g++.dg/charset/asm2.c: Ditto. * g++.dg/charset/asm3.c: Ditto. * g++.dg/charset/asm4.c: Ditto. * g++.dg/charset/attribute1.c: Ditto. * g++.dg/charset/attribute2.c: Ditto. * g++.dg/charset/extern1.cc: Ditto. * g++.dg/charset/extern2.cc: Ditto. * g++.dg/charset/string1.c: Ditto. 2004-02-26 Eric Christopher <echristo@redhat.com> * c-lex.c (c_lex_string_translate): New variable. (lex_string): Use to determine string translation. * c-pragma.h: Prototype. * c-parse.in (start_string_translation): New. Set above. (stop_string_translation): Ditto. (attribute, attribute_list, asm_def, asm_stmt, asm_operand): Use above functions. * cp/parser.c (cp_parser_declaration): Translate strings unless token is RID_EXTERN. Set c_lex_string_translate for recursive use. (cp_parser_asm_definition): Only translate argument strings to asms. (cp_parser_asm_operand_list): Ditto. (cp_parser_attribute_list): Do not translate attribute strings. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78548 138bc75d-0d04-0410-961f-82ee72b054a4
* Represent column numbers using line-map's source_location.bothner2004-02-111-20/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "next available source_location" is now managed internally by line-maps.c rather than by clients. * line-map.h (struct line_map): New field column_bits. <from_line>: Rename field to start_location. (struct line_maps): New fields highest_location and max_column_hint. (linemap_check_files_exited): New declaration. (linemap_line_start): New declaration. (linemap_add): Remove from_line parameter; use highest_location field. (SOURCE_LINE, LAST_SOURCE_LINE): Modify to use column_bits. (SOURCE_COLUMN, LAST_SOURCE_LINE_LOCATION): New macros. (CURRENT_LINE_MAP): Remove macro. (linemap_position_for_column): New inline function. * line-map.c (linemap_init): Clear new fields. (linemap_check_files_exited): New function, extracted from ... (linemap_free): Use linemap_check_files_exited. (linemap_add): Remove from_line parameter. Various updates. (linemap_line_start): New function. (linemap_lookeup): Update for new field names. * cpphash.h (struct cpp_reader) <map>: Field removed. Because linemap_position_for_column may unpredictably change the current map, it is cleaner and simpler for us to not cache it in cpp_reader. (struct cpp_buffer): New sysp field. Changed warned_cplusplus_comments and from_stage3 to bitfields. * cppinit.c (cpp_read_min_file): pfile->map no longer exists. * cpplib.c (do_line, do_linemarker, _cpp_do_file_change): Get current map using linemap_lookup. (do_linemarker): Also set buffer's sysp field. (destringize_and_run): No longer need to decrement current line. * cppfiles.c (_cpp_stack_file): Set sysp from and in buffer. (search_path_head, open_file_failed): Use buffer's sysp. (cpp_make_system_header): Get current map using linemap_lookup. Also set buffer's sysp flag. * cppmacro.c (_cpp_builtin_macro_text): Likewise use linemap_lookup. * cpphash.h (CPP_INCREMENT_LINE): New macro. (struct cpp_buffer): Moved fields saved_cur, saved_rlimit to ... (struct cpp_reader): ... and adding saved_line_base field. * cpptrad.c (_cpp_overlay_buffer, _cpp_remove_overlay): Update accordingly. Don't adjust line. (_cpp_scan_out_logical_line): Use CPP_INCREMENT_LINE. * cpphash.c (CPP_IN_SYSTEM_HEADER): Replaced macro by ... (cpp_in_system_header): ... new inline function, using buffer's sysp. * cpperror.c (_cpp_begin_message): Update to use cpp_in_system_header. * cpplex.c (_cpp_lex_direct): Likewise. * cppmacro.c (_cpp_builtin_macro_text): Likewise. * cppmacro.c (_cpp_create_definition): Use buffer's sysp field. * cpplib.h (struct cpp_token): Rename line field to src_loc. Remove col field as it is now subsumed by src_loc. * cpperror.c: Update various field, parameter, and macro names. (print_location): If col==0, try SOURCE_COLUMN of line. (cpp_error): Use cur_token's src_loc field, rather than line+col. * cpplib.c (do_diagnostic): Token's src_loc fields replaces line+col. * cpplex.c (_cpp_process_line_notes, _cpp_lex_direct, _cpp_skip_block_comment): Use CPP_INCREMENT_LINE. (_cpp_temp_token): Replace cpp_token's line+col fields by src_loc. (_cpp_get_fresh_line): Don't need to adjust line for missing newline. (_cpp_lex_direct): Use linemap_position_for_column. * c-ppoutput.c (maybe_print_line, print_line): Don't take map parameter. Instead get it from the line_table global. Adjust callers. (print): Remove map field. Replace line field to src_line. (init_pp_output, account_for_newlines, maybe_print_line): Adjust. (cb_line_change): Use SOURCE_COLUMN. Minor optimizations. (pp_file_change): Use MAIN_FILE_P since we cannot checked print.map. Use LAST_SOURCE_LINE_LOCATION to "catch up" after #include. * cpptrad.c (copy_comment): Rename variable. * c-lex.c (map): Remove static variable, for same reason we removed cpp_reader's map field. (cb_line_change, cb_def_pragma, cb_define, cb_undef): Hence we need to call linemap_lookup. (cb_line_change): Token's line field replaced by src_loc. (fe_file_change): Use MAINFILE_P and LAST_SOURCE_LINE macros. Don't save new_map. * cpphash.h, cpperror.c, cpplib.h: Some renames of fileline to source_location. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77663 138bc75d-0d04-0410-961f-82ee72b054a4
* Partially revert/redo 2003-10-01 change; fix -fworking-directory.bothner2004-02-051-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-ppoutput.c (pp_dir_change): New function. * c-common.h (pp_dir_change): New declaration. * cpplib.h (struct cpp_options): Remove working_directory field. * cppinit.c (cpp_find_main_file, cpp_push_main_file): Merge back to (cpp_read_main_file): as before 10-01. Call _cpp_stack_file. Don't handle -fworking_directory here, but in c_common_post_options. (read_original_directory): Don't back up when done. Don't clear no-longer used working_directory flag. * cpplib.h: Update declarations to match. * c-lex.c (cb_dir_change): Move to c-opts.c. (init_c_lex): Don't set dir_change callback here, since we want to set it even if flag_preprocess_only. * c-opts.c (cb_dir_change): Function moved from c-lex.c. (c_common_post_options): Set dir_change callback. Call pp_dir_change if approporiate. (finish_options): Don't call cpp_find_main_file here. Hence remove unneeded parameter and result. Do LC_RENAME for <built-in>. (c_common_post_options): Call cpp_read_main_file here instead. (c_common_init): Update accordingly. (push_command_line_include): Don't cpp_push_main_file. Do LC_RENAME rather than LC_LEASE to get back to main file. Compared to pre-10-01 version, inline cpp_rename_to_main_file. (c_common_parse_file): Call cpp_read_main_file for subsequent main files, but call finish_options for all files. * c-opts.c (sanitize_cpp_opts): Don't set cpp_opts->working_directory. * fix-header.c (read_scan_file): Call cpp_read_main_file instead of cpp_find_main_file + cpp_push_main_file. * c-lex.c (fe_file_change): Don't set main_input_filename here. * opts.c (handle_options): Only set main_input_filename first time. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77303 138bc75d-0d04-0410-961f-82ee72b054a4
* alloc-pool.c, c-lex.c, c-pragma.h, c-semantics.c, cfghooks.c,kazu2004-01-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cfghooks.h, cfglayout.c, cfgloopmanip.c, debug.c, debug.h, flow.c, genextract.c, ggc-common.c, ggc-page.c, ggc.h, ifcvt.c, jump.c, loop-unswitch.c, timevar.c, timevar.def, tree-optimize.c, vmsdbgout.c, config/fp-bit.c, config/alpha/alpha.c, config/alpha/alpha.h, config/alpha/alpha.md, config/alpha/unicosmk.h, config/alpha/vms.h, config/arm/linux-elf.h, config/avr/avr.c, config/c4x/c4x-protos.h, config/c4x/c4x.md, config/d30v/d30v.h, config/frv/frv.md, config/frv/frvbegin.c, config/frv/frvend.c, config/i386/cygming.h, config/i386/djgpp.h, config/i386/emmintrin.h, config/i386/gthr-win32.c, config/i386/i386-interix.h, config/i386/i386-protos.h, config/i386/openbsd.h, config/i386/winnt.c, config/i386/xm-mingw32.h, config/i386/xmmintrin.h, config/ia64/ia64.md, config/iq2000/iq2000.md, config/m32r/m32r.md, config/m68k/m68k.md, config/mcore/mcore-elf.h, config/mcore/mcore.md, config/mips/elf.h, config/mips/elf64.h, config/mips/iris5gas.h, config/mips/iris6.h, config/mips/iris6gas.h, config/mips/linux.h, config/mips/mips.md, config/mips/netbsd.h, config/mips/openbsd.h, config/mips/windiss.h, config/pa/fptr.c, config/rs6000/aix.h, config/rs6000/altivec.h, config/rs6000/darwin.h, config/rs6000/xcoff.h, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/netbsd-elf.h, config/sh/sh.h, config/sh/vxworks.h, config/sparc/sol2.h: Update copyright. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77018 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-lex.c (c_lex): Rename to...giovannibajo2004-01-291-1/+9
| | | | | | | | | (c_lex_with_flags): Add new parameter to get CPP flags. (c_lex): Thunk to c_lex_with_flags while keeping the old interface. * c-pragma.h (c_lex_with_flags): Declare. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76844 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-lex.c (fe_file_change): Handle a NULL new_map.bothner2003-10-021-0/+6
| | | | | | | | * fix-header.c (cb_file_change): Likewise. * c-ppoutput.c (pp_file_change): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72011 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-lex.c (src_line): Remove unneeded static variable.bothner2003-10-021-9/+1
| | | | | | | | | (cb_line_change): Set input_line directly, instead of src_line. (get_non_padding_token): We no longer need to compensate for the "horrible things" the C++ front-end does with the current line number, git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72010 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-ppoutput.c (cb_line_change): Revert 2003-08-04's change.aoliva2003-09-141-1/+4
| | | | | | | | * c-lex.c (cb_line_change): Skip line changing whenever c-ppoutput.c would. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71381 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-lex.c (fe_file_change): Don't transform to_line with SOURCE_LINE.bothner2003-09-121-4/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71328 138bc75d-0d04-0410-961f-82ee72b054a4
* * c.opt: Introduce -fworking-directory.aoliva2003-08-051-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/cpp.texi, doc/invoke.texi, doc/cppopts.texi: Document it. * c-common.h (flag_working_directory): Declare. * c-common.c (flag_working_directory): Define. * c-opts.c (c_common_handle_options): Set it. (sanitize_cpp_opts): Set... * cpplib.h (struct cpp_options): ... working_directory option. (struct cpp_callbacks): Add dir_change. * cppinit.c (read_original_filename): Call... (read_original_directory): New. Look for # 1 "directory//" and process it. (cpp_read_main_file): Call dir_change callback if working_directory option is set. * gcc.c (cpp_unique_options): Pass -g*. * c-lex.c (cb_dir_change): New. (init_c_lex): Set dir_change callback. * toplev.c (src_pwd): New static variable. (set_src_pwd, get_src_pwd): New functions. * toplev.h (get_src_pwd, set_src_pwd): Declare. * dbxout.c (dbxout_init): Call get_src_pwd() instead of getpwd(). * dwarf2out.c (gen_compile_unit_die): Likewise. * dwarfout.c (output_compile_unit_die, dwarfout_init): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70189 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-07-29 Geoffrey Keating <geoffk@apple.com>geoffk2003-07-291-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-common.c (allow_pch): Remove. * c-common.h (allow_pch): Remove. (c_common_no_more_pch): Declare. * c-lex.c (c_lex): Call c_common_no_more_pch when appropriate. * c-pch.c: Include hosthooks.h. (c_common_valid_pch): Don't check allow_pch. (c_common_read_pch): Clear valid_pch to prevent reading PCH files. (c_common_no_more_pch): New. * ggc-common.c: Include hosthooks.h. (gt_pch_save): Call gt_pch_get_address. (gt_pch_restore): Call gt_pch_use_address. * hooks.c (hook_voidp_size_t_null): New. (hook_bool_voidp_size_t_false): New. * hooks.h (hook_voidp_size_t_null): New. (hook_bool_voidp_size_t_false): New. * hosthooks-def.h (HOST_HOOKS_GT_PCH_GET_ADDRESS): New. (HOST_HOOKS_GT_PCH_USE_ADDRESS): New. (HOST_HOOKS_INITIALIZER): Add HOST_HOOKS_GT_PCH_GET_ADDRESS, HOST_HOOKS_GT_PCH_USE_ADDRESS. * hosthooks.h (struct host_hooks): Add gt_pch_get_address, gt_pch_use_address. * doc/hostconfig.texi (Host Common): Document HOST_HOOKS_GT_PCH_GET_ADDRESS, HOST_HOOKS_GT_PCH_USE_ADDRESS. * Makefile.in (c-pch.o): Depend on hosthooks.h. (ggc-common.o): Likewise. * config/rs6000/host-darwin.c (HOST_HOOKS_GT_PCH_GET_ADDRESS): Define. (HOST_HOOKS_GT_PCH_USE_ADDRESS): Define. (pch_address_space): New. (darwin_rs6000_gt_pch_get_address): New. (darwin_rs6000_gt_pch_use_address): New. Index: cp/ChangeLog 2003-07-29 Geoffrey Keating <geoffk@apple.com> * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead of setting valid_pch by hand. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69944 138bc75d-0d04-0410-961f-82ee72b054a4
* * alias.c alloc-pool.c bitmap.c bitmap.h bt-load.c builtins.cghazi2003-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | c-common.c c-decl.c c-incpath.c c-lex.c c-opts.c c-parse.in c-pragma.c c-typeck.c calls.c cfg.c cfganal.c cfgloop.c cfgrtl.c collect2.c combine.c conflict.c coverage.c cppexp.c cppfiles.c cpphash.c cppinit.c cpplex.c cpplib.c cppmacro.c cppspec.c cpptrad.c cse.c cselib.c dbxout.c defaults.h df.c dominance.c dwarf2out.c dwarfout.c emit-rtl.c except.c expmed.c expr.c final.c fix-header.c flow.c fold-const.c function.c gcc.c gccspec.c gcov.c gcse.c genattr.c genattrtab.c genautomata.c genconditions.c genemit.c genextract.c genoutput.c genrecog.c gensupport.c ggc-page.c ggc-simple.c global.c graph.c haifa-sched.c hashtable.c integrate.c jump.c langhooks.c lcm.c line-map.c local-alloc.c loop.c mips-tdump.c mips-tfile.c mkdeps.c optabs.c params.c postreload.c prefix.c print-tree.c protoize.c ra-build.c ra-colorize.c ra-rewrite.c ra.c recog.c reg-stack.c regclass.c regmove.c regrename.c reload.c reload1.c reorg.c resource.c sbitmap.c sched-deps.c sched-rgn.c sched-vis.c sdbout.c simplify-rtx.c ssa-ccp.c ssa.c stmt.c stor-layout.c timevar.c tlink.c toplev.c tree-dump.c tree.c unroll.c unwind-dw2-fde.c varasm.c varray.c vmsdbgout.c xcoffout.c: Remove unnecessary casts. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69587 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-lex.c (cb_ident): Cast cstr.text to const char *.ro2003-07-091-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69138 138bc75d-0d04-0410-961f-82ee72b054a4
* * cpplib.h (CPP_AT_NAME, CPP_OBJC_STRING): New token types.zack2003-07-051-63/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (struct cpp_options): Add narrow_charset, wide_charset, bytes_big_endian fields. Remove EBCDIC field. (cpp_init_iconv, cpp_interpret_string): New external interfaces. * cpphash.h: Include <iconv.h> if we have it, otherwise provide a dummy definition of iconv_t. (struct cpp_reader): Add narrow_cset_desc and wide_cset_desc fields. (_cpp_valid_ucn): Update prototype. (_cpp_destroy_iconv): New prototype. * doc/cpp.texi: Document character set handling. * doc/cppopts.texi: Document -fexec-charset= and -fexec-wide-charset=. * doc/extend.texi: Delete entire section on multiline strings. Rewrite section on __FUNCTION__ etc now that these are variables in C. * cppucnid.tab, cppucnid.pl: New files. * cppucnid.h: New generated file. * cppcharset.c: Include cppucnid.h. Lots of commentary added. (iconv_open, iconv, iconv_close): Provide dummy definitions if !HAVE_ICONV. (SOURCE_CHARSET, struct strbuf, init_iconv_desc, cpp_init_iconv, _cpp_destroy_iconv, convert_cset, width_to_mask, convert_ucn, emit_numeric_escape, convert_hex, convert_oct, convert_escape, cpp_interpret_string, narrow_str_to_charconst, wide_str_to_charconst): New. (ucn_valid_in_identifier): Use a binary search through the ucnranges table defined in cppucnid.h, not a long chain of if statements. (_cpp_valid_ucn): Add a limit pointer. Downgrade "universal character names are only valid in C++ and C99" to a warning. Issue the "meaning of \[uU] is different in traditional C" warning here. Take care not to let iconv see an invalid UCS value if we get a malformed UCN. Issue an error if we don't have iconv. (cpp_interpret_charconst): Moved here from cpplex.c. Use cpp_interpret_string to do the heavy lifting. * cppinit.c (cpp_create_reader): Initialize bytes_big_endian, narrow_charset, wide_charset fields of options structure. (cpp_destroy): Call _cpp_destroy_iconv. * cpplex.c (forms_identifier_p): Adjust call to _cpp_valid_ucn. (maybe_read_ucn, hex_digit_value, cpp_parse_escape): Delete. (cpp_interpret_charconst): Moved to cppcharset.c. * cpplib.c (dequote_string): Delete. (interpret_string_notranslate): New. (do_line, do_linemarker): Use interpret_string_notranslate. * Makefile.in (cppcharset.o): Depend on cppucnid.h. * c-common.c (fname_string, combine_strings): Delete. * c-common.h (fname_string, combine_strings): Delete prototypes. * c-lex.c (ignore_escape_flag): Delete. (cb_ident): Use cpp_interpret_string, not lex_string. (get_nonpadding_token): New function. (c_lex): Handle Objective-C @-prefixed identifiers and strings here. Adjust calls to lex_string. Don't write *value twice. (lex_string): Now handles string constant concatenation. Most of the work handed off to cpp_interpret_string. Call fix_string_type here. * c-parse.in (STRING_FUNC_NAME, VAR_FUNC_NAME): Replace with FUNC_NAME, throughout. (OBJC_STRING): New token type. (primary:STRING): No need to call fix_string_type here. (primary:objc_string): Make that OBJC_STRING. (objc_string nonterminal): Delete. (yylexname): Delete code to handle fake string constants. (yylexstring): Delete entirely. (_yylex): Handle CPP_AT_NAME and CPP_OBJC_STRING. No need to handle CPP_ATSIGN. * c.opt (-fexec-charset=, -fwide-exec-charset=): New options. * c-opts.c (missing_arg, c_common_handle_option): Handle OPT_fexec_charset_ and OPT_fwide_exec_charset_. (c_common_init): Set cpp_opts->bytes_big_endian, not cpp_opts->EBCDIC. Call cpp_init_iconv. (print_help): Document -fexec-charset= and -fexec-wide-charset=. (TARGET_EBCDIC): Delete default definition. * objc/objc-act.c (build_objc_string_object): No need to handle string constant concatenation. cp: * parser.c (cp_lexer_read_token): No need to handle string constant concatenation. testsuite: * gcc.c-torture/execute/wchar_t-1.x: New file; XFAIL wchar_t-1.c everywhere. * gcc.dg/concat.c: Concatenation of string constants with __FUNCTION__ / __PRETTY_FUNCTION__ is now a hard error. * gcc.dg/wtr-strcat-1.c: Loosen dg-warning regexp. * gcc.dg/cpp/escape-2.c: Use wide character constants where necessary to avoid multi-character character constant warning. * gcc.dg/cpp/escape.c: Likewise. * gcc.dg/cpp/ucs.c: Likewise. Remove backslashes from dg-bogus comments, as they confuse Tcl. Fix a typo. libstdc++-v3: * testsuite/22_locale/collate/compare/wchar_t/2.cc * testsuite/22_locale/collate/compare/wchar_t/wrapped_env.cc * testsuite/22_locale/collate/compare/wchar_t/wrapped_locale.cc * testsuite/22_locale/collate/hash/wchar_t/2.cc * testsuite/22_locale/collate/hash/wchar_t/wrapped_env.cc * testsuite/22_locale/collate/hash/wchar_t/wrapped_locale.cc * testsuite/22_locale/collate/transform/wchar_t/2.cc * testsuite/22_locale/collate/transform/wchar_t/wrapped_env.cc * testsuite/22_locale/collate/transform/wchar_t/wrapped_locale.cc: XFAIL on all targets. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68952 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c (enum c_language_kind, flag_objc): Remove.neil2003-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (fix_string_type, check_case_value, c_common_nodes_and_builtins, c_add_case_label, finish_label_addr_expr, boolean_increment): Use c_dialect_ macros. * c-common.h (enum c_language_kind): Extend. (c_dialect_cxx, c_dialect_objc): New. (flag_objc): Remove. (c_common_init_options): Update prototype. * c-cppbuiltin.c (define__GNUC__, c_cpp_builtins): Use c_dialect_ macros. * c-decl.c (finsih_decl, grokfield, finish_struct): Use c_dialect_ macros. * c-format.c (C_STD_VER, C_STD_NAME): Similarly. * c-lang.c (c_init_options): Remove. (c_language): Define. (LANG_HOOKS_INIT_OPTIONS): Use common hook. * c-lex.c (lex_charconst): Use c_dialect_cxx(). * c-opts.c (lang_flags): Make function-local. (c_common_init_options): Use c_dialect_ macros. Handle C++ diagnostic requirements. (c_common_handle_option, c_common_post_options): Use flag_cxx. * c-parse.in (init_reswords): Use c_dialect_objc (). * c-pch.c (get_ident): Use c_language. * c-pretty-print.c (pp_c_bool_literal): Use c_dialect_ macros. * c-typeck.c (comptypes, build_c_cast): Similarly. * objc/objc-lang.c (c_language): Define. (LANG_HOOKS_INIT_OPTIONS): Use common hook. (objc_init_options): Remove. cp: * Make-lang.in: Update. * cp-lang.c (c_language): Define. (LANG_HOOKS_INIT_OPTIONS): Use common hook. * cp-tree.h (cxx_init_options): Remove. * lex.c: Don't include diagnostic.h. (cxx_init_options): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68734 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-lex.c: Convert to ISO C90.aj2003-06-221-69/+40
| | | | | | | | | | | | | | | | * c-objc-common.c: Likewise. * c-opts.c: Likewise. * c-pch.c: Likewise. * c-ppoutput.c: Likewise. * c-pragma.h: Likewise. * c-pretty-print.c: Likewise. * c-pretty-print.h: Likewise. * c-semantics.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68327 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-tree.h: Remove declaration of poplevel.aj2003-06-191-3/+0
| | | | | | | | | | | | | | | | | | | | | * tree.h: Remove declaration of approx_sqrt. * c-lex.c: Remove redundant declaration of asm_out_file. * flags.h: Remove declaration of warn_unknown_pragma and main_input_filename. * rtl.h: Remove functions from fold-const.c since they're already declared in tree.h. * regs.h: Remove redundant declaration of reg_names. cp: * cp-tree.h: Remove duplicated declarations. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68193 138bc75d-0d04-0410-961f-82ee72b054a4
* * input.h (lineno): Rename to ...nathan2003-05-011-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (input_line): ... here. * tree.h (lineno): Rename to ... (input_line): ... here. * scan.h (lineno): Rename to ... (input_line): ... here. * toplev.c (lineno): Rename to ... (input_line): ... here. (push_srcloc, pop_srcloc): Rename lineno to input_line. * c-common.c (c_expand_start_cond, fname_decl): Likewise. * c-decl.c (poplevel, pop_label_level, lookup_label, lookup_tag, store_parm_decls, c_expand_body_1): Likewise. * c-errors.c (pedwarn_c99): Likewise. * c-format.c (status_warning): Likewise. * c-lex.c (fe_file_change, cb_def_pragma, c_lex): Likewise. * c-opts.c (c_common_post_options, c_common_parse_file): Likewise. * c-parse.in (save_filename, maybe_type_qual, ifc): Likwise. * c-semantics.c (finish_stmt_tree, build_stmt, emit_local_var, gentrtl_goto_stmt, genrtl_expr_stmt_value, genrtl_decl_stmt, genrtl_if_stmt, genrtl_while_stmt, genrtl_do_stmt, genrtl_return_stmt, genrtl_for_stmt, build_break_stmt, build_continue_stmt, genrtl_switch_stmt, genrtl_asm_stmt, prep_stmt, find_reachable_label, expand_unreachable_stmt): Likewise. * coverage.c (create_coverage): Likewise. * diagnostic.c (pedwarn, sorry, error, fatal_error, internal_error, warning, diagnostic_report_current_module, inform): Likewise. * expr.c (expand_expr): Likewise. * integrate.c (expand_inline_function, output_inline_function): Likewise. * rtl-error.c (file_and_line_for_asm): Likewise. * tree-inline.c (find_alloca_call, find_builtin_longjmp_call, walk_tree): Likewise. * tree.c (make_node): Likewise. * ada, cp, f, java, objc, treelang: Likewise. ada * trans.c (build_unit_elab, set_lineno): Rename lineno to input_line. * utils.c (pushdecl, create_label_decl, begin_subprog_body, end_subprog_body): Likewise. * utils2.c (build_call_raise): Likewise. cp * class.c (finish_struct): Rename lineno to input_line. * decl.c (push_binding_level, pop_binding_level, suspend_binding_level, resume_binding_level, make_label_decl, use_label, start_function): Likewise. * decl2.c (warn_if_unknown_interface, start_static_initialization_or_destruction, generate_ctor_or_dtor_function, finish_file): Likewise. * error.c (cp_line_of, print_instantiation_full_context, print_instantiation_context): Likewise. * except.c (check_handlers_1, check_handlers): Likewise. * init.c (create_temporary_var): Likewise. * method.c (use_thunk, synthesize_method): Likewise. * parser.c (cp_lexer_set_source_position_from_token, cp_lexer_get_preprocessor_token): Likewise. * pt.c (push_tinst_level, pop_tinst_level, tsubst_friend_function, instantiate_class_template, tsubst_decl, tsubst, tsubst_expr, instantiate_decl): Likewise. * semantics.c (genrtl_try_block, finish_label_stmt, begin_class_definition, expand_body, genrtl_finish_function): Likewise. * tree.c (build_min_nt, build_min): Likewise. f * ansify.c (die_unless): Rename lineno to input_line. * com.c (ffecom_subscript_check_, ffecom_do_entry_, ffecom_gen_sfuncdef_, ffecom_start_progunit_, ffecom_sym_transform_, ffecom_sym_transform_assign_, bison_rule_pushlevel_, bison_rule_compstmt_, finish_function, store_parm_decls): Likewise. * intrin.c (ffeintrin_fulfill_generic): Likewise. * lex.c (ffelex_hash_, ffelex_include_, ffelex_next_line_, ffelex_file_fixed, ffelex_file_free): Likewise. * std.c (ffestd_exec_end): Likewise. * ste.c (ffeste_emit_line_note_, ffeste_start_block_, ffeste_start_stmt_): Likewise. * ste.h (ffeste_filelinenum, ffeste_set_line): Likewise. java * lex.h (lineno): Rename to ... (input_line): ... here * parse-scan.y (lineno): Rename to ... (input_line): ... here. (reset_report): Rename lineno to input_line. * check-init.c (check_init): Likewise. * class.c (push_class): Likewise. * decl.c (complete_start_java_method, end_java_method): Likewise. * expr.c (expand_byte_code): Likewise. * jcf-parse.c (give_name_to_class, parse_class_file): Likewise. * jcf-write.c (generate_bytecode_insns): Likewise. * lex.c (java_init_lex, java_allocate_new_line, do_java_lex): Likewise. * parse.h (YYNOT_TWICE): Likewise. * parse.y (empty_statement, expression_statement, java_pop_parser_context, java_parser_context_save_global, yyerror, register_fields, method_header, safe_layout_class, find_in_imports_on_demand, create_artificial_method, source_end_java_method, start_complete_expand_method, build_thisn_assign, java_complete_lhs, maybe_absorb_scoping_block): Likewise. objc * objc-act.c (objc_init): Rename lineno to input_line. (build_module_descriptor, build_selector_translation_table, build_protocol_template, build_method_prototype_list_template, build_category_template, build_selector_table, build_class_template, build_super_template, build_ivar_template, build_ivar_list_template, build_method_list_template, build_method_template, add_instance_variable): Likewise. treelang * tree1.c (treelang_init): Rename lineno to input_line. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66333 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (c-lex.o, LIBCPP_OBJS, cpplex.o): Update.neil2003-04-231-56/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-lex.c (MULTIBYTE_CHARS): Remove conditionals. (lex_string): Take cpp_string with full spelling. (cb_ident): Update. (c_lex): Update diagnostics. * cpplex.c (SPELL_NUMBER, SPELL_STRING): Combine into SPELL_LITERAL. (create_literal): New. (lex_string): Unterminated literals have type CPP_OTHER. (_cpp_lex_direct): Update calls to lex_string. Use create_literal for CPP_OTHER. (cpp_token_len, cpp_spell_token, cpp_output_token): Simplify. (_cpp_equiv_tokens, cpp_interpret_charconst): Update. * cpplib.c (parse_include, do_line, do_linemarker, destringize_and_run): Update for token storing full spelling. * cpplib.h: Update token spelling types. * cppmacro.c (stringify_arg, check_trad_stringification): Update for token storing full spelling. cp: * Make-lang.in (lex.o): Remove mbchar.h. * lex.c (MULTIBYTE_CHARS): Lose. * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled in c-lex.c. testsuite: * gcc.dg/cpp/include2.c: Update. * gcc.dg/cpp/multiline-2.c: New. * gcc.dg/cpp/multiline.c: Update. * gcc.dg/cpp/strify2.c: Update. * gcc.dg/cpp/trad/literals-2.c: Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66019 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-lex.c (c_lex): Handle CPP_OTHER differently.neil2003-04-221-5/+2
| | | | | | | | | | | | | | | * cppexp.c (_cpp_parse_expr): Similarly. * cpplex.c (SPELL_CHAR): Remove. (_cpp_lex_direct): Stray chars are saved as byte strings. (cpp_spell_token, cpp_output_token, _cpp_equiv_token): Don't handle SPELL_CHAR. (cpp_avoid_paste): Update handling of CPP_OTHER. * cpplib.h: Spell CPP_OTHER like a number. (struct cpp_token): Remove member c. * cppmacro.c (stringify_arg): Update handling of CPP_OTHER. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65951 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (LIBCPP_OBJS): Add cppcharset.o.neil2003-04-201-309/+0
| | | | | | | | | | | | | | | | | | | | | (cppcharset.o): New target. * c-lex.c (is_extended_char): Move to cppcharset.c. (utf8_extend_token): Delete. * cppcharset.c: New file. * cpphash.h (_cpp_valid_ucn): New. * cpplex.c (lex_identifier): Update prototype. (continues_identifier_p): Rename forms_identifier_p. Handle UCN escapes. (maybe_read_ucs): Rename maybe_read_ucn. Update to use code in cppcharset.c. (lex_number, lex_identifier, cpp_parse_escape): Update. (_cpp_lex_direct): Update to handle UCNs. (cpp_avoid_paste): Don't paste to form a UCN. testsuite: * ucs.c: Update diagnostic messages. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65845 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in: Update.neil2003-03-151-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-common.h (cb_register_builtins): Rename c_cpp_builtins. * c-lex.c (init_c_lex): Register builtins hook is dead. * c-opts.c (COMMAND_LINE_OPTIONS, missing_arg): Handle -A, -D and -U. (c_common_decode_option): Don't call cpp_handle_option. Handle -A, -D and -U. (handle_deferred_opts): Simplify. (finish_options): Define builtins and command line macros. * c-ppoutput.c (init_pp_output): Register builtins hook is dead. * cppinit.c: Don't include intl.h. (init_builtins): Rename cpp_init_builtins. No hook to call. (init_library): Don't need to sort options. (cpp_create_reader): Don't set pending. (cpp_destroy): Don't free pending. (struct pending_option, cl_directive_handler, struct cpp_pending, APPEND, free_chain, new_pending_directive, parse_option, opt_comp, cpp_finish_options, COMMAND_LINE_OPTIONS, DEF_OPT, struct cl_option, cl_options, cpp_handle_option): Remove. * cpplib.h (struct cpp_pending, register_builtins, cpp_handle_option, cpp_finish_options): Remove. (cpp_init_builtins): New. * fix-header.c (read_scan_file): Update to handle -D. Fix handling of -I. Replace call to cpp_finish_options. cp: * Make-lang.in: Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64398 138bc75d-0d04-0410-961f-82ee72b054a4
* /home/neil/diffs/include.logneil2003-03-141-29/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64373 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (c-ppoutput.o): Update.neil2003-03-061-6/+1
| | | | | | | | | | | | | | | | | | | | * c-common.h (init_pp_output): New. (preprocess_file): Update. * c-lex.c (init_c_lex): Move mbchar initialization to cpplib. Register builtins. * c-opts.c (c_common_init): Call init_pp_output if preprocessing. Make call to cpp_read_main_file common to whether preprocessing or not. Don't register builtins. * c-ppoutput.c: Include c-pragma.h. (setup_callbacks): Rename init_pp_output. (preprocess_file): No longer setup callbacks or call cpp_read_main_file. * cpphash.h (_cpp_init_mbchar): New. * cppinit.c (init_library): Call _cpp_init_mbchar. * cpplex.c (_cpp_init_mbchar): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63913 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in: Update.neil2003-03-041-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | * c-common.c (flag_no_line_commands, flag_no_output, flag_dump_macros, flag_dump_includes): New. * c-common.h (flag_no_line_commands, flag_no_output, flag_dump_macros, flag_dump_includes, preprocess_file): New. (init_c_lex): Update prototype. * c-lex.c (init_c_lex): Update prototype; move some code to c_common_init. * c-opts.c (preprocess_file): Subsume into c_common_init. (c_common_decode_option): Update flags. (c_common_init): Move code from preprocess_file and init_c_lex. (sanitize_cpp_opts): Update. * c-ppoutput.c: New, cppmain.c almost verbatim. * cpphash.h (struct printer): Remove. (struct cpp_reader): Remove print. * cpplib.h (dump_none, dump_only, dump_names, dump_definitions, cpp_preprocess_file): Remove. (struct cpp_options): Remove no_output, no_line_commands, dump_macros and dump_includes. * cppmain.c: Remove. * doc/passes.texi: Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63773 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-incpath.c (remove_component_p, simplify_path): Move back toneil2003-03-021-2/+0
| | | | | | | | | | | | | cppfiles.c. (remove_duplicates): Use cpp_simplify_path. * c-incpath.h (simplify_path): Remove. * c-lex.c: Don't include c-incpath.h. (init_c_lex): Remove simplify_path. * cppfiles.c (remove_component_p, cpp_simplify_path): Restore. (find_or_create_entry, validate_pch): Revert. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63669 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (C_AND_OBJC_OBJS, c-incpath.o, c-lex.o, LIBCPP_OBJS,neil2003-03-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cppinit.o, cppdefault.o, fix-header): Update. * c-incpath.c: New file. * c-incpath.h: New file. * c-lex.c: Include c-incpath.h. (init_c_lex): Register path simplifier. * c-opts.c: Include cppdefault.h and c-incpath.h. (TARGET_SYSTEM_ROOT, verbose, iprefix, sysroot, std_inc, std_cxx_inc, quote_chain_split, add_prefixed_path): New. (COMMAND_LINE_OPTIONS): Add more options from cpplib. (missing_arg, c_common_decode_option): Handle them. (c_common_post_options): Register include chains. (print_help): Update. * cppdefault.h (struct default include): Update. Move some macros to ... * cppdefault.c: ... here. (cpp_include_defaults): Add extra field add_sysroot. * cppfiles.c (include_file, search_from, find_or_create_entry, cpp_included, find_include_file, remap_filename): Update for renaming of search_path to cpp_path, and of the chain headers. (remove_component_p, _cpp_simplify_pathname): Move to c-incpath.c. * cpphash.h (struct search_path): Move to cpplib.h. (struct cpp_buffer, struct cpp_reader): Update. (_cpp_simplify_pathname): Remove. * cppinit.c: Don't include prefix.h and cppdefault.h. (INO_T_EQ, INO_T_COPY, path_include, append_include_chain, remove_dup_dir, remove_dup_nonsys_dirs, remove_dup_dirs, init_standard_includes, BRACKET, SYSTEM, AFTER, no_dir, no_pth, cpp_handle_options): Remove. (struct pending_option): Remove chain members. (cpp_destroy, cpp_read_main_file, COMMAND_LINE_OPTIONS, cpp_handle_option): Update. * cpplib.h (struct cpp_path, cpp_set_include_chains): New. (struct cpp_options): Remove quote_include, bracket_include, include_prefix, include_prefix_len, verbose, ignore_srcdir, no_standard_includes, no_standard_cplusplus_includes. (struct cpp_callbacks): Add simplify_path. (cpp_handle_options): Remove. * fix-header.c: Include c-incpath.h. (read_scan_file): Update to use c-incpath functionality. * doc/passes.texi: Update. cp: * Make-lang.in (CXX_C_OBJS): Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63612 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/9264mmitchel2003-01-131-0/+1
| | | | | | | | | | | * c-lex.c (c_lex): Set the token value to error_mark_node for invalid numeric constants. PR c++/9264 * g++.dg/parse/octal1.C: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61235 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge from pch-branch.geoffk2003-01-101-0/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61136 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge basic-improvements-branch to trunkzack2002-12-161-1/+3
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60174 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/rth2002-09-161-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * real.c, real.h: Rewrite from scratch. * Makefile.in (simplify-rtx.o): Depend on TREE_H. (paranoia): New target. * builtins.c (fold_builtin_inf): Use new real.h interface. * c-common.c (builtin_define_with_hex_fp_value): Likewise. * c-lex.c (interpret_float): Likewise. * emit-rtl.c (gen_lowpart_common): Likewise. * optabs.c (expand_float): Use real_2expN. * config/ia64/ia64.md (divsi3, udivsi3): Likewise. * defaults.h (INTEL_EXTENDED_IEEE_FORMAT): New. (FLOAT_WORDS_BIG_ENDIAN): New. * cse.c (find_comparison_args): Don't pass FLOAT_STORE_FLAG_VALUE directly to REAL_VALUE_NEGATIVE. * loop.c (canonicalize_condition): Likewise. * simplify-rtx.c: Include tree.h. (simplify_unary_operation): Don't handle FIX and UNSIGNED_FIX with floating-point result modes. * toplev.c (backend_init): Call init_real_once. * fold-const.c (force_fit_type): Don't call CHECK_FLOAT_VALUE. * tree.c (build_real): Likewise. * config/alpha/alpha.c, config/vax/vax.c (float_strings, float_values, inited_float_values, check_float_value): Remove. * config/alpha/alpha.h, config/m68hc11/m68hc11.h, config/m88k/m88k.h, config/vax/vax.h (CHECK_FLOAT_VALUE): Remove. * doc/tm.texi (CHECK_FLOAT_VALUE): Remove. gcc/f/ * target.c (ffetarget_real1): Don't pass FFETARGET_ATOF_ directly to ffetarget_make_real1. (ffetarget_real2): Similarly. * target.h (ffetarget_cvt_r1_to_rv_, ffetarget_cvt_rv_to_r2_, ffetarget_cvt_r2_to_rv_): Use new real.h interface and simplify. gcc/java/ * jcf-parse.c (get_constant): Runtime check for IEEE format; use new real.h interface. * jcf-write.c (find_constant_index): Use new real.h interface. * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL. contrib/ * paranoia.cc: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57198 138bc75d-0d04-0410-961f-82ee72b054a4
* * ABOUT-NLS: Follow spelling conventions.kazu2002-09-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ChangeLog: Likewise. * ChangeLog.1: Likewise. * ChangeLog.2: Likewise. * ChangeLog.3: Likewise. * ChangeLog.4: Likewise. * ChangeLog.5: Likewise. * ChangeLog.6: Likewise. * FSFChangeLog.10: Likewise. * FSFChangeLog.11: Likewise. * c-common.c: Likewise. * c-lex.c: Likewise. * c-objc-common.c: Likewise. * cppexp.c: Likewise. * cppinit.c: Likewise. * cpplex.c: Likewise. * doloop.c: Likewise. * flow.c: Likewise. * function.c: Likewise. * integrate.c: Likewise. * loop.c: Likewise. * reg-stack.c: Likewise. * reload.h: Likewise. * ssa.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57188 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h: Fix comment formatting.kazu2002-09-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-common.c: Likewise. * c-common.h: Likewise. * c-lex.c: Likewise. * c-pretty-print.c: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * defaults.h: Likewise. * et-forest.c: Likewise. * explow.c: Likewise. * function.h: Likewise. * gcov.c: Likewise. * genattrtab.c: Likewise. * gengtype.c: Likewise. * ifcvt.c: Likewise. * libgcc2.c: Likewise. * loop.c: Likewise. * profile.c: Likewise. * ra-build.c: Likewise. * real.c: Likewise. * rtl.h: Likewise. * tracer.c: Likewise. * tree-inline.c: Likewise. * varasm.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56952 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c (STDC_0_IN_SYSTEM_HEADERS, c_common_init): Moveneil2002-08-121-3/+0
| | | | | | | | | | | | | | | | | | | | | | | to c-copts.c. (warn_multichar): Die. (cb_register_builtins): Export. * c-common.h (warn_multichar, preprocess_file): Remove. (cb_register_builtins): New. * c-lang.c (c_init): Remove. (LANG_HOOKS_INIT): Use c_objc_common_init. * c-lex.c (init_c_lex): Don't canonicalize filename. * c-opts.c (in_fname, STDC_0_IN_SYSTEM_HEADERS): New. (preprocess_file): Make static. Update for cpplib. (c_common_decode_option): Remove warn_multichar. Use in_fname. (c_common_post_options): Set some cpp options here. (c_common_init): Move from c-common.c. * cppinit.c (cpp_post_options): Don't canonicalize in_fname. * cpplib.h (struct cpp_options): Remove in_fname. (cpp_preprocess_file): Update. * cppmain.c (cpp_preprocess_file): Update for new prototypes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56223 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-08-09 Ziemowit Laski <zlaski@apple.com>zlaski2002-08-101-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-common.c (flag_objc): New. * c-common.h (c_language_kind): Get rid of clk_objective_c enum value. (flag_objc): New extern declaration. * c-decl.c (implicitly_declare): Call objc_check_decl instead of maybe_objc_check_decl. (finish_decl): Likewise. (grokfield): Likewise. (finish_struct): Likewise. * c-lang.c (maybe_objc_check_decl): Rename to objc_check_decl. (maybe_objc_comptypes): Rename to objc_comptypes. (maybe_building_objc_message_expr): Rename to objc_message_selector. * c-lex.c (lex_charconst): Remove uses of clk_objective_c, replace with flag_objc as needed. * c-opts.c (c_common_init_options): Likewise. (c_common_decode_option): Likewise. * c-parse.in (init_reswords): Likewise. * c-tree.h (maybe_objc_check_decl): Rename to objc_check_decl. (maybe_objc_comptypes): Rename to objc_comptypes. (maybe_building_objc_message_expr): Rename to objc_message_selector. * c-typeck.c (comptypes): Call objc_comptypes instead of maybe_objc_comptypes, and/or objc_message_selector instead of (comp_target_types): Likewise. (convert_for_assignment): Likewise. (warn_for_assignment): Likewise. * cppinit.c (init_builtins): Set __OBJC__ manifest constant independently of those for other languages. * objc/objc-act.c (maybe_objc_comptypes): Delete. (maybe_objc_check_decl): Delete. (maybe_building_objc_message_expr): Rename to objc_message_selector. * objc/objc-lang.c (objc_init_options): Use clk_c instead of clk_objective_c; set flag_objc flag. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56173 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-lex.c (GET_ENVIRONMENT): Remove.neil2002-07-211-3/+0
| | | | | | | | | | | | | | | | | | * collect2.c (GET_ENV_PATH_LIST): Remove. (prefix_from_env): Use GET_ENVIRONMENT. * cppinit.c (GET_ENV_PATH_LIST): Remove. (init_standard_includes): Use GET_ENVIRONMENT. * defaults.h (GET_ENVIRONMENT): Define here if not already. * gcc.c (GET_ENV_PATH_LIST): Remove. (make_relative_prefix, process_command): Update. * protoize.c (GET_ENV_PATH_LIST): Remove. (do_processing): Update. java: * jcf-path.c (GET_ENV_PATH_LIST): Remove. (jcf_path_init): Use GET_ENVIRONMENT. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55630 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-07-21 Gabriel Dos Reis <gdr@nerim.net>gdr2002-07-211-2/+2
| | | | | | | | | | | | | | | | | | * c-decl.c (build_array_declarator): Say 'ISO C90', not 'ISO C89'. (grokdeclarator): Likewise. * c-format.c (C_STD_NAME): Likewise. * c-lex.c (interpret_integer): Likewise. * c-typeck.c (build_array_ref): Likewise. * cpplex.c (_cpp_lex_direct): Likewise. * toplev.c (documented_lang_options): Likewise. testsuite/ 2002-07-21 Gabriel Dos Reis <gdr@nerim.net> * gcc.dg/c90-arraydecl-1.c: Change C89 too C90. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55629 138bc75d-0d04-0410-961f-82ee72b054a4
* PR preprocessor/7070neil2002-06-271-9/+10
| | | | | | | | | * c-lex.c (cb_def_pragma): Don't try to spell CPP_EOF. testsuite: * gcc.dg/Wunknownprag.c: New tests. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55021 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud