Commit Graph

603 Commits

Author SHA1 Message Date
Kaveh R. Ghazi
c95910595c tree.h (lang_identify): Constify a char*.
* tree.h (lang_identify): Constify a char*.
        (print_error_function): Add extern prototype.  Constify a char*.

        * c-lang.c (lang_identify): Constify a char*.

        * objc/objc-act.c (lang_identify): Constify a char*.

From-SVN: r28631
1999-08-09 23:38:41 +00:00
Jason Merrill
03c4e79139 regen
From-SVN: r28509
1999-08-04 15:57:59 -04:00
Jason Merrill
1d80422324 * c-parse.in: Add END_OF_LINE token.
From-SVN: r28508
1999-08-04 15:57:26 -04:00
Richard Henderson
5379f4a4c4 Rebuild.
From-SVN: r28244
1999-07-25 18:21:24 -07:00
Bernd Schmidt
7f4edbcba6 c-common.h: New file.
* c-common.h: New file.
	* c-common.c (permanent_obstack): Delete unused declaration.
	(c_global_trees): New array.
	(c_common_nodes_and_builtins): New function; split off common code
	from init_decl_processing in both c-decl.c and cp/decl.c.
	* c-tree.h: Delete lots of declarations of tree nodes; replaced by
	c_global_trees and accessor macros defined in c-common.h.
	Include c-common.h.
	* c-decl.c: Delete definitions for tree nodes that were replaced by
	c_global_trees.
	(init_decl_processing): Build void_list_node.
	Call c_common_nodes_and_builtins; delete code to generate the common
	builtins here.

	* objc/objc-act.c (build_module_descriptor): Rename variable
	void_list_node to avoid clash with c-common.h.

	* cp/cp-tree.h: Delete lots of declarations of tree nodes; replaced by
	c_global_trees and accessor macros defined in c-common.h.
	(cp_tree_index): New enumeration.
	(cp_global_trees): Declare new array.  Add accessor macros for it, and
	delete declarations of tree nodes replaced by it.
	(builtin_function): Delete macro, add declaration for new function.
	Include c-common.h.
	* cp/decl.c: Delete definitions for tree nodes that were replaced by
	cp_global_trees and c_global_trees.
	(init_decl_processing): Call c_common_nodes_and_builtins; delete code
	to generate the common builtins here.
	(builtin_function): New function.
	* cp/decl2.c (abort_fndecl): Delete declaration.
	* cp/except.c (expand_builtin_return_address): Delete declaration.
	(builtin_return_address_fndecl): Delete variable.
	(const_ptr_type_node): Delete declaration.
	* cp/lex.c (cons_up_default_function): Delete declaration of
	void_list_node.
	* cp/parse.y (void_list_node): Delete declaration.
	* cp/rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
	Delete variables.
	(const_string_type_node): Delete declaration.
	* cp/search.c (abort_fndecl): Delete declaration.

	* Makefile.in: Update dependencies.
	* objc/Make-lang.in: Likewise.
	* cp/Makefile.in: Likewise.

From-SVN: r28188
1999-07-20 10:41:10 +00:00
Zack Weinberg
eeb183e9c7 cppspec.c: Insert -no-gcc into command line unless -gcc was given by user.
* cppspec.c: Insert -no-gcc into command line unless -gcc was
        given by user.
        * gcc.c (default_compilers): Define __GNUC__ and
        __GNUC_MINOR__ only if -no-gcc was not given.
        * objc/lang-specs.h: Likewise.
        * cpp.texi: Document -x and -std options; explain that -lang
        is no longer supported.  Minor related corrections.

From-SVN: r26990
1999-05-17 17:37:19 -06:00
Zack Weinberg
9234f99569 cppspec.c: Treat two non-option arguments as input and output file.
1999-05-10 18:21 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
	* cppspec.c: Treat two non-option arguments as input and
	output file.  Three or more non-option args is an error.
	Clean up.
	* gcc.c (default_compilers): Pass -$ to the preprocessor.
	* objc/lang-specs.h: Likewise.

From-SVN: r26872
1999-05-10 11:31:28 -04:00
Zack Weinberg
9ba051d33e gcc.c (default_compilers): Fix brace nesting bug.
1999-05-05 09:58 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
	* gcc.c (default_compilers): Fix brace nesting bug.
	* objc/lang-specs.h: Use %i, not %g.mi, for the input file
	when processing an .mi file.

From-SVN: r26775
1999-05-05 07:02:04 +00:00
Mumit Khan
112cedb09b c-parse.in (absdcl1): Allow attributes in explicit typespecs.
* c-parse.in (absdcl1): Allow attributes in explicit typespecs.
        (%expect): Update.
        * c-parse.y: Regenerate.
        * c-parse.c: Likewise.
        * objc/objc-parse.c: Likewise.
        * objc/objc-parse.y: Likewise.

Co-Authored-By: Donn Terry <donn@interix.com>

From-SVN: r26663
1999-04-26 16:35:58 -06:00
Richard Henderson
01656b25ec Update.
From-SVN: r26649
1999-04-26 04:29:31 -07:00
Nathan Sidwell
191b6fc9a3 Make-lang.in (objc-parse.c): Put BISON parameters in correct order.
* objc/Make-lang.in (objc-parse.c): Put BISON parameters in correct
        order.

From-SVN: r26569
1999-04-20 16:47:49 -06:00
Zack Weinberg
a30d557c36 graph.c (node_data): Return void.
1999-04-14 23:26 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
	* graph.c (node_data): Return void.  Ignore result of
	print_rtl_single.  Change caller to match.
	* integrate.c (subst_constants): Initialize op0_mode to an
	invalid mode, and abort before use if it's still invalid.
	(Can only happen if the RTX_CLASS, RTX_FORMAT tables are corrupted.)
	* objc/objc-act.c (get_objc_string_decl,
	build_selector_translation_table, generate_protocol_list,
	synth_id_with_class_suffix, build_keyword_selector,
	build_selector_expr, gen_declarator): Abort when the tree
	structure is corrupted.

From-SVN: r26463
1999-04-14 20:28:54 +00:00
Zack Weinberg
507df93940 cppinit.c (install_predefs): Delete function.
1999-04-06 12:51 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
	* cppinit.c (install_predefs): Delete function.
	(cpp_start_read): Don't call install_predefs.
	(cpp_handle_option): Remove case 'u' and all refs to
	opts->inhibit_predefs.
	(print_help): Don't mention -undef.
	(initialize_builtins): Define __HAVE_BUILTIN_SETJMP__, to
	match cccp.
	* cpplib.h (struct cpp_options): Remove inhibit_predefs
	member.
	* cccp.c (predefs): Delete variable.
	(main): Remove case 'u' in argument parse loop,
	'inhibit_predefs' variable, and the code block that would
	process CPP_PREDEFINES.
	(initialize_builtins): Don't define __OBJC__, the driver will
	do that.
	* gcc.c (default_compilers): Remove -undef from all specs that
	invoke a C preprocessor.
	* ch/lang-specs.h: Likewise.
	* cp/lang-specs.h: Likewise.
	* f/lang-specs.h: Likewise.
	* objc/lang-specs.h: Likewise.

From-SVN: r26212
1999-04-06 09:54:30 +00:00
Alexandre Oliva
a6374b5872 Makefile.in (INTL_TARGETS): new macro
* Makefile.in (INTL_TARGETS): new macro
($(INTL_TARGETS)): depend on generated sources; drop dependencies
on cp/parse.c and objc/objc-parse.c
($(srcdir)/cp/parse.c): move to cp/Make-lang.in
* objc/Make-lang.in ($(INTL_TARGETS)): depend on objc/objc-parse.c

From-SVN: r25851
1999-03-18 21:59:35 +00:00
Richard Henderson
056cd57251 gcc.c (default_compilers): Define __FAST_MATH__ when appropriate.
* gcc.c (default_compilers): Define __FAST_MATH__ when appropriate.
        * cp/lang-specs.h: Likewise.
        * f/lang-specs.h: Likewise.
        * objc/lang-specs.h: Likewise.

