aboutsummaryrefslogtreecommitdiff
path: root/gcc/objc
AgeCommit message (Collapse)AuthorFilesLines
2003-03-08c-common.h (c_common_init, [...]): Update.Neil Booth2-8/+6
* c-common.h (c_common_init, c_common_post_options): Update. * c-objc-common.c (c_objc_common_init): Update for new prototype. * c-opts.c (saved_lineno): New. (c_common_post_options, c_common_init): Update prototypes, move call to cpp_read_main_file from latter to former. * c-tree.h (c_ojbc_common_init): Update. * langhooks-def.h (lhd_post_options): New. (LANG_HOOKS_INIT, LANG_HOOKS_POST_OPTIONS): Update. * langhooks.c (lhd_post_options): New. * langhooks.h (struct lang_hooks): Update post_options and init hooks. * toplev.c (no_backend): New. (process_options): Call post_options hook and set main_input_filename and input_filename here. (lang_dependent_init, do_compile): post_options hook moved to process_options. * objc/objc-act.c (objc_init): Update prototype. * objc/objc-act.h (objc_init): Update prototype. ada: * misc.c (gnat_init): Update for new prototype. cp: * cp-tree.h (cxx_init): Update prototype. * lex.c (cxx_init): Similarly. f: * com.c (ffe_init): Update prototype; move code to ffe_post_options. (ffe_post_options): New. java: * lang.c (java_init): Update prototype, move code to java_post_options. (java_post_options): Similarly. treelang: * tree1.c (in_fname): Fix type. (treelang_init): Update prototype and use of in_fname. * treelang.h (in_fname): Fix type. * treetree.c (tree_code_if_start, tree_code_if_else, tree_code_if_end, tree_code_create_function_prototype, tree_code_create_function_initial, tree_code_create_funciton_wrapup, tree_code_create_variable, tree_code_output_expression_statement) : Fix prototypes and use of filenames. * treetree.h: Similarly. From-SVN: r64001
2003-03-07lang-specs.h (objective-c-header): Use .gch not .pch; support ↵Geoffrey Keating1-5/+5
-no-integrated-cpp. * objc/lang-specs.h (objective-c-header): Use .gch not .pch; support -no-integrated-cpp. * c-pch.c (get_ident): Use c_language_kind and flag_objc rather than langhooks.name. From-SVN: r63955
2003-03-07c-pch.c: Include langhooks.h.Geoffrey Keating4-14/+29
* c-pch.c: Include langhooks.h. (IDENT_LENGTH): New. (get_ident): New. (pch_ident): Delete. (pch_init): Use get_ident, IDENT_LENGTH. (c_common_valid_pch): Likewise. Also, use actual language in warning message. * Makefile.in (c-pch.o): Add langhooks.h to dependencies. * objc/config-lang.in (gtfiles): Add objc-act.c. Remove duplicate c-parse.in. * objc/Make-lang.in (objc/objc-act.o): Add dependency on gt-objc-objc-act.h. (gt-objc-objc-act.h): New rule. * objc/lang-specs.h: Support PCH. * objc/objc-act.c: Include gt-objc-objc-act.h. (objc_add_static_instance): Move num_static_inst out, mark for PCH. (build_selector_reference_decl): Move idx out, mark for PCH. (build_class_reference_decl): Likewise. (build_objc_string_decl): Move *_idx out, mark for PCH. (build_tmp_function_decl): Move xxx out, mark for PCH. From-SVN: r63924
2003-03-04sourcebuild.texi (Front End Directory): Document tags.Tom Tromey1-0/+3
* doc/sourcebuild.texi (Front End Directory): Document tags. * configure: Rebuilt. * configure.in (target_list): Added tags. * Makefile.in (TAGS): Depend on lang.clean. Include subdirectory TAGS files by reference. * objc/Make-lang.in (objc.tags): New target. From-SVN: r63808
2003-03-02gcc.c (default_compilers): Add -no-integrated-cpp flag to invoke an external ↵Ashif Harji1-4/+4
cpp during compilation. * gcc.c (default_compilers): Add -no-integrated-cpp flag to invoke an external cpp during compilation. (option_map): Likewise. * cp/lang-specs.h (default_compilers): Similarly. * objc/lang-specs.h (default_compilers): Similarly. * doc/invoke.texi: Document -no-integrated-cpp flag. From-SVN: r63664
2003-02-26* objc-act.c: (mark_referenced_methods): Fix compilation problem.Jan Hubicka1-2/+2
From-SVN: r63478
2003-02-26objc-act.c: Include cgraph.hJan Hubicka2-0/+29
* objc-act.c: Include cgraph.h (mark_referenced_methods): New function. (objc_init): Call it. * objc-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Set. * c-decl.c (finish_function): Honor can_defer_p even in unit-at-a-time mode. * optabs.c (expand_fix): Do not widen the input operand. * expr.c (emit_group_store): Fix crash when converting single register into complex register. * Makefile.in (jump.o, regclass.o, alias.o): Add dependency on timevar.h * alias.c: Include timevar.h (init_alias_analysis): Set timevar * jump.c: Include timevar.h (rebuild_jump_labels): Set timevar * regcalss.c: Include timevar.h (reg_scan): Set timevar * timevar.def (TV_ALIAS_ANALYSIS, TV_REG_SCAN, TV_REBUILD_JUMP): New From-SVN: r63464
2003-01-31tree.h (TYPE_BINFO_SIZE, [...]): Remove.Nathan Sidwell1-1/+1
* tree.h (TYPE_BINFO_SIZE, TYPE_BINFO_SIZE_UNIT): Remove. (BINFO_ELTS): New #define. * stor-layout.c (finalize_record_size): Don't set them. * cp/cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS. (BINFO_LANG_ELTS): New #define. * cp/tree.c (make_binfo): Use BINFO_LANG_ELTS. * java/class.c (make_class): Use BINFO_ELTS. (set_super_info): Likewse. (add_interface_do): Likewise. * objc/objc-act.c (start_class): Use BINFO_ELTS. From-SVN: r62180
2003-01-30* objc/Make-lang.in (objc-parse.y): Find c-parse.in in $(srcdir).Loren J. Rittle1-1/+1
From-SVN: r62127
2003-01-21Makefile.in (GCC_WARN_CFLAGS): Add $(WERROR) $($@-warn) (gtype-desc.o-warn...Kaveh R. Ghazi1-0/+2
gcc: * Makefile.in (GCC_WARN_CFLAGS): Add $(WERROR) $($@-warn) (gtype-desc.o-warn, c-decl.o-warn, varasm.o-warn, gcc.o-warn, insn-conditions.o-warn, out_object_file, gengtype-yacc.o-warn, c-parse.o-warn): Add -Wno-error. (STAGE2_FLAGS_TO_PASS): Add WERROR="@WERROR@". * configure.in (--enable-werror): Add new flag. * doc/install.texi (--enable-werror): Document. * configure: Regenerate. * objc/Make-lang.in (objc/objc-parse.o-warn): Add -Wno-error. cp: Make-lang.in (cp/decl.o-warn): Add -Wno-error. f: Make-lang.in (f/sta.o-warn): Add -Wno-error. java: Make-lang.in (jvspec.o-warn): Add -Wno-error. From-SVN: r61544
2003-01-11Makefile.in (parsedir): New variable.Geoffrey Keating1-8/+8
* Makefile.in (parsedir): New variable. (docobjdir): New variable. (c-parse.o, c-parse.c, c-parse.y, gengtype-lex.o, gengtype-yacc.o, gengtype-lex.c, gengtype-yacc.c): Use parsedir. (info, cpp.info, gcc.info, gccint.info, gccinstall.info, cppinternals.info, generated-manpages, gcov.1, cpp.1, gcc.1, gfdl.7, gpl.7, fsf-funding.7, maintainer-clean, install-info, install-man): Use docobjdir. * objc/Make-lang.in (objc/objc-parse.c, objc/objc-parse.y, objc.maintainer-clean): Use parsedir. From-SVN: r61189
2003-01-10Merge from pch-branch.Geoffrey Keating1-0/+1
From-SVN: r61136
2003-01-02except.c, [...]: Fix Copyright years.Steven Bosscher4-4/+8
2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl> * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c, cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c, cp/repo.c, java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf, java/lang-options.h, java/mangle.c, java/mangle_name.c, java/xref.c, java/zextract.c,java/zipfile.h, objc/Make-lang.in, objc/config-lang.in, objc/lang-specs.h, objc/objc-act.h: Fix Copyright years. From-SVN: r60783
2003-01-01Make-lang.in, [...]: Replace "GNU CC" with "GCC" in the copyright header.Steven Bosscher8-41/+41
* objc/Make-lang.in, objc/config-lang.in, objc/lang-options.h, objc/lang-specs.h, objc/objc-act.c, objc/objc-act.h, objc/objc-lang.c, objc/objc-tree.def: Replace "GNU CC" with "GCC" in the copyright header. From-SVN: r60742
2002-12-16Merge basic-improvements-branch to trunkZack Weinberg3-26/+21
From-SVN: r60174
2002-10-24objc-act.c (get_static_reference): Remove unneeded TYPE_BINFO initialization.Ziemowit Laski1-4/+2
2002-10-23 Ziemowit Laski <zlaski@apple.com> * objc/objc-act.c (get_static_reference): Remove unneeded TYPE_BINFO initialization. (get_object-reference): Likewise. (build_constructor): Tighten precondition check. (finish_message_expr): Likewise. From-SVN: r58480
2002-09-17Fixed ObjC typechecking, particularly case with protocolsNicola Pero1-34/+191
From-SVN: r57250
2002-09-06c-lang.c (objc_is_id): New stub.Ziemowit Laski1-6/+20
[gcc/ChangeLog] 2002-09-06 Ziemowit Laski <zlaski@apple.com> * c-lang.c (objc_is_id): New stub. * c-tree.h (objc_is_id): New forward declaration. * c-typeck.c (build_c_cast): Do not strip protocol qualifiers from 'id' type. * objc/objc-act.c (objc_comptypes): Correct handling of protocol qualifiers. (objc_is_id): New. [gcc/testsuite/ChangeLog] 2002-09-05 Ziemowit Laski <zlaski@apple.com> * objc.dg/proto-lossage-1.m: New test. From-SVN: r56905
2002-09-06Compile ObjC @protocols into list of ObjC statically allocated instances,Nicola Pero1-1/+84
fixing long standing problems with standalone @protocols in ObjC files From-SVN: r56887
2002-09-06Fixed bugs in the ObjC -gen-decls optionNicola Pero1-11/+36
From-SVN: r56884
2002-09-03Fixed typo causing bloat when compiling ObjC programs with GNU runtimeNicola Pero1-4/+4
From-SVN: r56753
2002-08-27Added -Wundeclared-selector ObjC command line optionNicola Pero1-0/+30
From-SVN: r56615
2002-08-26objc-act.c (get_super_receiver): If inside a class method of a category...Ziemowit Laski1-2/+6
[gcc] 2002-08-26 Ziemowit Laski <zlaski@apple.com> * objc/objc-act.c (get_super_receiver): If inside a class method of a category, cast the receiver to 'id' before accessing the 'isa' field so that <objc/objc-class.h> is not needed. For NeXT runtime. [gcc/testsuite] 2002-08-26 Ziemowit Laski <zlaski@apple.com> * objc.dg/super-class-2.m: New test. From-SVN: r56587
2002-08-20objc-act.c (building_objc_message_expr): Rename to ↵Ziemowit Laski1-4/+4
current_objc_message_selector. 2002-08-19 Ziemowit Laski <zlaski@apple.com> * objc/objc-act.c (building_objc_message_expr): Rename to current_objc_message_selector. From-SVN: r56453
2002-08-20objc-act.c (build_ivar_chain): Remove.Ziemowit Laski2-59/+18
[gcc] 2002-08-19 Ziemowit Laski <zlaski@apple.com> * objc/objc-act.c (build_ivar_chain): Remove. (objc_copy_list): Likewise. (get_class_ivars): Inline call to removed build_ivar_chain function. Save off a clean copy of ivars in the CLASS_OWN_IVARS slot; use that slot (rather than CLASS_IVARS) when accessing ivars for base classes. Call copy_list and chainon instead of objc_copy_list. (build_private_template): Call get_class_ivars instead of build_ivar_chain. (start_class): Allocate room for the CLASS_OWN_IVARS slot. (continue_class): Call get_class_ivars instead of build_ivar_chain. (encode_field_decl): Check for DECL_BIT_FIELD_TYPE instead of DECL_BIT_FIELD (which may have been cleared). * objc/objc-act.h (CLASS_OWN_IVARS): New accessor macro. [gcc/testsuite] 2002-08-19 Ziemowit Laski <zlaski@apple.com> * objc.dg/bitfield-1.m: New test. * objc.dg/bitfield-2.m: New test. From-SVN: r56451
2002-08-10c-opts.c (set_std_cxx98, [...]): New.Neil Booth1-4/+3
* c-opts.c (set_std_cxx98, set_std_c89): New. (COMMAND_LINE_OPTIONS): Move more from cppinit.c. (c_common_decode_option): Handle new switches from cppinit.c. Add -std=gnu++98. * cppinit.c (set_lang): Rename cpp_set_lang. Export. (no_arg, no_num): Remove. (COMMAND_LINE_OPTIONS): Move more to c-opts.c. Drop all lang- switches apart from -lang-objc and lang-asm. (cpp_handle_option): Similarly. * cpplib.h (cpp_set_lang): New. * doc/cppopts.texi, doc/invoke.texi: Document -std=c++98, -std=gnu++98. * objc/lang-specs.h: Remove -ansi. cp: * lang-specs.h: Remove -ansi. From-SVN: r56185
2002-08-10c-common.c (flag_objc): New.Ziemowit Laski2-18/+4
2002-08-09 Ziemowit Laski <zlaski@apple.com> * 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. From-SVN: r56173
2002-08-08objc-act.c (build_selector_translation_table): Issue warning...Devang Patel1-0/+26
* objc/objc-act.c (build_selector_translation_table): Issue warning, when -Wselector is used,if method for which selector is being created does not exist. Testsuite: *objc.dg/selector-1.m: New test From-SVN: r56142
2002-08-08configure.in (enable_coverage): New enable switch.Nathan Sidwell1-0/+1
* configure.in (enable_coverage): New enable switch. * configure: Rebuilt. * Makefile.in (COVERAGE_FLAGS, coverageexts): New variables. (INTERNAL_CFLAGS): Append COVERAGE_FLAGS. (ALL_FLAGS): Reorder so INTERNAL_CFLAGS comes after CFLAGS. (mostlyclean): Remove coverage files. * doc/install.texi: Document enable_coverage. * cp/Make-lang.in (c++.mostlyclean): Remove coverage files. * ada/Make-lang.in (ada.mostlyclean): Remove coverage files. * f/Make-lang.in (f.mostlyclean): Remove coverage files. * java/Make-lang.in (java.mostlyclean): Remove coverage files. * objc/Make-lang.in (objc.mostlyclean): Remove coverage files. * treelang/Make-lang.in (treelang.mostlyclean): Remove coverage files. From-SVN: r56126
2002-08-07Makefile.in (c-opts.o, [...]): Update.Neil Booth3-43/+1
* Makefile.in (c-opts.o, c-common.o, C_AND_OBJC_OBJS): Update. * c-common.c: Don't include tree-inline.h. (c_common_init_options, c_common_post_options): Move to c-opts.c. * c-common.h (c_common_decode_option): New. * c-decl.c (c_decode_option): Remove. * c-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option. * c-opts.c: New file. * c-tree.h (c_decode_option): Remove. * doc/passes.texi: Update. * objc/objc-act.c (objc_decode_option): Remove. * objc/objc-act.h (objc_decode_option): Remove. * objc/ojbc-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option. cp: * Make-lang.in (CXX_C_OBJS): Update. * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option. * cp-tree.h (cxx_decode_option): Remove. * decl2.c (compare_options, lang_f_options, unsupported_options, cxx_decode_option): Remove. testsuite: * objc.dg/const-str-2.m: Update. * gcc.dg/cpp/c++98.c: Change to C extension. * gcc.dg/cpp/c++98-pedantic.c: Similarly. * gcc.dg/cpp/cpp.exp: Process .C extensions too. From-SVN: r56105
2002-08-01objc-act.c (encode_complete_bitfield): Add prototype and avoid ISO C style ↵Kaveh R. Ghazi1-1/+5
function definition. * objc/objc-act.c (encode_complete_bitfield): Add prototype and avoid ISO C style function definition. From-SVN: r55934
2002-08-01c-common.c: Define all C/ObjC/C++ warning and flag variables.Neil Booth1-35/+4
* c-common.c: Define all C/ObjC/C++ warning and flag variables. * c-common.h: Declare all C/ObjC/C++ warning and flag variables. * c-decl.c: Move all warning and flag variables to c-common.c. * c-format.c: Move all warning variables to c-common.c. * c-tree.h: Move all warning and flag declarations to c-common.h. * objc/objc-act.c: Move all warning variables to c-common.c. (flag_warn_protocol): Rename warn_protocol. cp: * cp-tree.h: Move all warning and flag declarations to c-common.h. * decl.c: Move all warning and flag variables to c-common.c. * decl2.c: Move all warning and flag variables to c-common.c. * lex.c (flag_digraphs): Remove. (warn_traditional): Now in c-common.c. From-SVN: r55923
2002-07-29objc-act.c (objc_init): Return immediately if filename is NULL.Neil Booth1-0/+2
* objc/objc-act.c (objc_init): Return immediately if filename is NULL. From-SVN: r55853
2002-07-25objc-act.c (UTAG_STATICS, [...]): Remove.Neil Booth1-6/+0
* objc/objc-act.c (UTAG_STATICS, UTAG_PROTOCOL_LIST, USERTYPE): Remove. From-SVN: r55761
2002-07-23defaults.h (obstack_chunk_alloc, [...]): Default definition.Neil Booth1-3/+0
* defaults.h (obstack_chunk_alloc, obstack_chunk_free): Default definition. * gcse.c: Don't define obstack_chunk_free. * collect2.c, conflict.c, df.c, diagnostic.c, fix-header.c, flow.c, gcc.c, genattrtab.c, genautomata.c, genflags.c, gensupport.c, integrate.c, loop.c, ra.c, read-rtl.c, regrename.c, reload1.c, reorg.c, tlink.c, tree.c, config/arm/arm.c, objc/objc-act.c: Don't define obstack macros. cp: * class.c, method.c, pt.c, search.c: Similarly. From-SVN: r55665
2002-07-14Make gengtype.c language independent.Tim Josling1-1/+1
From-SVN: r55436
2002-07-09objc-act.c (adjust_type_for_id_default): Fix my previous patch.Devang Patel1-1/+1
2002-07-09 Devang Patel <dpatel@apple.com> * objc/objc-act.c (adjust_type_for_id_default): Fix my previous patch. Do not allow ObjC objects as a parameter type for Objective-C methods. My previous patch restricted 'struct' also. From-SVN: r55348
2002-07-02objc-act.c (adjust_type_for_id_default): Do not allow an object as parameter.Devang Patel1-0/+4
* objc/objc-act.c (adjust_type_for_id_default): Do not allow an object as parameter. Prevent something like 'NSObject' to be used as the type for a method argument. testsuite: * objc.dg/param-1.m: New test. From-SVN: r55197
2002-07-02c-parse.in (designator): Enable designated initializers if ObjC.Ziemowit Laski2-6/+2
2002-07-02 Ziemowit Laski <zlaski@apple.com> * c-parse.in (designator): Enable designated initializers if ObjC. (objcmessageexpr): Remove references to objc_receiver_context. * objc/objc-act.h (objc_receiver_context): Remove decl. * objc/objc-act.c (objc_receiver_context): Remove. (lookup_objc_ivar): Test objc_method_context instead of objc_receiver_context. 2002-07-02 Ziemowit Laski <zlaski@apple.com> * objc.dg/desig-init-1.m: New test. From-SVN: r55192
2002-07-01tree.h: Modify builtin_function interface to take an extra argument ATTRS...Roger Sayle1-4/+8
* tree.h: Modify builtin_function interface to take an extra argument ATTRS, which is a tree representing an attribute list. * c-decl.c (builtin_function): Accept additional parameter. * objc/objc-act.c (builtin_function): Likewise. * f/com.c (builtin_function): Likewise. * java/decl.c (builtin_function): Likewise. * ada/utils.c (builtin_function): Likewise. * cp/decl.c (builtin_function): Likewise. (builtin_function_1): Likewise. * c-common.c (c_common_nodes_and_builtins): Pass an additional NULL_TREE argument to builtin_function. (builtin_function_2): Likewise. * cp/call.c (build_java_interface_fn_ref): Likewise. * objc/objc-act.c (synth_module_prologue): Likewise. * java/decl.c (java_init_decl_processing): Likewise. * f/com.c (ffe_com_init_0): Likewise. * config/alpha/alpha.c (alpha_init_builtins): Pass an additional NULL_TREE argument builtin_function. * config/arm/arm.c (def_builtin): Likewise. * config/c4x/c4x.c (c4x_init_builtins): Likewise. * config/i386/i386.c (def_builtin): Likewise. * config/ia64/ia64.c (def_builtin): Likewise. * config/rs6000/rs6000.c (def_builtin): Likewise. From-SVN: r55161
2002-07-01objc-act.c (finish_file): Avoid finish_objc() if -fsyntax-only.Devang Patel1-1/+4
2002-06-30 Devang Patel <dpatel@apple.com> * objc/objc-act.c (finish_file): Avoid finish_objc() if -fsyntax-only. 2002-06-30 Devang Patel <dpatel@apple.com> * objc.dg/fsyntax-only.m: New test. From-SVN: r55125
2002-06-11objc-act.c (warn_with_ivar): Adjust calls to diagnostic_count_error.Gabriel Dos Reis1-2/+2
* objc/objc-act.c (warn_with_ivar): Adjust calls to diagnostic_count_error. (warn_with_method): Likewise. * diagnostic.h (warnings_are_errors_message): New field of diagnostic_context. (diagnostic_count_error): Rename to diagnostic_count_diagnostic to match semantics. * diagnostic.c: Adjust calls to diagnostic_count_error through out. (diagnostic_count_diagnostic): Make aware of other kinds of diagnostics. (diagnostic_initialize): Initialize warnings_are_errors_message field. f/ 2002-06-12 Gabriel Dos Reis <gdr@codesourcery.com> * bad.c (ffebad_start_): Adjust calls to diagnostic_count_error. From-SVN: r54532
2002-06-06Define some laguage hooks which were missing - LANG_HOOKS_GET_ALIAS_SETNicola Pero1-1/+5
and LANG_HOOKS_SAFE_FROM_P From-SVN: r54314
2002-06-05toplev.h (report_error_function): Remove.Gabriel Dos Reis2-5/+6
* toplev.h (report_error_function): Remove. * diagnostic.h (location_t): New datatype. (text_info): Likewise. (diagnostic_info): Likewise. (output_prefix): New macro. (diagnostic_last_function_changed): Likewise. (diagnostic_set_last_function): Likewise. (diagnostic_last_module_changed): Likewise. (diagnostic_set_last_module): Likewise. (report_diagnostic): Now macro. (diagnostic_set_info): Declare. * diagnostic.c (report_problematic_module): Rename to diagnostic_repor_current_module. (set_diagnostic_context): Remove. (count_error): Rename to diagnostic_error_count. (error_function_changed): Remove. (record_last_error_function): Likewise. (error_module_changed): Likewise. (record_last_error_module): Likewise. (context_as_prefix): Rename to diagnostic_build_prefix. (flush_diagnostic_buffer): Rename to diagnostic_flush_buffer. (diagnostic_set_info): New function. * objc/objc-act.c: #include diagnostic.h (error_with_ivar): Adjust call to count_error. (warn_with_method): Likewise. * objc/Make-lang.in (objc-act.o): Depend on diagnostic.h cp/ 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com> * error.c (cp_diagnostic_starter): Adjust call. (maybe_print_instantiation_context): Change prototype to take a 'diagnostic_info *'. (print_instantiation_full_context): Likewise. (print_instantiation_partial_context): Likewise. (cp_diagnostic_starter): Likewise. (cp_diagnostic_finalizer): Likewise. (cp_print_error_function): Likewise. (cp_printer): Take a secondary parameter as a 'text_info *'. Remove output_state savings. Adjust calls. f/ 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com> * bad.c (ffebad_start_): Adjust call to count_error. * Make-lang.in (f/bad.o): Depend on diagnostic.h * bad.c: #include diagnostic.h From-SVN: r54291
2002-06-04Merge from pch-branch up to tag pch-commit-20020603.Geoffrey Keating5-87/+19
From-SVN: r54232
2002-05-31gcc.c (cpp_unique_options): Remove "-d" options.Matthew Woodcraft1-1/+2
* gcc.c (cpp_unique_options): Remove "-d" options. (cpp_debug_options): New spec string. (default_compilers): Use it. * objc/lang-specs.h: Likewise. * cp/lang-specs.h: Likewise. * f/lang-specs.h: Likewise. From-SVN: r54121
2002-05-25Makefile.in (C_COMMON_H): Fix.Neil Booth2-6/+4
* Makefile.in (C_COMMON_H): Fix. Update other targets. * c-common.c: Don't include c-lex.h. (builtin_define_with_value): Make static and prototype. (builtin_define_std): Move from c-lex.h. * c-common.h (init_c_lex): Move from c-lex.h. * c-decl.c: Don't include c-lex.h. (make_pointer_declarator): Move from c-parse.in. * c-lex.c: Don't include c-lex.h. * c-lex.h: Remove. * c-parse.in: Don't include c-lex.h; include c-pragma.h. (make_pointer_declarator): Move to c-decl.c. * c-pragma.c: Don't include c-lex.h. * c-pragma.h (yydebug, YYDEBUG, parse_in, c_lex): Move from c-lex.h. * c-tree.h (make_pointer_declarator): New. cp: * lex.c: Don't include c-lex.h. * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h. doc: * passes.texi, tm.texi: Update. objc: * Make-lang.in: Update and correct. * objc-act.c: Don't include c-lex.h or cpplib.h. treelang: * treetree.c: Don't include c-lex.h. config: * darwin-c.c: Don't include c-lex.h. * c4x/c4x-c.c: Don't include c-lex.h. * c4x/t-c4x: Update. * i370/i370-c.c: Don't include c-lex.h. * i370/t-i370: Update. * i960/i960-c.c: Don't include c-lex.h. * i960/i960.c: Don't include cpplib.h, c-lex.h or c-pragma.h. * i960/t-960bare: Update. * i960/t-vxworks: Update. * rs6000/rs6000-c.c: Don't include c-lex.h; include c-pragma.h. * rs6000/t-darwin: Update. * rs6000/t-rs6000-c-rule: Update. * v850/v850-c.c: Don't include c-lex.h. * v850/v850.c: Don't include c-lex.h or cpplib.h. From-SVN: r53876
2002-05-22re PR preprocessor/6517 (gcc hangs on C compile with multiple "-I-")Neil Booth2-14/+3
PR preprocessor/6517 * Makefile.in: Update. * c-common.c (c_common_post_options): Add preprocessor errors to the error count. * c-lang.c (c_post_options): Kill. (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options. * hooks.h: Add header guards. * langhooks-def.h: Include hooks.h. (LANG_HOOKS_POST_OPTIONS): Update. * langhooks.h (struct lang_hooks): Update post_options. * toplev.c (parse_options_and_default_flags): Update. cp: * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options. * cp-tree.h (cxx_post_options): Kill. * cp-lex.c (cxx_post_options): Kill. objc: * objc-lang.c (objc_post_options): Kill. (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options. From-SVN: r53724
2002-05-14gcc.c (cpp_options): Must pass -m* and -f* options to the front end even ↵Neil Booth1-1/+1
when only preprocessing. * gcc.c (cpp_options): Must pass -m* and -f* options to the front end even when only preprocessing. (cc1_options): Remove redundant -lang-c. * tradcpp.c (main): Ignore -m options. cp: * lang-specs.h: Remove redundant -lang-c++. objc: * lang-specs.h: Similarly. From-SVN: r53460
2002-04-26c-common.c (fix_string_type): Split out of ...Richard Henderson1-16/+18
* c-common.c (fix_string_type): Split out of ... (combine_strings): ... here. Take a varray, not a tree list. (c_expand_builtin_printf): Use fix_string_type. * c-common.h: Update decls. * c-parse.in (string): Remove. Update all uses to use STRING instead, and not call combine_strings. (yylexstring): New. (_yylex): Use it. * c-typeck.c (simple_asm_stmt): Don't call combine_strings. (build_asm_stmt): Likewise. * objc/objc-act.c (my_build_string): Use fix_string_type. (build_objc_string_object): Build varray for combine_strings. * parse.y (string): Remove. Update all uses to use STRING instead, and not call combine_strings. * rtti.c (tinfo_name): Use fix_string_type. * semantics.c (finish_asm_stmt): Don't call combine_strings. * spew.c (yylexstring): New. (read_token): Use it. * g++.dg/parse/concat1.C: New. * gcc.dg/concat2.c: New. From-SVN: r52790