From-SVN: r25445
1999-02-25 10:50:07 -08:00
Ovidiu Predescu
b9ef73ea54 Reverted to the old behavior of encoding the types.
From-SVN: r25368
1999-02-22 09:02:25 +00:00
Kaveh R. Ghazi
5d5993dd31 bitmap.c (bitmap_print): Qualify a char* with the `const' keyword.
* bitmap.c (bitmap_print): Qualify a char* with the `const' keyword.
        * bitmap.h (bitmap_print): Likewise.
        * c-decl.c (builtin_function, grokdeclarator, grokfield): Likewise.
        * c-lang.c (build_objc_string): Likewise.
        * c-lex.c (yyerror, extend_token_buffer): Likewise.  Don't include
        limits.h or ctype.h.  Remove unused variable `p'.
        * c-lex.h (yyerror): Qualify a char* with the `const' keyword.
        * c-pragma.c (handle_pragma_token): Likewise.
        * c-pragma.h (handle_pragma_token): Likewise.
        * c-tree.h (build_objc_string, builtin_function, grokfield,
        build_indirect_ref, lvalue_or_else, readonly_warning, error_init,
        pedwarn_init): Likewise.
        * c-typeck.c (convert_for_assignment, warn_for_assignment,
        push_string, warning_init, incomplete_type_error,
        build_indirect_ref, lvalue_or_else, readonly_warning,
        build_c_cast, spelling, push_member_name, print_spelling,
        error_init, pedwarn_init, start_init): Likewise.
        * objc/objc-act.c (build_objc_string): Likewise.
        * print-tree.c (print_node_brief, print_node): Likewise.
        * tree.h (lvalue_or_else, print_node, print_node_brief): Likewise.

From-SVN: r25296
1999-02-18 20:38:48 +00:00
Ovidiu Predescu
6b99d47087 Applied Richard Frith-Macdonald's patch to objc/objc-act.c for encoding the type.
From-SVN: r25249
1999-02-16 15:39:00 +00:00
Zack Weinberg
71b1d3ca6d flags.h: Declare flag_no_ident.
/
1999-01-31 17:52 -0500  Zack Weinberg  <zack@midnite.ec.rhno.columbia.edu>
	* flags.h: Declare flag_no_ident.
	* toplev.c: Define flag_no_ident.  Process -f(no-)ident here.
	* c-decl.c: Don't define flag_no_ident.  Don't process
          -f(no-)ident switches here.
	* ch/decl.c: Likewise.
	* cp/decl2.c: Likewise.
	* c-tree.h: Don't declare flag_no_ident.
	* ch/ch-tree.h: Likewise.
	* cp/cp-tree.h: Likewise.
	* config/elfos.h (ASM_FILE_END): Output final .ident directive
          only if !flag_no_ident.
	* config/ptx4.h: Likewise.
	* config/svr4.h: Likewise.
	* config/alpha/elf.h: Likewise.
	* config/arm/linux-elf.h: Likewise.
	* config/i386/sco5.h: Likewise.
	* config/i860/fx2800.h: Likewise.
	* config/mips/gnu.h: Likewise.
	* config/i386/osfrose.h: Likewise.
	* gcc.c (C specs): Map -Qn to -fno-ident.
	* ch/lang-specs.h: Likewise.
	* cp/lang-specs.h: Likewise.
	* f/lang-specs.h: Likewise.
	* objc/lang-specs.h: Likewise.
	* java/lang-specs.h: Likewise.

From-SVN: r24947
1999-01-31 17:46:54 +00:00
Jeffrey A Law
ab87f8c8d1 Merge in gcc2 snapshot 19980929. See gcc/ChangeLog and gcc/FSFChangeLog for
details.

From-SVN: r24879
1999-01-26 18:43:17 -07:00
Jeff Law
5f38fdda61 Update FSF address in copyright header.
From-SVN: r24614
1999-01-11 06:34:38 -07:00
Jeff Law
414b46a91d Copyright fixes.
From-SVN: r24539
1999-01-06 14:10:34 -07:00
Kaveh R. Ghazi
736b02fdfa c-common.c (decl_attributes): Allow applying attribute `unused' on a LABEL_DECL.
* c-common.c (decl_attributes): Allow applying attribute `unused'
        on a LABEL_DECL.
        * c-parse.in (label): Parse attributes after a label, and call
        `decl_attributes' to handle them.
        * gansidecl.h (ATTRIBUTE_UNUSED_LABEL): Define.
        * genrecog.c (OUTPUT_LABEL, write_tree_1, write_tree): When
        generating labels, mark them with ATTRIBUTE_UNUSED_LABEL.
        * invoke.texi: Note that labels can be marked `unused'.

From-SVN: r24478
1999-01-04 07:48:37 +00:00
Dave Brolley
ed9c93bf44 lang-specs.h: Pass -MD, -MMD and -MG to cc1obj if configured with cpplib.
Wed Dec 16 16:33:04 1998  Dave Brolley  <brolley@cygnus.com>
	* objc/lang-specs.h: Pass -MD, -MMD and -MG to cc1obj if configured with
	cpplib.

From-SVN: r24341
1998-12-16 08:37:08 -05:00
Dave Brolley
353f10d599 objc-act.c (lang_init_options): Enclose cpplib related code in #if USE_CPPLIB.
Thu Dec 10 15:05:59 1998  Dave Brolley  <brolley@cygnus.com>
	* objc/objc-act.c (lang_init_options): Enclose cpplib related code in
	#if USE_CPPLIB.

From-SVN: r24234
1998-12-10 07:09:04 -05:00
Dave Brolley
8a1a524a83 objc-act.c (cpp_initialized): Removed.
Wed Dec  9 15:29:26 1998  Dave Brolley  <brolley@cygnus.com>
	* objc/objc-act.c (cpp_initialized): Removed.
	(lang_init_options): Initialize cpplib.
	(lang_decode_option): Move initialization of cpplib to
	lang_init_options.

From-SVN: r24220
1998-12-09 07:47:51 -05:00
Zack Weinberg
c50bca0894 cpplib.c (initialize_char_syntax): Use ISALPHA and ISALNUM so it'll work on non-ASCII platforms.
1998-12-07  Zack Weinberg  <zack@rabi.phys.columbia.edu>
	* cpplib.c (initialize_char_syntax): Use ISALPHA and ISALNUM
          so it'll work on non-ASCII platforms.  Always consider $ an
          identifier character.  Take no arguments.
	  (cpp_reader_init): Call initialize_char_syntax with no
          arguments.
	  (cpp_start_read): Don't call initialize_char_syntax again.
          Clear is_idchar['$'] and is_idstart['$'] if not
          opts->dollars_in_ident.
	* cpplib.h (struct cpp_reader): Replace void *data element by
          cpp_options *opts.  Rearrange elements to make gdb printout
          less annoying (put buffer stack at end).
	  (CPP_OPTIONS): Get rid of now-unnecessary cast.
	* cppmain.c: s/data/opts/ when initializing cpp_reader
          structure.
	* c-decl.c: Likewise.
	* objc/objc-act.c: Likewise.
	* fix-header.c: Likewise.

From-SVN: r24154
1998-12-07 09:15:29 -05:00
Ulrich Drepper
6f4d72224e c-common.c (declare_function_name): Declare predefinied variable `__func__'.
* c-common.c (declare_function_name): Declare predefinied variable
        `__func__'.
        * c-decl.c (flag_isoc9x): Set to 1 by default.
        (c_decode_option): Handle -std= option.  Remove -flang-isoc9x.
        (grokdeclarator): Always emit warning about implicit int for ISO C 9x.
        * c-parse.in: Allow constructors in ISO C 9x.
        Rewrite designator list handling.
        Allow [*] parameters.
        Don't warn about comma at end of enum definition for ISO C 9x.
        * cccp.c (c9x): New variable.
        (rest_extension): New variable.
        (print_help): Document new -std= option.
        (main): Recognize -std= option.  Set c9x appropriately.
        (create_definition): Recognize ISO C 9x vararg macros.
        * gcc.c (default_compilers): Adjust specs for -std options.
        (option_map): Add --std.
        (display_help): Document -std.
        * toplev.c (documented_lang_options): Add -std and remove
        -flang-isoc9x.
        * c-lex.c (yylex): Recognize hex FP constants and call REAL_VALUE_ATOF
        or REAL_VALUE_HTOF based on base of the constants.
        * fold-const.c (real_hex_to_f): New function.  Replacement function
        for hex FP conversion if REAL_ARITHMETIC is not defined.
        * real.c (asctoeg): Add handling of hex FP constants.
        * real.h: Define REAL_VALUE_HTOF if necessary using ereal_atof or
        real_hex_to_f.

Co-Authored-By: Richard Henderson <rth@cygnus.com>
Co-Authored-By: Stephen L Moshier <moshier@world.std.com>

From-SVN: r24049
1998-12-01 13:05:17 -08:00
Zack Weinberg
b12da25e3e gcc.c: Split out Objective-C specs to...
* gcc.c: Split out Objective-C specs to...
        * objc/lang-specs.h: here. (New file.) Make the specs cpplib
        aware.
        * c-lex.c (init_parse): Always initialize the filename global.
        * objc/objc-act.c (lang_init): Always call check_newline at
        beginning of file.

From-SVN: r23850
1998-11-25 01:54:10 -07:00
Richard Henderson
19283265ad Makefile.in (cc1): Put C_OBJS, and thence @extra_c_objs@ last.
* Makefile.in (cc1): Put C_OBJS, and thence @extra_c_objs@ last.
        (LIBCPP_OBJS): New.  Add cppulp.o.
        (cppmain, fix-header): Depend on and use libcpp.a.
        * configure.in (extra_c_objs, extra_cxx_objs): Use libcpp.a instead
        of the individual object files.
        * objc/Make-lang.in (cc1obj): Put OBJC_OBJS, and thence @extra_c_objs@,
        last.
        * cccp.c (user_label_prefix): New.
        (main): Set it off -f*leading-underscore.
        (special_symbol): Use it.
        * cpplib.c (special_symbol): Likewise.
        (cpp_handle_option): Handle -f*leading-underscore.
        * cppulp.c: New file.
        * output.h (user_label_prefix): Declare it.
        * dwarf2out.c (ASM_NAME_TO_STRING): Prepend user_label_prefix.
        * toplev.c (f_options, main): Handle -f*leading-underscore.
        * defaults.h (ASM_OUTPUT_LABELREF): Use asm_fprintf instead of
        referencing USER_LABEL_PREFIX directly.
        * config/nextstep.h (ASM_OUTPUT_LABELREF): Likewise.
        * m32r/m32r.h (ASM_OUTPUT_LABELREF): Likewise.
        * final.c (asm_fprintf): Use user_label_prefix instead.
        * arm/thumb.c (thumb_print_operand): Likewise.
        * gcc.c (default_compilers): Pass -f*leading-underscore on to
        cpp wherever appropriate.

From-SVN: r23415
1998-10-28 14:31:06 -08:00
Kaveh R. Ghazi
bf94d1ecc7 Add ATTRIBUTE_NORETURN in a bunch of places:
* cppalloc.c (memory_full): Mark function prototype with
	ATTRIBUTE_NORETURN.
	* demangle.h (collect_exit): Likewise.
	* fix-header.c (v_fatal, fatal): Likewise.
	* gcc.c (pfatal_with_name, pfatal_pexecute, fatal, fancy_abort):
	Likewise.
	* gcov.c (print_usage): Likewise.
	* genattr.c (fatal, fancy_abort): Likewise.
	* genattrtab.c (fatal, fancy_abort): Likewise.
	* gencodes.c (fatal, fancy_abort): Likewise.
	* genconfig.c (fatal, fancy_abort): Likewise.
	* genemit.c (fatal, fancy_abort): Likewise.
	* genextract.c (fatal, fancy_abort): Likewise.
	* genflags.c (fatal, fancy_abort): Likewise.
	* genopinit.c (fatal, fancy_abort): Likewise.
	* genoutput.c (fatal, fancy_abort): Likewise.
	* genpeep.c (fatal, fancy_abort): Likewise.
	* genrecog.c (fatal, fancy_abort): Likewise.
	* libgcc2.c (__eprintf, __default_terminate, __sjthrow,
	__sjpopnthrow, __throw): Likewise.
	* objc/objc-act.c (objc_fatal): Likewise.
	* protoize.c (usage, aux_info_corrupted,
	declare_source_confusing): Likewise.
	* rtl.c (dump_and_abort): Likewise.
	* rtl.h (sets_cc0_p): Likewise.
	* toplev.c (float_signal, pipe_closed): Likewise.

From-SVN: r23084
1998-10-14 10:37:09 +00:00
Richard Frith-Macdonald
f1488abaa3 c-lex.c (remember_protocol_qualifiers): Handle RID_BYREF.
* c-lex.c (remember_protocol_qualifiers): Handle RID_BYREF.
        (init_lex): Initialize ridpointers[RID_BYREF].
        * c-lex.h (enum rid): Add RID_BYREF.
        * c-parse.gperf: Add RID_BYREF as a type qualifier.
        * objc/objc-act.c (is_objc_type_qualifiers): Handle RID_BYREF.
        (encode_type_qualifiers): Similarly
        * c-gperf.h: Rebuilt.

From-SVN: r22918
1998-10-08 05:28:08 -06:00
Ben Elliston
fbe39e483d config-lang.in: Do not output the name of the selected thread file when building the front-end.
Sun Sep 13 08:13:39 1998  Ben Elliston  <bje@cygnus.com>
	* objc/config-lang.in: Do not output the name of the selected
	thread file when building the front-end.  The Makefile for the
	runtime library will do this.
	* objc/Make-lang.in: Do not build the runtime library or install
	the Objective C header files.  The Makefile for the runtime
	library will do this.
	* objc/Makefile.in (all.indirect): Only build the front-end.
	(compiler): Rename to `frontend'.
	(obj-runtime): Remove target.
	(copy-headers): Likewise.
	(clean): No need to remove `libobjc.a' any longer.

From-SVN: r22459
1998-09-17 11:19:28 +10:00
Ovidiu Predescu
d8bb17c8e3 Boehm GC support for ObjC from Ovidiu Predescu.
From-SVN: r22199
1998-09-02 17:48:01 -06:00
Jason Merrill
4051959be9 c-parse.in (struct_head, [...]): New nonterminals.
* c-parse.in (struct_head, union_head, enum_head): New nonterminals.
        (structsp): Use them.  Update files generated from c-parse.in.
        * extend.texi (Type Attributes): Document it.

From-SVN: r20971
1998-07-06 16:30:16 -06:00
Jeff Law
9ec36da574 * Merge from gcc2 June 9, 1998 snapshot. See ChangeLog.13 for
details.

From-SVN: r20808
1998-06-29 15:40:49 -06:00
Kaveh R. Ghazi
4f70758f37 Warning fixes:
* Makefile.in (fix-header): Don't needlessly depend on cpperror.o.
        * alias.c (CHECK_ALIAS_SETS_FOR_CONSISTENCY): Cast expansion to
        void since it is evaluated in a comma list.
        * mips.h (ASM_GENERATE_INTERNAL_LABEL): Always sprintf `NUM'
        argument as a long and cast `NUM' to long to ensure it is of the
        proper width.  Wrap macro arguments in parens when they appear in
        the expansion.
        * sol2.h (ASM_GENERATE_INTERNAL_LABEL): Likewise.
        * sparc.h (ASM_GENERATE_INTERNAL_LABEL): Likewise.
        (ASM_DECLARE_RESULT): Fix fprintf format specifier to match
        function argument return type.
        (REGNO_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_P, REGNO_OK_FOR_FP_P,
        REGNO_OK_FOR_CCFP_P): Use `(unsigned)' not `U'.
        * cpplib.c (cpp_message_from_errno): Remove unneeded argument to
        cpp_message.
        * dbxout.c: Fix the comments after an #endif to reflect the actual
        condition tested in the preceding #if.
        * except.c (find_all_handler_type_matches): Switch to old-style
        function definition.
        * expr.c (expand_builtin): Remove unused variable `type' twice.
        * gbl-ctors.h (DO_GLOBAL_CTORS_BODY): Cast -1 before comparing it
        to an unsigned long.
        * haifa-sched.c (print_insn_chain): Remove unused function.
        * objc/objc-act.c (build_msg_pool_reference): Hide prototype and
        definition.
        * toplev.c: When testing whether to include dbxout.h, also include
        it when XCOFF_DEBUGGING_INFO is defined.
        * unroll.c (unroll_loop): Add parentheses around assignment used
        as truth value.

From-SVN: r20801
1998-06-29 17:36:07 +00:00
Richard Henderson
97a7f457da * objc/archive.c: Remove <string.h> prototypes.
From-SVN: r20769
1998-06-27 16:04:40 -07:00
Kaveh R. Ghazi
b3fb0b5e50 Warning fixes:
* mips.c (gpr_mode): Don't say `static' twice.
        * cpplib.c (cpp_handle_option): Don't pass unneeded NULL to cpp_fatal.
        * objc/objc-act.c (init_selector): Hide prototype and definition.
        * optabs.c (gen_cond_trap): Remove unused variable `icode'.
        * regmove.c (copy_src_to_dest): Likewise for `i'.

From-SVN: r20652
1998-06-22 05:46:35 +00:00
Kaveh R. Ghazi
296433e1a9 Warning fixes:
* Makefile.in (varasm.o): Depend on sdbout.h.
        (sdbout.o): Depend on toplev.h.
        * collect2.c (scan_prog_file): Cast fprintf argument to `long' and
        use %ld specifier.
        * final.c (shorten_branches): Cast first arg of `bzero' to char *.
        * genextract.c (main): When creating insn-extract.c, mark variable
        `i' with ATTRIBUTE_UNUSED.
        * genpeep.c (main): When creating insn-peep.c, mark variables
        `insn', `x' and `pat' with ATTRIBUTE_UNUSED.
        * objc/init.c (__objc_tree_print): Wrap function definition in
        macro `DEBUG'.
        * objc/objc-act.c (encode_array): Cast sprintf argument to `long'
        and use %ld specifier.
        (adorn_decl): Likewise, twice.

From-SVN: r20650
1998-06-22 05:23:33 +00:00
Dave Brolley
cff559bcf0 New interface for lang_decode_option Wed Jun 10 13:07:02 1998 Dave Brolley <brolley@cygnus.com>
New interface for lang_decode_option
Wed Jun 10 13:07:02 1998  Dave Brolley  <brolley@cygnus.com>
	* objc/objc-act.c: Add cpplib declarations.
	(lang_decode_option): Initialize cpplib if necessary.
	(lang_decode_option): New argc/argv interface.

From-SVN: r20410
1998-06-10 06:22:54 -04:00
Richard Henderson
b53beeb291 toplev.c (flag_exceptions): Default to 0.
* toplev.c (flag_exceptions): Default to 0.
        (compile_file): Remove flag_exceptions == 2 hack.
        (main): Call lang_init_options.
        * tree.h: Declare it.
        * c-lang.c: Implement it.
        * objc/objc-act.c: Likewise.

From-SVN: r20274
1998-06-07 07:06:47 -07:00
Mumit Khan
b22284e14a Make-lang.in (OBJC_O): Add missing exeext.
* objc/Make-lang.in (OBJC_O): Add missing exeext.
        (libobjc.a, runtime-info.h): Likewise.

From-SVN: r19766
1998-05-14 18:44:32 -06:00
Kaveh R. Ghazi
d6f4ec5199 Warning fixes:
* 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
1998-05-13 12:40:39 +00:00
Jeff Law
38e012594e typo typo fixes fixes
From-SVN: r19601
1998-05-06 15:09:07 -06:00
Jim Wilson
71ebb3b81e toplev.h cleanups...
* objc/Make-lang.h (objc-parse.o): Add toplev.h dependency.
	* objc/objc-parse.y, objc/objc-parse.c: Regenerate.

From-SVN: r19591
1998-05-06 10:05:41 -07:00
Kaveh R. Ghazi
90fbb8c9f5 More system.h cutover...
* Makefile.in (mips-tfile.o, mips-tdump.o): Depend on system.h.
        * mips-tdump.c: Include system.h, remove redundant headers.
        * mips-tfile.c: Likewise.  Convert all ctype function calls to
        macro versions defined in system.h.
        * objc/Make-lang.in (objc-act.o): Depend on system.h.
        * objc/objc-act.c: Include system.h, remove redundant headers.

From-SVN: r19573
1998-05-06 08:57:18 +00:00
Jeff Law
f5963e6170 * Check in merge from gcc2. See ChangeLog.12 for details.
From-SVN: r19553
1998-05-05 17:18:02 -06:00
Kaveh R. Ghazi
d2f5ef7012 Fixes a problem compiling on sparcs where STRUCT_VALUE is defined in sparc.h to...
Fixes a problem compiling on sparcs where STRUCT_VALUE is defined in
sparc.h to use gen_rtx_MEM() and then evaluated in an #if directive in
sendmsg.c.
        * objc/sendmsg.c: Define gen_rtx_MEM() to 1, as is already done
        for gen_rtx(MEM, ...).

From-SVN: r19353
1998-04-21 06:50:07 +00:00
Kaveh R. Ghazi
944fc8abef More system.h cutover patches:
* c-parse.in: Include system.h, and remove stuff now made redundant.
        * cccp.c: Likewise.
        * cexp.y: Likewise.
        * protoize.c: Likewise.  Properly check for cpp stringification.
        * Makefile.in (c-parse.o, cccp.o, cexp.o, protoize.o, unprotoize.o):
        Depend on system.h.
        * objc/Make-lang.in (objc-parse.o): Likewise.

From-SVN: r19020
1998-04-06 14:01:33 +00:00
Jeffrey A Law
dc544d2c5e objc-act.c (encode_aggregate_within): Avoid GNU extensions in prototype and definition.
* objc/objc-act.c (encode_aggregate_within): Avoid GNU extensions
        in prototype and definition.

From-SVN: r19016
1998-04-05 19:05:12 -06:00
Jeff Law
e5e809f419 * Check in merge from gcc2. See ChangeLog.11 and ChangeLog.12
for details.

        * haifa-sched.c: Mirror recent changes from gcc2.

From-SVN: r18984
1998-04-04 06:32:39 -07:00
Mike Stump
7cc348893e gthr.h: Support systems that don't have weak, but have threads.
* gthr.h: Support systems that don't have weak, but have threads.
        * configure.in (*wrs-vxworks*): Use VxWorks threads by default.
        * gthr-vxworks.h: New file.
        * objc/thr-vxworks.h: Dummy file from thr-single.c for now.

From-SVN: r18971
1998-04-02 16:15:06 -07:00
Jeffrey A Law
3ac2735b19 sendmsg.c (__objc_block_forward): Add braces for return value if INVISIBLE_STRUCT_RETURN.
* objc/sendmsg.c (__objc_block_forward): Add braces for return
        value if INVISIBLE_STRUCT_RETURN.

From-SVN: r18886
1998-03-28 16:47:41 -07:00
Martin v. Löwis
bc28965932 c-lang.c (lang_print_xnode): New function.
* c-lang.c (lang_print_xnode): New function.
	* objc/objc-act.c (lang_print_xnode): Likewise.
	* print-tree.c (print_node): Call it
	* com.c (lang_print_xnode): New function.

From-SVN: r18789
1998-03-23 16:04:47 -07:00
H.J. Lu
990ac8d730 c-parse.in: Recognize protocol qualifiers in class definitions for objc.
* c-parse.in: Recognize protocol qualifiers in class
        definitions for objc.
        Include "output.h".
        (yyerror): Remove redundant decl.
        (yyprint): Fix prototype.

From-SVN: r18788
1998-03-23 15:59:18 -07:00
Nick Clifton
35d541d4a8 Makefile.in: Various fixes for building cygwin32 native toolchains.
* objc/Makefile.in: Various fixes for building cygwin32 native toolchains.
        * objc/Make-lang.in: Likewise.

Co-Authored-By: Geoff Noer <noer@cygnus.com>

From-SVN: r18744
1998-03-21 16:49:21 -07:00
Kaveh R. Ghazi
5172371191 Fix warious warnings:
* c-aux-info.c: Include string.h/strings.h.
	* pa.c: Include stdlib.h.
	(pa_combine_instructions): Prototype the function.
	(pa_can_combine_p, forward_branch_p, shadd_constant_p): Likewise.
	(reloc_needed): Add default case for enumeration switch.
	(remove_useless_addtr_insns): Remove unused variable `all'.
	(hppa_expand_prologue): Add explicit braces to avoid
	ambiguous `else'.
	(output_function_epilogue): Remove unused variable `i'.
	(output_millicode_call): Remove unused variable `link'.
	(shadd_constant_p, forward_branch_p): Make the function static.
	(following_call): Explicitly declare to return int.
	(pa_reorg): Declare as void.
	(pa_combine_instructions): Declare as static void.  Add
	parentheses around && within ||.
	* pa.h: Add prototypes for pa_reorg, symbolic_operand,
	following_call, function_label_operand, lhs_lshift_cint_operand
	and zdepi_cint_p.
	* pa.md: Add parentheses around && within ||.
	* cppalloc.c: Include stdlib.h.
	* cpperror.c (cpp_print_containing_files): Remove unused variable
	`i'.  Fix format specifier in fprintf.
	* cse.c (cse_around_loop): Add explicit braces to avoid
	ambiguous `else'.
	(delete_dead_from_cse): Wrap variable `tem' in macro HAVE_cc0.
	* expr.c (expand_expr): Add parentheses around && within ||.
	* final.c (app_enable): Replace fprintf with fputs where there are
	no format specifiers and no trailing argument after the string.
	Eg, when printing ASM_APP_ON/ASM_APP_OFF.
	(app_disable): Likewise.
	(final_end_function): Likewise.
	(final_scan_insn): Likewise.  Remove unused variable `set'.
	(profile_function): Wrap empty if-statement body in {} brackets.
	* function.c: Include stdlib.h.
	(pad_below): Wrap prototype and definition in ARGS_GROW_DOWNWARD.
	(reposition_prologue_and_epilogue_notes): Add parentheses
	around assignment used as truth value.
	* integrate.c (expand_inline_function): Wrap variable
	`cc0_insn' in macro HAVE_cc0.
	* jump.c (jump_optimize): Wrap variable `q' in macro
	HAVE_cc0.  Remove unused variable `prev1'.
	* libgcc2.c (__bb_exit_trace_func): Add parentheses around &&
	within ||.  Fix format specifier in fprintf.
	(__bb_init_prg): Add parentheses around assignment used as
	truth value.
	* local-alloc.c: Include stdlib.h.
	(requires_inout): Add parentheses around assignment used
	as truth value.
	* loop.c (analyze_loop_iterations): Wrap prototype and definition
	in macro HAVE_decrement_and_branch_on_count.
	(insert_bct, instrument_loop_bct): Likewise.
	(move_movables): Add parentheses around assignment used as
	truth value.
	(consec_sets_invariant_p): Likewise.
	(maybe_eliminate_biv_1): Wrap variable `new' in macro HAVE_cc0.
	* objc/objc-act.c: Include stdlib.h.
	(lookup_method_in_protocol_list): Wrap empty else-statement body
	in braces.
	(lookup_protocol_in_reflist): Likewise.
	(objc_add_static_instance): Remove unused variables `decl_expr'
	and `decl_spec'.
	(get_objc_string_decl): Remove unused variable `decl'.
	(generate_static_references): Remove unused variables `idecl' and
	`instance'.
	(check_protocols): Wrap empty else-statement body in braces.
	* protoize.c: Include stdlib.h.
	(substr): Add parentheses around assignment used as truth value.
	(abspath): Likewise.
	(shortpath): Likewise.
	* regmove.c (fixup_match_1): Add parentheses around assignment
	used as truth value.
	* reload.c (push_secondary_reload): Remove unused variable `i'.
	(find_reloads): Add parentheses around assignment used as truth
	value.
	* reload1.c: Include stdlib.h.
	* rtl.h: Correct typo in prototype of offsettable_memref_p.
	* stmt.c (add_case_node): Add parentheses around assignment used
	as truth value.
	(case_tree2list): Likewise.
	* tree.c (valid_machine_attribute): Wrap variable `decl_attr_list'
	in macro VALID_MACHINE_DECL_ATTRIBUTE.  Wrap variable
	`type_attr_list' in macro VALID_MACHINE_TYPE_ATTRIBUTE.
	(merge_attributes): Add explicit braces to avoid ambiguous
	`else'.
	* unroll.c (copy_loop_body): Wrap variable `cc0_insn' in
	macro HAVE_cc0.
	* varasm.c: Include stdlib.h.

From-SVN: r18290
1998-02-28 07:06:53 +00:00
Richard Henderson
9c37957a85 * objc/Object.m (-error): Call objc_verror with our va_list.
From-SVN: r18167
1998-02-22 07:33:39 -08:00
Kaveh R. Ghazi
963f4057da Make-lang.in (objc.stage1): Depend on stage1-start.
* objc/Make-lang.in (objc.stage1): Depend on stage1-start.
        (objc.stage2, objc.stage3, objc.stage4): Likewise.

From-SVN: r17473
1998-01-25 04:29:50 -07:00
Jeff Law
406b9925fa Fix typo in yesterday's change.
From-SVN: r17438
1998-01-20 23:48:07 -07:00
Jeffrey A Law
27766f0efa Remove more bytecode stuff.
From-SVN: r17436
1998-01-20 10:02:10 -07:00
Jeff Law
2d608f3084 Rebuilt.
From-SVN: r17428
1998-01-20 00:22:47 -07:00
David T. McWherter
1e7b997ad1 * objc-parse.c: Recognize protocol qualifiers in class definitions.
From-SVN: r17389
1998-01-17 13:23:59 -07:00
Teemu Torma
f24af81bca Makefile.in (GTHREAD_FLAGS): New var.
* Makefile.in (GTHREAD_FLAGS): New var.
	(LIBGCC2_CFLAGS): Added $(GTHREAD_FLAGS).
	(distclean): Remove gthr-default.h.
	* configure.in: Accept dce as a thread package.
	Check for thread.h and pthread.h.
	Link gthr-default.h to appropriate thread file and set
	gthread_flags.
	(hppa1.1-*-hpux10*): If --enable-threads, use dce threads and
	include multilib definitions from pa/t-dce-thr.
	(sparc-*-solaris2*): Enable threads by default, if thread.h or
	pthread.h is found, preferring posix threads over solaris ones.
	* config/pa/t-dce-thr: New file.
	* config/pa/t-pa: Removed multilibs.
	* config/sparc/t-sol2: Ditto.
	* gthr.h: New file.
	* gthr-single.h: New file.
	* gthr-posix.h: New file.
	* gthr-solaris.h: New file.
	* gthr-dce.h: New file.
	* libgcc-thr.h: Removed.
	* objc/thr-dce.c: New file copied from thr-decosf1.c.
	* frame.c: Include gthr.h instead of libgcc-thr.h.
	* libgcc2.c: Include gthr.h instead of libgcc-thr.h.
	(eh_context_initialize): If __gthread_once fails, use static eh
	context.
	(eh_context_free): Call __gthread_key_dtor.

From-SVN: r17235
1997-12-24 16:56:08 -07:00
Kaveh R. Ghazi
9e04c65a52 cse.c (rtx_cost): Add default case in enumeration switch.
* cse.c (rtx_cost): Add default case in enumeration switch.
        * fix-header.c (recognized_macro): Likewise.
        (recognized_extern): Likewise.
        (write_rbrac): Likewise.
        * objc/objc-act.c (encode_aggregate): Likewise.
        (gen_declarator): Likewise.
        (gen_declspecs): Likewise.

From-SVN: r17186
1997-12-22 02:31:41 -07:00
Andreas Schwab
dbf3231e2f Make-lang.in: Create runtime-info.h and libobjc_entry.o in the build directory.
* objc/Make-lang.in: Create runtime-info.h and libobjc_entry.o in
	the build directory.
	(libobjc.a): Update dependency list.
	(libobjc.dll): Likewise.  Use libobjc_entry.o from the build
	directory.
	(objc/sendmsg.o): Add -Iobjc to find runtime-info.h.
	(objc.mostlyclean): Remove runtime-info.h.

From-SVN: r17143
1997-12-18 16:27:58 -07:00
Jeff Law
73cea257d4 Rebuild after recent changes.
From-SVN: r17074
1997-12-12 08:58:02 -07:00
John F. Carr
0a6969ad7c tree.c, tree.h: Change tree_code_type, tree_code_length, and tree_code_name from pointers to arrays.
* tree.c, tree.h: Change tree_code_type, tree_code_length, and
        tree_code_name from pointers to arrays.
        * tree.c: Remove standard_tree_code_* variables, no longer used.
        * print-tree.c: Remove declaration of tree_code_name.

        * cp/lex.c (init_lex): Update for tree_code_* changes.
        * objc/objc-act.c (init_objc): Likewise.

        * tree.def, cp/cp-tree.def, objc/objc-tree.def: Update for tree_code
        changes.

From-SVN: r17061
1997-12-11 23:49:29 -07:00
H.J. Lu
7cc273ade8 objc-act.c (lang_report_error_function): Disable.
* objc/objc-act.c (lang_report_error_function): Disable.
        * objc/objc-parse.y: Include "output.h".
        (yyerror): Remove redundant decl.
        (yyprint): Fix prototype.
        (apply_args_register_offset): Remove redundant decl.
        (get_file_function_name): Likewise.

From-SVN: r17057
1997-12-11 23:20:41 -07:00
Jeff Law
956d69504d Merge from gcc-2.8
From-SVN: r16987
1997-12-06 17:31:01 -07:00
Jeff Law
e9a25f70a0 Update mainline egcs to gcc2 snapshot 971021.
From-SVN: r16278
1997-11-02 14:19:36 -07:00
Jeff Law
c3bcf315fa This commit was generated by cvs2svn to compensate for changes in r16274,
which included commits to RCS files with non-trunk default branches.

From-SVN: r16275
1997-11-02 01:46:26 -07:00
Jim Wilson
10549cbd85 H.J. Lu's SMP patch.
From-SVN: r14924
1997-08-25 23:36:27 -07:00
Jeff Law
861bb6c1b0 Initial revision
From-SVN: r14764
1997-08-11 09:56:58 -06:00
Per Bothner
a0c94d6d68 * objc/Make-lang.in (OBJC_CCOMMON): Removed.
From-SVN: r14632
1997-08-02 14:06:25 -07:00
Per Bothner
dbbade7444 * objc/objc-act.c (lang_init): Don't check_newline #if USE_CPPLIB.
From-SVN: r14601
1997-08-01 14:17:44 -07:00
Paul Eggert
416c259ae6 Comment out lines containing just formfeeds.
From-SVN: r14514
1997-07-21 23:17:44 +00:00
Richard Kenner
4f286636c9 (copy-headers): Use $(srcdir) from this makefile, not the parent's.
From-SVN: r14477
1997-07-18 06:44:21 -04:00
Richard Kenner
799f426536 (objc-headers): Fix command for the new build directory layout, don't
pass srcdir variable.

From-SVN: r14476
1997-07-18 06:44:07 -04:00
Richard Kenner
56f21a2634 Remove unapproved change.
From-SVN: r14433
1997-07-14 07:56:23 -04:00
Jim Meyering
694226b657 ($(OBJC_O)): Also depend on $(GCC_PASSES).
From-SVN: r14395
1997-07-07 04:01:33 +00:00
Richard Kenner
26ef0fc85a ($(srcdir)/objc/objc-parse.c): Fix command to use the right file names.
From-SVN: r14383
1997-07-02 07:51:10 -04:00
Richard Kenner
0bb8b20bbb Initial revision
From-SVN: r14359
1997-06-27 19:36:32 -04:00
Richard Kenner
a0effa2858 (libobjc_entry.o, libobjc_s.a, libobjc.dll): New targets.
(objc.install-normal): Install Objective-C runtime as a DLL.
(objc.mostlyclean): Clean up files used to build DLL.

From-SVN: r14358
1997-06-27 19:36:18 -04:00
Richard Kenner
255e0babcb (search_for_method_in_list): No longer static.
From-SVN: r14356
1997-06-27 19:30:41 -04:00
Richard Kenner
d2fdae0bf1 Print message about ObjC thread file.
From-SVN: r14351
1997-06-27 18:49:49 -04:00
Richard Kenner
6131ad9d4d (OBJC_THREAD_FILE): New definition.
From-SVN: r14350
1997-06-27 18:49:33 -04:00
Doug Evans
24e22c117c Make-lang.in (OBJC_CCOMMON): Object files don't go in srcdir.
* objc/Make-lang.in (OBJC_CCOMMON): Object files don't go in srcdir.
	(OBJC_OBJS): Likewise.
	(OBJC_O): Likewise.
	(objc-parse.o, objc-act.o): Fix rules.
	(objc/libobjc files): Fix rules.

From-SVN: r14347
1997-06-27 22:34:54 +00:00
Richard Kenner
a9d308bf5f (__objc_thread_yield): Use sched_yield instead.
From-SVN: r14327
1997-06-27 10:47:07 -04:00
Richard Kenner
8440cf1b3a (objc-runtime): Add objc-headers.
From-SVN: r14320
1997-06-25 16:56:03 -04:00
Richard Kenner
f1a997418e Define front-end/back-end interface functions and structures.
From-SVN: r14311
1997-06-25 16:25:39 -04:00
Richard Kenner
2024f9e4dc Completely rework according to new interface.
From-SVN: r14310
1997-06-25 16:25:24 -04:00
Richard Kenner
f15e9e7ef2 Reorganize thread implementation to make a clearly defined
front-end/back-end interface.

From-SVN: r14309
1997-06-25 16:23:17 -04:00
Richard Kenner
61f77e446b (__objc_register_instance_methods_to_class): New function.
Add missing function prototypes.

From-SVN: r14308
1997-06-25 16:14:08 -04:00
Richard Kenner
73845be11e (__objc_register_instance_methods_to_class): New function.
From-SVN: r14307
1997-06-25 16:13:42 -04:00
Richard Kenner
38692f1f94 (OBJC_ERR_BAD_STATE): New error code.
On NeXT redefine object_copy and object_dispose to avoid
a conflict with those defined in system library.

From-SVN: r14306
1997-06-25 16:13:21 -04:00
Richard Kenner
c3fb89daf5 (method_get_sizeof_arguments): Fix typo.
From-SVN: r14305
1997-06-25 16:12:49 -04:00
Richard Kenner
506b0f9eaf (objc_send_load): New function.
(objc_class_tree): New structure.
(create_tree_of_subclasses_inherited_from): New function.
(__objc_tree_insert_class): New function.
(objc_tree_insert_class): New function.
(objc_preorder_traverse): New function.
(objc_postorder_traverse): New function.
(__objc_tree_print): New function.
(__objc_destroy_class_tree_node): New function.
(class_is_subclass_of_class): New function.
(__objc_exec_class): Allocate class tree list and load hash table.
(__objc_send_message_in_list): Rewrite using hash table.
(__objc_send_load): Remove calls to _objc_load_callback.
(objc_send_load): Make static.  Create Tree of classes resembling
class hierarchy for all modules.  Call __objc_send_load on all of
the modules in __objc_module_list.
(__objc_create_classes_tree): New function.

From-SVN: r14304
1997-06-25 16:12:28 -04:00
Richard Kenner
8458d268d2 Add special exception to copyright notice.
From-SVN: r14285
1997-06-22 06:13:57 -04:00
Richard Kenner
c15648f7aa Changes to support ObjC as a front-end language.
From-SVN: r14284
1997-06-21 20:56:18 -04:00
Richard Kenner
14bb9bd890 Initial revision
From-SVN: r14283
1997-06-21 20:55:08 -04:00
Richard Kenner
d5d0a377e6 Initial revision
From-SVN: r14282
1997-06-21 20:42:06 -04:00
Richard Kenner
14499ba4f3 (__objc_block_return): Remove function.
(__objc_word_return, __objc_double_return): Remove functions.
(__objc_get_forward_imp): New function.
(__objc_init_dispatch_tables): Install zero instead of
__objc_init_install_dtable.
(__objc_init_install_dtable): No longer call the method but
allow objc_msg_lookup return it for normal execution.
(obj_msg_lookup): Differentiate between when a method isn't
implemented and when the dispatch table needs to be installed.
Return the IMP when the dispatch table is installed versus
having __objc_init_install_dtable call it.
(get_imp): Install dispatch table if needed and return IMP
from the newly installed dispatch table.
(__objc_responds_to): Install dispatch table if needed before
checking if method is implemented.

From-SVN: r13723
1997-03-17 17:00:10 -05:00
Richard Kenner
c8163b58ed Correct include path.
From-SVN: r13716
1997-03-16 08:41:08 -05:00
Richard Kenner
8235e418bc (__objc_block_return): New function.
(__objc_word_return, __objc_double_return): New functions.
(__objc_init_install_dtable): Call appropriate return function
based upon method type.

From-SVN: r13715
1997-03-16 08:40:47 -05:00
Richard Kenner
12d94bff7e (objc_module): Eliminate statics variable.
From-SVN: r13713
1997-03-15 07:57:55 -05:00
Richard Kenner
d3d71914cb (OBJC_O): Add linking.m.
From-SVN: r13712
1997-03-15 07:57:36 -05:00
Richard Kenner
7084b319a3 (class_add_method_list): Check for the +load method when adding a methods list to a class.
(class_add_method_list): Check for the +load method when adding a
methods list to a class.
(__objc_install_methods_in_dtable): New function.
(class_add_method_list): Don't check anymore for duplicate methods.

From-SVN: r13711
1997-03-15 07:57:06 -05:00
Richard Kenner
e29e95701b Initial revision
From-SVN: r13710
1997-03-15 07:56:24 -05:00
Richard Kenner
f0a5229172 (OBJC_VERSION): Increment version.
(objc_send_load, __objc_send_load): New functions.
(__objc_send_message_in_list): New function.
(__objc_force_linking): New function.
(__objc_exec_class): Don't call _objc_load_callback here.
(__objc_exec_class): Access statics from their new place in the defs variable.

From-SVN: r13709
1997-03-15 07:56:13 -05:00
Richard Kenner
e335b3ee7e (OBJC_VERSION): Increment version as recent changes have made old compiled code incompatible with current ObjC runtime.
(OBJC_VERSION): Increment version as recent changes have made old
compiled code incompatible with current ObjC runtime.
(build_objc_symtab_template): Make sure defs in objc_symtab is a NULL
terminated array.
(init_def_list): Attach statics to end of def list.
(init_objc_symtab): Take statics list into account.
(init_module_descriptor, build_module_descriptor): Don't add statics.
(generate_static_references): Indicate that statics are used.
(finish_objc): Process statics in the beginning.

From-SVN: r13708
1997-03-15 07:53:30 -05:00
Richard Kenner
f19911e44a Update documentation.
From-SVN: r13606
1997-02-04 06:14:25 -05:00
Richard Kenner
5ff0385cdb (__sel_register_typed_name): Eliminate compiler warnings with explicit cast.
From-SVN: r13599
1997-02-02 20:15:14 -05:00
Richard Kenner
e0d0c8a162 (__objc_runtime_mutex): Eliminate leading underscore from name of objc
mutex and thread structures.

From-SVN: r13598
1997-02-02 19:57:44 -05:00
Richard Kenner
47a84c97bf Prototypes for new functions.
(__objc_runtime_mutex): Eliminate leading underscore from name of objc
mutex and thread structures.

From-SVN: r13597
1997-02-02 19:54:47 -05:00
Richard Kenner
e64f9262e6 (objc_condition_{,de}allocate): New functions.
(objc_condition_{wait,broadcast,signal}): New functions.
(__objc_runtime_mutex): Eliminate leading underscore
from name of objc mutex and thread structures.

From-SVN: r13596
1997-02-02 19:53:23 -05:00
Richard Kenner
f4d01e7962 (objc_condition_{,de}allocate): New functions.
(objc_condition_{wait,broadcast,signal}): New functions.
(__objc_runtime_mutex): Eliminate leading underscore from name of objc mutex
and thread structures.

From-SVN: r13595
1997-02-02 19:52:38 -05:00
Richard Kenner
3136f75db4 (objc_condition_{,de}allocate): New functions.
(objc_condition_{wait,broadcast,signal}): New functions.
(__objc_runtime_mutex): Eliminate leading underscore from name of objc
mutex and thread structures.

From-SVN: r13594
1997-02-02 19:51:58 -05:00
Richard Kenner
3cec07d501 (hash_delete): Step through the hash nodes versus using hash_next to
increase efficiency.

From-SVN: r13593
1997-02-02 19:42:48 -05:00
Richard Kenner
eb0bc1e9b4 (__objc_forward): Replace call to abort function with call to
objc_error function.

From-SVN: r13592
1997-02-02 19:42:25 -05:00
Richard Kenner
efa7c88e59 Remove error handling declarations.
From-SVN: r13591
1997-02-02 19:42:01 -05:00
Richard Kenner
d2c60b5c23 Declare error handling functions and typedef for user specified error handler function.
Declare error handling functions and typedef for user specified error
handler function.  Define error codes used by the runtime library.

From-SVN: r13590
1997-02-02 19:41:41 -05:00
Richard Kenner
7e46250027 (objc_verror): New function.
(objc_fatal): Remove function.
(objc_set_error_handler): New function.
(_objc_error_handler): New global variable.
(__alpha__): Remove unneeded code.
(objc_error): Allow user specified error handler function to trap and
handle the objc error.  Added an error code parameter which indicates
the specific error that occured.
(objc_malloc, objc_atomic_malloc): Replace call to objc_fatal function
with call to objc_error function.
(objc_valloc, objc_realloc, objc_calloc): Likewise.

From-SVN: r13589
1997-02-02 19:41:03 -05:00
Richard Kenner
241365d3cc (init_check_module_version): Replace call to abort function with call
to objc_error function.

From-SVN: r13588
1997-02-02 19:40:12 -05:00
Richard Kenner
b2948281c3 (objc_sizeof_type, objc_alignof_type): Replace call to abort function with call to objc_error function.
(objc_sizeof_type, objc_alignof_type): Replace call to abort function
with call to objc_error function.
(objc_skip_typespec): Likewise.

From-SVN: r13587
1997-02-02 19:39:52 -05:00
Richard Kenner
86eb7fef04 (objc_get_class): Replace call to abort function with call to
objc_error function.

From-SVN: r13586
1997-02-02 19:39:22 -05:00
Richard Kenner
72c6da8a74 Replace call to abort or __objc_fatal functions with call to objc_error function throughout the complete file.
Replace call to abort or __objc_fatal functions with call to
objc_error function throughout the complete file.
(__objc_finish_read_root_object): Use hash table instead of list.

From-SVN: r13585
1997-02-02 19:39:00 -05:00
Richard Kenner
5b9b7438f3 (-error:): Call objc_error function instead of using function pointer.
From-SVN: r13584
1997-02-02 19:38:23 -05:00
Richard Kenner
71ccd1fc55 (encode_aggregate_within): New function.
(encode_aggregate): Generates encodings for unions similar to those for
structs except surrounded by parenthesis instead of braces.

From-SVN: r13583
1997-02-02 08:24:57 -05:00
Richard Kenner
6fceaa5f5b (stdlib.h): Define __USE_FIXED_PROTOTYPES__ before including stdlib.h.
From-SVN: r13250
1996-12-07 18:58:28 -05:00
Richard Kenner
1ebf4f3910 (BOOL): Define BOOL as int for VxWorks.
From-SVN: r12827
1996-09-23 22:45:12 -04:00
Richard Kenner
039f5fb1a8 Replace use of __objc_xmalloc and free with objc_malloc and objc_free.
From-SVN: r12768
1996-09-22 10:49:59 -04:00
Richard Kenner
df7fbc8cd8 Replace use of __objc_xcalloc, __objc_xrealloc, and __objc_xmalloc
with objc_calloc, objc_realloc, and objc_malloc.

From-SVN: r12767
1996-09-22 10:41:58 -04:00
Richard Kenner
2dac9ca60b (__objc_xmalloc, __objc_xrealloc): Delete.
From-SVN: r12766
1996-09-22 10:39:18 -04:00
Richard Kenner
a1feef752b Replace use of __obj_xmalloc and free with objc_malloc and objc_free.
From-SVN: r12765
1996-09-22 10:36:59 -04:00
Richard Kenner
d2ca2ea6e8 (_objc_malloc): New function pointer.
(_objc_atomic_malloc, _objc_valloc): Likewise.
(_objc_realloc, _objc_calloc, _objc_free): Likewise

From-SVN: r12764
1996-09-22 10:36:08 -04:00
Richard Kenner
79236a0da5 (objc_malloc): Renamed from __objc_xmalloc.
(objc_realloc): Renamed from __objc_realloc.
(objc_atomic_malloc): New function.
(objc_valloc): New function.
(objc_calloc): Renamed from __objc_calloc.
(objc_free): New function.

From-SVN: r12763
1996-09-22 10:35:45 -04:00
Richard Kenner
9d46282b6c Replace use of free with objc_free.
From-SVN: r12762
1996-09-22 10:35:09 -04:00
Richard Kenner
6f18718f3f Replace use of __objc_xcalloc and free with objc_calloc and objc_free.
From-SVN: r12761
1996-09-22 10:34:13 -04:00
Richard Kenner
ed40285ff6 Replace use of __objc_xmalloc and free with objc_malloc and objc_free.
From-SVN: r12760
1996-09-22 10:33:49 -04:00
Richard Kenner
6a305f32b2 Formatting changes.
From-SVN: r12617
1996-08-11 22:27:09 -04:00
Richard Kenner
2a7c93ee56 Formattign changes.
From-SVN: r12616
1996-08-11 22:26:19 -04:00
Richard Kenner
ca4da59718 Formtting changes.
From-SVN: r12615
1996-08-11 22:25:33 -04:00
Richard Kenner
f92076037c (hash_is_key_in_hash): Function somehow got lost.
From-SVN: r12614
1996-08-11 22:25:20 -04:00
Mike Stump
1ef08c6373 install EH code
From-SVN: r12550
1996-07-23 20:09:26 +00:00
Mike Stump
0f41302f47 formatting tweaks
From-SVN: r12390
1996-07-03 22:07:53 +00:00
Richard Kenner
d5d5fa1824 (objc_thread_id): Use pthread_getunique_np to obtain a thread ID value.
(objc_mutex_allocate): Cast mutex->owner to _objc_thread_t.
(objc_mutex_deallocate): Likewise.
(objc_mutex_unlock): Likewise.
(objc_mutex_trylock):  Declare thread_id as _objc_thread_t.
(objc_mutex_lock): Likewise.
(objc_mutex_unlock): Likewise.

From-SVN: r12375
1996-06-28 18:50:43 -04:00
Richard Kenner
b05a8d8a6b (ifdef __alpha__): Don't declare `free'.
From-SVN: r12374
1996-06-28 18:50:18 -04:00
Richard Kenner
ad24823466 (__objc_block_forward): New function.
(get_imp, objc_msg_lookup): Use different forwarding function
when the returning a floating point value.

From-SVN: r12371
1996-06-28 16:48:18 -04:00
Richard Kenner
018086d1d0 (__sel_register_typed_name): Additional parameter that indicates
whether name and type parameters are constant or not.

From-SVN: r12262
1996-06-10 11:59:30 -04:00
Richard Kenner
1717ec5915 (__objc_thread_detach_function): Clear thread storage.
Call the thread hook function when first becoming multi-threaded.
(objc_set_thread_callback): New function.

From-SVN: r12261
1996-06-10 11:58:41 -04:00
Richard Kenner
f2433f89b4 (objc_set_thread_callback): New function.
(objc_thread_callback): Typedef for the hook function.

From-SVN: r12260
1996-06-10 11:58:20 -04:00
Richard Kenner
8c3f352664 (libobjc.a): Don't delete the library.
From-SVN: r12259
1996-06-10 11:58:05 -04:00
Richard Kenner
8c55cd7870 (__objc_init_protocols): Need to unlock mutex.
From-SVN: r12258
1996-06-10 11:49:49 -04:00
Richard Kenner
2361ec2a84 Initial revision
From-SVN: r12220
1996-06-07 19:22:01 -04:00
Richard Kenner
7cc5b18f7b (__objc_thread_exit_status): Declare global variable.
From-SVN: r12219
1996-06-07 19:21:30 -04:00
Richard Kenner
8341df325a Remove inclusion of source files.
From-SVN: r12218
1996-06-07 19:21:17 -04:00
Richard Kenner
cc782a7e9e Now compiles as a separate source file, so include appropriate
Objective-C headers.

From-SVN: r12217
1996-06-07 19:21:00 -04:00
Richard Kenner
7228791ecf (OBJC_THREAD_FILE): Add target and dependency.
From-SVN: r12216
1996-06-07 19:16:50 -04:00
Richard Kenner
673a261e4f (objc_get_uninstalled_dtable): New declaration.
From-SVN: r12020
1996-05-17 19:53:18 -04:00
Richard Kenner
7136f13204 (objc_get_uninstalled_dtable): New function.
From-SVN: r12019
1996-05-17 19:52:54 -04:00
Richard Kenner
fc94a55b92 Initial revision
From-SVN: r11985
1996-05-17 08:28:54 -04:00
Richard Kenner
b8abf72abb entered into RCS
From-SVN: r11984
1996-05-17 08:27:31 -04:00
Richard Kenner
a3381c2a7d Initial revision
From-SVN: r11983
1996-05-17 08:17:48 -04:00
Richard Kenner
b2c6b6c6ac (OBJC_O): Add dependency for nil_method.c.
From-SVN: r11982
1996-05-17 08:17:07 -04:00
Richard Kenner
44ffc80b50 (nil_method): Deleted from here.
From-SVN: r11981
1996-05-17 08:16:46 -04:00
Richard Kenner
cc06bcdb37 Include objc/objc.h here instead of in objc/hash.c to get BOOL typedef.
From-SVN: r11980
1996-05-17 08:12:32 -04:00
Richard Kenner
168887fa2c (hash_is_key_in_hash): New function.
From-SVN: r11979
1996-05-17 08:12:15 -04:00
Richard Kenner
1139608504 (hash_value_for_key): Prevent endless loop when 0 was stored in a
hashtable.

From-SVN: r11926
1996-05-05 13:13:21 -04:00
Richard Kenner
8b7bf67189 (_objc_thread_id): Correct return type from int to _objc_thread_id.
From-SVN: r11821
1996-04-16 16:31:17 -04:00
Richard Kenner
f061780b03 (objc_skip_typespec): Don't abort for _C_UNDEF.
From-SVN: r11761
1996-04-14 07:52:23 -04:00
Richard Kenner
489c81a38f Inlcude thr.h, not thread.h.
From-SVN: r11666
1996-04-04 12:35:55 -05:00
Richard Kenner
5f79ec0ec0 Include thr.h, not thread.h.
From-SVN: r11665
1996-04-04 12:35:00 -05:00
Richard Kenner
7fb04be124 Rename thread-* to thr-*.
From-SVN: r11664
1996-04-04 12:26:03 -05:00
Richard Kenner
cd9255f6d3 Rename thread* to thr*.
From-SVN: r11663
1996-04-04 12:24:18 -05:00
Richard Kenner
06f5c9df49 (objc_mutex_unlock): Properly declare thread_id.
From-SVN: r11612
1996-03-25 08:09:26 -05:00
Richard Kenner
8d95e9ad11 Initial revision
From-SVN: r11453
1996-03-05 09:22:13 -05:00
Richard Kenner
ca10c449d6 Delete reference to thread-test directory.
From-SVN: r11452
1996-03-05 09:14:02 -05:00
Richard Kenner
10c6702fa3 Initial revision
From-SVN: r11451
1996-03-05 09:13:36 -05:00
Richard Kenner
749815a2e8 Delete reference to thread-test.
From-SVN: r11450
1996-03-05 09:13:24 -05:00
Richard Kenner
271809f768 Initial revision
From-SVN: r11449
1996-03-05 09:13:02 -05:00
Richard Kenner
d50e6b7b37 (get_imp, __objc_responds_to): Surround sarray access with mutex lock/unlock.
(__objc_init_install_dtable): Likewise.
(__objc_update_dispatch_table_for_class): Likewise.
(__objc_print_dtable_stats): Likewise.

From-SVN: r11448
1996-03-05 09:12:47 -05:00
Richard Kenner
2dae9809ee (sel_get_typed_uid, sel_get_any_typed_uid): Likewise.
(sel_get_any_uid, sel_get_name, sel_register_name): Likewise.
(sel_register_typed_name): Likewise.

From-SVN: r11447
1996-03-05 09:12:08 -05:00
Richard Kenner
9f26926521 (union sversion): New.
(struct sarray): Maintain multiple versions.
(sarray_remove_garbage): Add prototype.

From-SVN: r11446
1996-03-05 09:11:25 -05:00
Richard Kenner
1ebb5fcc64 (sarray_{remove,free}_garbage): New functions.
(sarray_at_put, sarray_new, sarray_lazy_copy):
Modify/copy sarray structure/data in a thread-safe manner
(sarray_{realloc,free}): Reallocate/free sarray structure/data in a
thread-safe manner.

From-SVN: r11445
1996-03-05 09:10:50 -05:00
Richard Kenner
54d643f6f2 Include objc/thread.h.
From-SVN: r11444
1996-03-05 09:10:10 -05:00
Richard Kenner
691466c0b5 Update comments.
From-SVN: r11443
1996-03-05 09:09:10 -05:00
Richard Kenner
aef85e6a98 (__objc_runtime_mutux, __objc_runtime_thread_alive): New variables.
(objc_init_statics, __objc_init_protocols): Surround sarray access
with mutex lock/unlock
(__objc_exec_class): Likewise.
Initialization for thread-safe global variables.
Declarations for thread-safe functions and global variables

From-SVN: r11442
1996-03-05 09:07:56 -05:00
Richard Kenner
53cc7066b8 (__objc_init_class_tables): Surround sarray access with mutex lock/unlock.
(__objc_add_class_to_hash, objc_lookup_class): Likewise.
(objc_get_class, objc_get_next_class): Likweise.
(__objc_resolve_class_links, class_pose_as) Likewise.

From-SVN: r11441
1996-03-05 09:06:45 -05:00
Richard Kenner
625fc99df2 Changes to compile new files and name renaming.
From-SVN: r11440
1996-03-05 09:06:02 -05:00
Richard Kenner
605bf7304d (objc_{write,read}_type, case _C_STRUCT_B): Fix typo.
From-SVN: r10990
1996-01-15 12:31:49 -05:00
Richard Kenner
3ea4ff2e26 (objc_alignof_type): Handle _C_PTR case.
From-SVN: r10807
1995-12-18 19:31:18 -05:00
Richard Kenner
fb3ba99d63 (objc_alignof_type): Handle _C_PTR case.
From-SVN: r10723
1995-12-14 18:13:16 -05:00
Richard Kenner
c0cacfd5a5 Changed archive command for libobjc.a to use $? for objects.
From-SVN: r10332
1995-09-12 17:40:04 -04:00
Richard Kenner
abc95ed36d Fix spelling errors.
From-SVN: r10289
1995-08-28 06:54:22 -04:00
Richard Kenner
682d017157 objc-api.h (sel_get_any_typed_uid): Declare new function.
From-SVN: r10234
1995-08-13 21:47:53 -04:00
Richard Kenner
8b4d4a9da8 (sel_get_any_typed_uid): New function.
From-SVN: r10233
1995-08-13 21:47:34 -04:00
Richard Kenner
66759bfbb7 Change FSF address.
From-SVN: r9990
1995-06-15 17:07:30 -04:00
Richard Kenner
ed2ecfcbc9 Update header.
From-SVN: r9989
1995-06-15 17:07:13 -04:00