diff -Nrcpad gcc-3.4.3/gcc/objc/ChangeLog gcc-4.0.0/gcc/objc/ChangeLog *** gcc-3.4.3/gcc/objc/ChangeLog Thu Jan 1 00:00:00 1970 --- gcc-4.0.0/gcc/objc/ChangeLog Thu Apr 21 05:18:54 2005 *************** *** 0 **** --- 1,537 ---- + 2005-04-20 Release Manager + + * GCC 4.0.0 released. + + 2005-03-30 Joseph S. Myers + + PR c/772 + PR c/17913 + * objc-act.c (objc_start_function): Push context on + label_context_stack. + + 2005-01-29 Kazu Hirata + + * lang-specs.h, objc-act.c, objc-act.h, objc-lang.c: Update + copyright. + + 2005-01-27 Matt Austern + + * objc-act.c (objc_finish_file): In ObjC++ mode, set at_eof before + calling instantiate_pending_templates. + + 2005-01-26 Alexander Malmberg + + PR objc/18862 + * objc-act.c (build_selector_translation_table): Use + input_location in the diagnostic for the GNU runtime or if + TREE_PURPOSE (chain) is NULL. + + 2005-01-25 Alexander Malmberg + + PR objc/18408 + * objc-act.c (objc_types_compatible_p): New function. + * objc-act.h (objc_types_compatible_p): Declare. + * objc-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define. + + 2005-01-16 Ziemowit Laski + + * objc-act.c (objc_push_parm): Call c_type_promotes_to() + via a lang-hook. + + 2005-01-15 Ziemowit Laski + + PR objc/19321 + * objc-act.c (get_arg_type_list): Decay function arguments into + pointers. + (objc_push_parm): Likewise; bring PARM_DECL construction closer + in line with what the C front-end does. + (objc_get_parm_info): Call pushdecl() and finish_decl() on + each PARM_DECL, like the C front-end does. + (start_method_def): Remove redundant ARRAY_TYPE decay. + (objc_start_function): Bring closer in line with what the + C front-end does for functions. + + 2005-01-14 Mike Stump + + * lang-specs.h ("@objective-c"): Use cc1obj when -E is used so + that -fobjc-exceptions is accepted. + + 2004-12-30 Ziemowit Laski + + PR objc/18971 + * objc-act.c (get_arg_type_list, start_method_def): Decay + array arguments into pointers. + (gen_type_name_0): Learn to pretty-print array types. + + 2004-12-15 Ziemowit Laski + + * objc-act.c (build_private_template): Change to return 'void'; do + not set ivar_context, uprivate_record or objc_instance_type. + (objc_comptypes, gen_type_name_0): For types 'id' and 'Class', + retrieve protocol list from the pointee rather than the pointer itself; + check TYPE_HAS_OBJC_INFO(...) precondition before accessing + TYPE_OBJC_PROTOCOL_LIST. + (objc_get_protocol_qualified_type): For types 'id' and 'Class', + construct a variant of the pointee as well as the pointer, and + store protocol information in the former. When creating variants + of RECORD_TYPEs, clone their TYPE_LANG_SPECIFIC fields and propagate + TYPE_OBJC_INTERFACE information. + (objc_declare_class): If a TYPE_DECL is looked up, retrieve the + underlying RECORD_TYPE to check for presence of TYPE_OBJC_INTERFACE; + for newly-created RECORD_TYPEs, create a tentative TYPE_OBJC_INTERFACE + holding an IDENTIFIER_NODE. + (objc_finish_message_expr): Check TYPE_HAS_OBJC_INFO(...) before + accessing TYPE_OBJC_PROTOCOL_LIST; Use TYPE_OBJC_INTERFACE instead + of calling lookup_interface(); allow for TYPE_OBJC_INTERFACE holding + an IDENTIFIER_NODE (meaning a @class forward-declaration only). + (objc_is_public): Check TYPE_OBJC_INTERFACE instead of calling + lookup_interface(). + (continue_class): For @implementations, set ivar_context, + uprivate_record and objc_instance_type, for @interfaces, call + build_private_template(). + (encode_pointer): Check TYPE_HAS_OBJC_INFO(...) before accessing + TYPE_OBJC_INTERFACE. + (objc_types_are_equivalent): Check TYPE_HAS_OBJC_INFO(...) before + accessing TYPE_OBJC_PROTOCOL_LIST. + * objc-act.h (OBJC_INFO_SLOT_ELTS, TYPE_OBJC_INFO, INIT_TYPE_OBJC_INFO, + DUP_TYPE_OBJC_INFO, ALLOC_OBJC_TYPE_LANG_SPECIFIC, + SIZEOF_OBJC_TYPE_LANG_SPECIFIC): New macros. + (TYPE_OBJC_INTERFACE): Replaces TREE_STATIC_INSTANCE and now points + to an actual @interface; stored in TYPE_LANG_SPECIFIC(...). + (TYPE_OBJC_PROTOCOL_LIST): Replaces TYPE_PROTOCOL_LIST; stored in + TYPE_LANG_SPECIFIC(...). + (TREE_STATIC_INSTANCE, TYPE_PROTOCOL_LIST): Delete. + (IS_ID, IS_CLASS, IS_PROTOCOL_QUALIFIED_UNTYPED, IS_SUPER, + TYPED_OBJECT): Check for POINTER_TYPE rather than POINTER_TYPE_P; + adjust for use of TYPE_OBJC_INTERFACE and TYPE_OBJC_PROTOCOL_LIST + instead of TREE_STATIC_INSTANCE and TYPE_PROTOCOL_LIST. + + 2004-11-29 Joseph Myers + + PR c/7544 + * Make-lang.in (objc/objc-act.o): Update dependencies. + * objc-act.c (objc_finish_file): Call + maybe_apply_pending_pragma_weaks if not OBJCPLUS. + + 2004-11-09 Andrew Pinski + + PR objc/18406 + * obj-act.c (encode_type): 96bits doubles are encoded the + same way as 64bit and 128bit doubles are. + + 2004-11-09 Joseph S. Myers + + * objc-act.c: Use %q, %< and %> for quoting in diagnostics. + + 2004-11-08 Andrew Pinski + + PR objc/16546 + * objc-act.c (generate_method_descriptors): Remove setting + the new decls' type to variable_length_type. + (generate_ivar_lists): Likewise. + (generate_dispatch_tables): Likewise. + + 2004-10-30 Ziemowit Laski + + * objc-act.c (objc_lookup_ivar): The new OTHER parameter + contains the result of the ID lookup by the C or C++ + front-end; in class methods, use OTHER if it exists; + in instance methods, use OTHER only if it is locally + declared. + + 2004-10-26 Ziemowit Laski + + * objc-act.c (finish_class): Do not synthesize bogus + 'extern objc_object *_Foo;' declarations for @interface Foo. + + 2004-10-25 Ziemowit Laski + David Ayers + + * objc-act.c (objc_comptypes): Use IS_PROTOCOL_QUALIFIED_UNTYPED + instead of IS_PROTOCOL_QUALIFIED_ID; add comparisons for: + 'Class != id '; 'Class != *'; + 'Class == id' and 'Class == Class'. + (objc_is_id): Add test for 'super'. + (objc_finish_message_expr): Allow for messaging of 'Class ' + receivers; if class methods are not found in protocol lists, search + for instance methods therein and warn if one is found. Look in + global hash tables for suitable method as a last resort when messaging + 'id ', 'Class ' and invalid receiver types. + (objc_add_method): Insert instance methods listed in protocols into + the global class method hash table. + * objc-act.h (IS_PROTOCOL_QUALIFIED_ID): Rename to + IS_PROTOCOL_QUALIFIED_UNTYPED and allow for 'Class ' in + addition to 'id '. + + 2004-10-21 Andrew Pinski + + PR objc/17923 + * objc-act.c (objc_build_string_object): Create a CONST_DECL + for the NeXT runtime case. + + 2004-10-02 Kazu Hirata + + * objc-act.c: Fix comment typos. + + 2004-09-24 Ziemowit Laski + + * objc-act.c (init_objc_symtab, init_module_descriptor, + build_shared_structure_initializer): When initializing 'long' + fields, ensure that the initializer value is also 'long'. + + 2004-09-24 Zack Weinberg + + * objc-act.c: Change annotate_with_locus to SET_EXPR_LOCATION + throughout. + (objc_init): Only set input_line to 0 #ifndef USE_MAPPED_LOCATION. + (build_selector_translation_table): Use %J in diagnostic + instead of diddling input_line. Fix spelling. + + 2004-09-21 Ziemowit Laski + + * objc-act.c (objc_fold_objc_type_ref): New function. + * objc-act.h (objc_fold_objc_type_ref): New prototype. + + 2004-09-09 Joseph S. Myers + + * objc-act.c (objc_start_function, really_start_method, + objc_get_parm_info, start_method_def): Update to new arg_info + structures. + + 2004-09-07 Ziemowit Laski + + * Make-lang.in (objc/objc-parse.o): Depend on $(C_COMMON_H) instead of + objc/objc-act.h. + (objc/objc-act.o): Depend on $(HASHTAB_H). + * objc-act.c: Include hashtab.h; in ObjC++ mode, include cp-tree.h and + objcp-decl.h instead of c-tree.h. + (build_module_descriptor, get_class_ivars, synth_id_with_class_suffix, + error_with_ivar, gen_method_decl, gen_declaration, setup_string_decl, + build_protocol_template): Adjust prototypes. + (build_module_initializer_routine, start_class, continue_class, + finish_class, start_method_def, objc_start_function, start_protocol, + build_method_decl, objc_add_method, add_instance_variable, + build_ivar_reference, is_ivar, is_private, get_super_receiver, + build_selector_table_decl, objc_push_parm, objc_get_parm_info, + gen_type_name, gen_type_name_0, start_var_decl, finish_var_decl, + create_field_decl): New prototypes. + (objc_expand_function_end, comp_method_with_proto, objc_expr_last, + gen_declaration_1, gen_declarator, is_complex_decl, adorn_decl, + define_decl, create_builtin_decl, gen_declspecs): Remove prototypes. + (TYPE_ID): Rename to OBJECT_TYPEDEF_NAME. + (CLASS_TYPEDEF_NAME): New. + (TAG_EXECCLASS): Change from a global variable to a #define. + (TAG_RETURN_STRUCT): Delete. + (TAG_GNUINIT): New, holds '__objc_gnu_init' name. + (objc_inherit_code, objc_public_flag): New, moved from c-parse.in. + (string_descriptor): New struct. + (string_htab): New hash table. + (string_hash, string_eq): New prototypes. + (generate_struct_by_value_array): Call create_field_decl() instead of + create_builtin_decl(). + (objc_init): Do not initialize objc_ellipsis_node or TAG_EXECCLASS; + In ObjC++ mode, call cxx_init() instead of c_objc_common_init(). + (objc_finish_file): In ObjC++, call instantiate_pending_templates() + and cp_finish_file(). + (define_decl, get_static_reference, get_protocol_reference, + create_builtin_decl): Remove functions. + (objc_start_class_interface, objc_start_category_interface, + objc_start_protocol, objc_continue_interface, objc_finish_interface, + objc_start_class_implementation, objc_start_category_implementation, + objc_continue_implementation, objc_finish_implementation, + objc_set_visibility, objc_set_method_type, + objc_build_method_signature, objc_add_method_declaration, + objc_start_method_definition, objc_add_instance_variable, + objc_get_protocol_qualified_type, create_field_decl, + start_var_decl, finish_var_decl): New functions. + (setup_string_decl): Simplify since it is only called once. + (synth_module_prologue): Call build_class_template(); predefine 'id' + and 'Class' as typedefs; rename 'temp_type' to 'type'; disable debug + hooks for duration of function; fix GNU runtime messenger signatures + to correspond to reality; forward-declare '__objc_exec_class' for the + GNU runtime; call build_selector_table_decl(); in ObjC++ mode, generate + 'extern "C" { ... }' wrappers around synthesized declarations; call + build_protocol_template() and build_category_template(). + (string_hash, string_eq): New functions. + (objc_build_string_object): Check metaclass correctness only once; + store string literals in hash table. + (objc_build_constructor): Do not convert initializer elements; + adjust for ObjC++ impedance mismatch. + (build_objc_symtab_template): Call create_field_decl() instead of + create_builtin_decl(). + (init_objc_symtab): Add missing conversion to initializer element. + (build_metadata_decl): Call start_var_decl() instead of define_decl(). + (generate_objc_symtab_decl): Do not call build_category_template(); + call start_var_decl() and finish_var_decl() instead of start_decl() + and finish_decl(). + (build_module_descriptor): Call create_field_decl() instead of + grokfield(); call start_var_decl() and finish_var_decl() instead of + start_decl() and finish_decl(); always mark module descriptor as + used; move GNU runtime-specific functionality to + build_module_initializer_routine(). + (build_module_initializer_routine): New function, broken off of + build_module_descriptor(). + (objc_static_init_needed_p, objc_generate_static_init_call): New + functions. + (generate_static_references, generate_strings, + build_selector_translation_table, generate_descriptor_table, + generate_ivars_list, generate_dispatch_table, generate_category): Call + start_var_decl() and finish_var_decl() instead of start_decl() and + finish_decl(); build a type directly instead of via groktypename(). + (build_selector_reference_decl, build_selector_table_decl, + build_class_reference_decl, build_protocol_reference, + generate_objc_image_info): Call start_var_decl() instead of + build_decl(). + (build_selector_reference): For GNU runtime, do not call + build_selector_reference_decl(). + (build_selector, build_typed_selector_reference): Always convert + result to the selector type. + (add_objc_string): Cast return value to 'char *'. + (build_method_prototype_template, build_selector_template, + build_method_template): Use actual selector type for fields + pointing to selectors. + (finish_objc): For GNU runtime, call + build_module_initializer_routine() after build_module_descriptor(). + (generate_protocol_list, generate_shared_structures): Call + start_var_decl() and finish_var_decl() instead of start_decl() and + finish_decl(); build a type directly instead of via + groktypename(). + (synth_id_with_class_suffix): Return a string. + (get_arg_type_list): For instance methods, use the instance type for + 'self'; do not call groktypename_in_parm_context(). + (build_objc_string_decl): Squash redeclaration errors in ObjC++. + (objc_is_class_name): Use OBJC_TYPE_NAME instead of TYPE_NAME; + handle RECORD_TYPEs in ObjC as well as ObjC++. + (objc_is_id): New function. + (objc_is_object_ptr): Return the canonical type node. + (objc_get_class_ivars): Simplify using get_class_ivars(). + (get_class_ivars): Remove second parameter; create a fresh copy + of the ivar list for each call; do not check for existence of + super class. + (objc_eh_runtime_type): Mark #ifndef OBJCPLUS. + (objc_init_exceptions): When using SJLJ-style exceptions, require + the use of '-fobjc-exceptions' flag; do not require it for DWARF-style + exceptions. + (objc_build_exc_ptr, next_sjlj_build_try_catch_finally): Use + objc_object_type instead of objc_id_type. + (objc_begin_catch_clause): Convert the incoming PARM_DECL into + a VAR_DECL before placing it in the appropriate scope; do not + call define_decl(); adjust call to c_begin_compound_stmt(); + use objc_object_type instead of objc_id_type. + (build_next_objc_exception_stuff): Call create_field_decl() instead + of create_builtin_decl(); construct type directly instead of calling + groktypename(); use OBJC_VOID_AT_END to mark end of function parameters. + (build_private_template): Adjust call to get_class_ivars(); build + a type directly instead of via groktypename(). + (build_protocol_template, build_method_prototype_list_template, + build_method_prototype_template, build_category_template, + build_selector_template, build_class_template, build_super_template, + build_ivar_template, build_ivar_list_template, + build_method_list_template, build_method_template): + Call create_field_decl() instead of grokfield(). + (objc_method_parm_type): Do not call groktypename(). + (generate_descriptor_table): Call start_var_decl() and + finish_var_decl() instead of start_decl() and finish_decl(). + (generate_method_descriptors, build_protocol_initializer, + generate_dispatch_tables, build_category_initializer, + build_shared_structure_initializer): Do not call groktypename(). + (generate_protocols): Call start_var_decl() and finish_var_decl() + instead of start_decl() and finish_decl(); do not call groktypename(). + (error_with_ivar): Remove last parameter. + (check_ivars): Do not iterate ovar CLASS_RAW_IVARS lists in addition + to CLASS_IVARS lists; adjust calls to error_with_ivar(). + (generate_ivar_lists): Convert one of the initializer elements; do + not call groktypename(). + (get_arg_type_list, start_method_def, gen_method_def): Account for + new representation of variable arguments and '...' in Objective-C + methods; add Objective-C++ impedance matching code. + (is_objc_type_qualifier): Remove function. + (adjust_type_for_id_default): Simplify; there is no longer a need to + wade through declspecs. + (lookup_interface, start_class, continue_class, + finish_class, start_method_def, start_protocol, build_method_decl, + objc_add_method, add_instance_variable, build_ivar_reference, + is_ivar, is_private, get_super_receiver, objc_build_finally_epilogue): + Make into static functions. + (receiver_is_class_object): Use new IS_CLASS() macro. + (objc_build_message_expr): Tweak ObjC++ message argument handling; + call objc_finish_message_expr() instead of finish_message_expr(). + (finish_message_expr): Rename to objc_finish_message_expr(); use + OBJC_TYPE_NAME and OBJC_SET_TYPE_NAME macros instead of TYPE_NAME. + call gen_type_name() instead of gen_declaration(); call objc_is_id() + instead of using IS_ID and IS_CLASS; Use objc_class_name instead of + calling get_identifier("Class"); handle CONVERT_EXPRs in receiver. + (build_objc_method_call, warn_with_method): Do not call groktypename(). + (build_ivar_reference): Call convert() instead of clobbering in a + type. + (hash_init): Initialize string_htab hash table. + (add_instance_variable): Simplify parameter list; do not call grokfield(); + do not populate CLASS_IVARS list. + (start_class): Check for the existence of super class, if one was specified. + (continue_class): Use CLASS_RAW_IVARS rather than CLASS_IVARS; do not + call build_class_template(); adjust call to get_class_ivars(); call + build_decl(), pushdecl() and finish_decl() instead of define_decl(). + (finish_class): Call build_decl(), pushdecl() and finish_decl() instead + of define_decl(). + (add_protocols): Use PROTOCOL_BINFO_ELTS for the tree vector size. + (start_protocol): Do not call build_protocol_template(); use + PROTOCOL_BINFO_ELTS for the tree vector size. + (encode_type_qualifiers): Do not handle the 'const' qualifier here. + (encode_pointer): Encode 'const char *' as 'r*', for backwards + compatibility. + (encode_array): Use HOST_WIDE_INT_PRINT_DEC instead of "%ld". + (encode_type): Handle the 'const' qualifier here. + (objc_parmlist): New global variable, sued by objc_push_parm and + objc_get_parm_info(). + (objc_push_parm, objc_get_parm_info): New functions. + (objc_expr_last): Remove function. + (synth_self_and_ucmd_args): For instance methods, use the instance + type for 'self'; call objc_push_parm() instead of push_parm_decl(). + (start_method_def): Do not call push_scope(), declare_parm_level(), + pop_scope(), push_parm_decl(), store_parm_decls() or objc_expr_last(); + just use objc_push_parm() and objc_get_parm_info(). + (comp_method_with_proto): Remove function. + (objc_types_are_equivalent): Strip away indirections before comparing + underlying types. + (comp_proto_with_proto): Do not call groktypename(); types are no + longer in raw declspec format. + (objc_start_function): New function. + (really_start_method): Call comp_proto_with_proto() instead of + comp_method_with_proto(); call objc_start_function() instead of + hand-crafting a function declarator. + (continue_method_def, objc_expand_function_end): Remove functions. + (get_super_receiver): Call objc_get_current_scope() instead of + get_current_scope(); reference 'super_class' field (instead of + 'class'). + (finish_method_def): Rename to objc_finish_method_definition() and + add a function decl parameter; move method encoding call from + objc_expand_function_end(). + (is_complex_decl, adorn_decl, gen_declarator, gen_declspecs, + gen_declaration_1): Remove functions. + (tmpbuf, RAW_DECLSPEC): Remove. + (gen_declaration): Remove second parameter; simplify to deal + with TYPE_P nodes instead of raw declspecs. + (gen_type_name, gen_type_name_0): New functions. + (gen_method_decl): Remove second parameter; call gen_type_name() + instead of gen_declaration_1(). + (dump_interface): Adjust calls to gen_declaration() and + gen_method_decl(); do not allocate a separate string buffer. + (init_objc): Allocate a larger string buffer to accommodate + dump_interface(); adjust call to build_module_descriptor(); + add call to build_module_initializer_routine() for the GNU + runtime. + (generate_classref_translation_entry): Do not call start_decl(); call + finish_var_decl() instead of finish_decl(); call convert() instead of + build_c_cast(). + * objc-act.h (CLASS_OWN_IVARS): Remove accessor. + (CLASS_BINFO_ELTS): Reduce from 6 to 5, now that CLASS_OWN_IVARS is + gone. + (OCTI_GNU_INIT_DECL, GNU_INIT_decl): New. + (OCTI_ELLIPSIS_NODE, objc_ellipsis_node): Remove. + (OCTI_ID_ID, id_type, objc_id_id): Rename to OCTI_ID_NAME, + objc_object_type and objc_object_name, respectively. + (OCTI_CLS_REF, OCTI_CLASS_NAME, objc_class_reference, + objc_class_name): New. + (IS_CLASS): New macro. + (IS_ID, IS_SUPER): Robustify. + (OCTI_EXECCLASS_DECL, execclass_decl): New. + (finish_file, start_class, continue_class, finish_class, + start_method_def, continue_method_def, finish_method_def, + start_protocol, finish_protocol, objc_build_throw_stmt, + objc_build_try_catch_finally_stmt, objc_build_synchronized_prologue, + objc_build_synchronized_epilogue, objc_build_try_prologue, + objc_build_try_epilogue, objc_build_catch_stmt, objc_build_catch_epilogue, + objc_build_finally_prologue, objc_build_finally_epilogue, + is_ivar, is_private, is_public, add_instance_variable, objc_add_method, + get_super_receiver, objc_clear_super_receiver, get_class_ivars_from_name, + get_class_reference, get_static_reference, get_object_reference, + build_message_expr, finish_message_expr, build_selector_expr, + build_ivar_reference, build_keyword_decl, build_method_decl, + build_protocol_expr, build_objc_string_object, objc_declare_alias, + objc_declare_class, objc_declare_protocols, objc_comptypes, + objc_check_decl, build_encode_expr): Remove prototypes. + (imp_count, cat_count): Make GGC-aware. + (OBJC_SET_TYPE_NAME): New macro. + + 2004-09-03 Ziemowit Laski + + * config-lang.in: Update copyright notice. + (lang_requires): Indicate that ObjC requires C to be built first. + + 2004-09-01 Ziemowit Laski + + * objc-act.c (objc_check_decl): Use OBJC_TYPE_NAME macro instead of + TYPE_NAME. + (build_objc_string_object): Rename to objc_build_string_object(). + (get_class_reference): Rename to objc_get_class_reference(). + (get_class_ivars_from_name): Rename to objc_get_class_ivars(). + (next_sjlj_build_catch_list, get_super_receiver): Call + objc_get_class_reference() instead of get_class_reference(). + (build_keyword_decl): Rename to objc_build_keyword_decl(). + (build_message_expr): Rename to objc_build_message_expr(). + (build_protocol_expr): Rename to objc_build_protocol_expr(). + (build_selector_expr): Rename to objc_build_selector_expr(). + (build_encode_expr): Rename to objc_build_encode_expr(). + * objc-act.h (get_class_ivars_from_name): Rename prototype to + objc_get_class_ivars(). + (get_class_reference): Rename prototype to objc_get_class_reference(). + (build_message_expr): Rename prototype to objc_build_message_expr(). + (build_selector_expr): Rename prototype to objc_build_selector_expr(). + (build_keyword_decl): Rename prototype to objc_build_keyword_decl(). + (build_protocol_expr): Rename prototype to objc_build_prototype_expr(). + (build_objc_string_object): Rename prototype to + objc_build_string_object(). + + 2004-09-01 Ziemowit Laski + + * objc-act.c (lookup_interface): Make function 'static' and add a + local prototype. + (objc_check_decl, get_class_reference, objc_declare_alias, + objc_declare_class, objc_is_object_ptr): Call objc_is_class_name() + instead of is_class_name(). + (get_super_receiver, objc_clear_super_receiver): Call + objc_get_current_scope() instead of get_current_scope(). + (is_class_name): Rename to objc_is_class_name. + (lookup_objc_ivar): Rename to objc_lookup_ivar. + + 2004-08-28 Ziemowit Laski + + * objc-act.c (objc_is_reserved_word): New function. + + 2004-08-15 Ziemowit Laski + + * Make-lang.in (objc/objc-lang.o): Depend on $(C_PRETTY_PRINT_H), + $(DIAGNOSTIC_H), c-objc-common.h and gtype-objc.h, but not on toplev.h. + (objc/objc-parse.o): Do not depend on gtype-objc.h. + * objc-act.c: Do not include gtype-objc.h. + (finish_file): Rename to objc_finish_file(). + * objc-act.h (finish_file): Update copyright notice; remove prototype. + * objc-lang.c: Update copyright notice; include diagnostic.h, + c-objc-common.h, c-pretty-print.h and gtype-objc.h; do not include + toplev.h. + (finish_file): New hook routine. + (LANG_HOOKS_FINISH, LANG_HOOKS_INIT_OPTIONS, + LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION, + LANG_HOOKS_MISSING_ARGUMENT, LANG_HOOKS_POST_OPTIONS, + LANG_HOOKS_GET_ALIAS_SET, LANG_HOOKS_SAFE_FROM_P, + LANG_HOOKS_EXPAND_EXPR, LANG_HOOKS_MARK_ADDRESSABLE, + LANG_HOOKS_PARSE_FILE, LANG_HOOKS_TRUTHVALUE_CONVERSION, + LANG_HOOKS_FINISH_INCOMPLETE_DECL, LANG_HOOKS_UNSAFE_FOR_REEVAL, + LANG_HOOKS_STATICP, LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, + LANG_HOOKS_NO_BODY_BLOCKS, LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, + LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_FUNCTION_ENTER_NESTED, + LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, + LANG_HOOKS_DECL_UNINIT, LANG_HOOKS_RTL_EXPAND_STMT, + LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, + LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN, + LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS, + LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P, + LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING, + LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS, + LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN, + LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_TYPE_FOR_MODE, + LANG_HOOKS_TYPE_FOR_SIZE, LANG_HOOKS_SIGNED_TYPE, + LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, + LANG_HOOKS_INCOMPLETE_TYPE_ERROR, LANG_HOOKS_TYPE_PROMOTES_TO, + LANG_HOOKS_REGISTER_BUILTIN_TYPE, LANG_HOOKS_WRITE_GLOBALS): + Move to c-objc-common.h. diff -Nrcpad gcc-3.4.3/gcc/objc/Make-lang.in gcc-4.0.0/gcc/objc/Make-lang.in *** gcc-3.4.3/gcc/objc/Make-lang.in Fri Feb 6 00:55:53 2004 --- gcc-4.0.0/gcc/objc/Make-lang.in Mon Nov 29 18:53:58 2004 *************** *** 1,5 **** # Top level -*- makefile -*- fragment for GNU Objective-C ! # Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. #This file is part of GCC. --- 1,5 ---- # Top level -*- makefile -*- fragment for GNU Objective-C ! # Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. #This file is part of GCC. *************** cc1obj$(exeext): $(OBJC_OBJS) $(C_AND_OB *** 59,80 **** # Objective C language specific files. objc/objc-lang.o : objc/objc-lang.c \ ! $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) c-tree.h \ ! c-common.h toplev.h objc/objc-act.h langhooks.h $(LANGHOOKS_DEF_H) objc/objc-parse.o : objc/objc-parse.c \ $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_TREE_H) \ ! toplev.h $(GGC_H) c-pragma.h input.h flags.h output.h objc/objc-act.h objc/objc-act.o : objc/objc-act.c \ $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(RTL_H) $(TM_P_H) \ $(EXPR_H) $(TARGET_H) $(C_TREE_H) diagnostic.h toplev.h flags.h \ objc/objc-act.h input.h function.h output.h debug.h langhooks.h \ ! $(LANGHOOKS_DEF_H) gt-objc-objc-act.h gtype-objc.h objc.srcextra: objc/objc-parse.c objc/objc-parse.y -cp -p $^ $(srcdir)/objc ! objc/objc-parse.c : objc/objc-parse.y -$(BISON) $(BISONFLAGS) -o $@ $< --- 59,83 ---- # Objective C language specific files. objc/objc-lang.o : objc/objc-lang.c \ ! $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ ! $(C_TREE_H) $(C_PRETTY_PRINT_H) $(DIAGNOSTIC_H) \ ! $(GGC_H) langhooks.h $(LANGHOOKS_DEF_H) $(C_COMMON_H) gtype-objc.h \ ! c-objc-common.h objc/objc-act.h objc/objc-parse.o : objc/objc-parse.c \ $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_TREE_H) \ ! toplev.h $(GGC_H) input.h flags.h output.h langhooks.h $(C_COMMON_H) \ ! $(C_PRAGMA_H) objc/objc-act.o : objc/objc-act.c \ $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(RTL_H) $(TM_P_H) \ $(EXPR_H) $(TARGET_H) $(C_TREE_H) diagnostic.h toplev.h flags.h \ objc/objc-act.h input.h function.h output.h debug.h langhooks.h \ ! $(LANGHOOKS_DEF_H) $(HASHTAB_H) c-pragma.h gt-objc-objc-act.h objc.srcextra: objc/objc-parse.c objc/objc-parse.y -cp -p $^ $(srcdir)/objc ! objc/objc-parse.c : objc/objc-parse.y -$(BISON) $(BISONFLAGS) -o $@ $< *************** objc/objc-parse.y: c-parse.in *** 82,88 **** echo '/*WARNING: This file is automatically generated!*/' >tmp-objc-prs.y sed -e "/^@@ifc.*/,/^@@end_ifc.*/d" \ -e "/^@@ifobjc.*/d" -e "/^@@end_ifobjc.*/d" < $< >>tmp-objc-prs.y ! $(SHELL) $(srcdir)/move-if-change tmp-objc-prs.y $@ gtype-objc.h : s-gtype ; @true gt-objc-objc-act.h : s-gtype ; @true --- 85,91 ---- echo '/*WARNING: This file is automatically generated!*/' >tmp-objc-prs.y sed -e "/^@@ifc.*/,/^@@end_ifc.*/d" \ -e "/^@@ifobjc.*/d" -e "/^@@end_ifobjc.*/d" < $< >>tmp-objc-prs.y ! $(SHELL) $(srcdir)/../move-if-change tmp-objc-prs.y $@ gtype-objc.h : s-gtype ; @true gt-objc-objc-act.h : s-gtype ; @true diff -Nrcpad gcc-3.4.3/gcc/objc/config-lang.in gcc-4.0.0/gcc/objc/config-lang.in *** gcc-3.4.3/gcc/objc/config-lang.in Wed Aug 20 10:50:20 2003 --- gcc-4.0.0/gcc/objc/config-lang.in Fri Sep 3 20:30:37 2004 *************** *** 1,5 **** # Top level configure fragment for GNU Objective-C ! # Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. #This file is part of GCC. --- 1,5 ---- # Top level configure fragment for GNU Objective-C ! # Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. #This file is part of GCC. *************** stagestuff="cc1obj\$(exeext)" *** 34,37 **** --- 34,40 ---- target_libs=target-libobjc + # Most of the object files for cc1obj actually come from C. + lang_requires="c" + gtfiles="\$(srcdir)/objc/objc-act.h \$(srcdir)/c-parse.in \$(srcdir)/c-tree.h \$(srcdir)/c-decl.c \$(srcdir)/c-objc-common.c \$(srcdir)/c-common.c \$(srcdir)/c-common.h \$(srcdir)/c-pragma.c \$(srcdir)/objc/objc-act.c" diff -Nrcpad gcc-3.4.3/gcc/objc/lang-specs.h gcc-4.0.0/gcc/objc/lang-specs.h *** gcc-3.4.3/gcc/objc/lang-specs.h Thu Oct 23 21:20:54 2003 --- gcc-4.0.0/gcc/objc/lang-specs.h Sat Jan 29 12:16:34 2005 *************** *** 1,5 **** /* Definitions for specs for Objective-C. ! Copyright (C) 1998, 1999, 2002, 2002, 2003 Free Software Foundation, Inc. This file is part of GCC. --- 1,5 ---- /* Definitions for specs for Objective-C. ! Copyright (C) 1998, 1999, 2002, 2002, 2003, 2005 Free Software Foundation, Inc. This file is part of GCC. *************** Boston, MA 02111-1307, USA. */ *** 22,31 **** /* This is the contribution to the `default_compilers' array in gcc.c for objc. */ ! {".m", "@objective-c", 0}, {"@objective-c", ! "%{E|M|MM:%(trad_capable_cpp)\ ! -lang-objc %(cpp_options) %(cpp_debug_options)}\ %{!E:%{!M:%{!MM:\ %{traditional|ftraditional|traditional-cpp:\ %eGNU Objective C no longer supports traditional compilation}\ --- 22,31 ---- /* This is the contribution to the `default_compilers' array in gcc.c for objc. */ ! {".m", "@objective-c", 0, 0, 0}, {"@objective-c", ! "%{E|M|MM:cc1obj -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}\ ! %(cpp_options) %(cpp_debug_options)}\ %{!E:%{!M:%{!MM:\ %{traditional|ftraditional|traditional-cpp:\ %eGNU Objective C no longer supports traditional compilation}\ *************** Boston, MA 02111-1307, USA. */ *** 33,43 **** cc1obj -fpreprocessed %{save-temps:%b.mi} %{!save-temps:%g.mi} %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}\ %{!save-temps:%{!no-integrated-cpp:\ cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}}\ ! %{!fsyntax-only:%(invoke_as)}}}}", 0}, ! {".mi", "@objc-cpp-output", 0}, {"@objc-cpp-output", "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ ! %{!fsyntax-only:%(invoke_as)}}}}", 0}, {"@objective-c-header", "%{E|M|MM:cc1obj -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}\ %(cpp_options) %(cpp_debug_options)}\ --- 33,43 ---- cc1obj -fpreprocessed %{save-temps:%b.mi} %{!save-temps:%g.mi} %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}\ %{!save-temps:%{!no-integrated-cpp:\ cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}}\ ! %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, ! {".mi", "@objc-cpp-output", 0, 0, 0}, {"@objc-cpp-output", "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ ! %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, {"@objective-c-header", "%{E|M|MM:cc1obj -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}\ %(cpp_options) %(cpp_debug_options)}\ *************** Boston, MA 02111-1307, USA. */ *** 51,54 **** %{!save-temps:%{!no-integrated-cpp:\ cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ -o %g.s %{!o*:--output-pch=%i.gch}\ ! %W{o*:--output-pch=%*}%V}}}}}", 0}, --- 51,54 ---- %{!save-temps:%{!no-integrated-cpp:\ cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ -o %g.s %{!o*:--output-pch=%i.gch}\ ! %W{o*:--output-pch=%*}%V}}}}}", 0, 0, 0}, diff -Nrcpad gcc-3.4.3/gcc/objc/objc-act.c gcc-4.0.0/gcc/objc/objc-act.c *** gcc-3.4.3/gcc/objc/objc-act.c Tue Jun 1 07:34:34 2004 --- gcc-4.0.0/gcc/objc/objc-act.c Wed Mar 30 19:59:13 2005 *************** *** 1,6 **** /* Implement classes and message passing for Objective C. Copyright (C) 1992, 1993, 1994, 1995, 1997, 1998, 1999, 2000, ! 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Steve Naroff. This file is part of GCC. --- 1,6 ---- /* Implement classes and message passing for Objective C. Copyright (C) 1992, 1993, 1994, 1995, 1997, 1998, 1999, 2000, ! 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Contributed by Steve Naroff. This file is part of GCC. *************** Boston, MA 02111-1307, USA. */ *** 47,55 **** --- 47,63 ---- #include "rtl.h" #include "tm_p.h" #include "expr.h" + + #ifdef OBJCPLUS + #include "cp-tree.h" + #else #include "c-tree.h" + #endif + #include "c-common.h" + #include "c-pragma.h" #include "flags.h" + #include "langhooks.h" #include "objc-act.h" #include "input.h" #include "except.h" *************** Boston, MA 02111-1307, USA. */ *** 62,69 **** #include "target.h" #include "diagnostic.h" #include "cgraph.h" ! #define OBJC_VOID_AT_END build_tree_list (NULL_TREE, void_type_node) /* This is the default way of generating a method name. */ /* I am not sure it is really correct. --- 70,88 ---- #include "target.h" #include "diagnostic.h" #include "cgraph.h" + #include "tree-iterator.h" + #include "libfuncs.h" + #include "hashtab.h" + #include "langhooks-def.h" ! #define OBJC_VOID_AT_END void_list_node ! ! /* When building Objective-C++, we are not linking against the C front-end ! and so need to replicate the C tree-construction functions in some way. */ ! #ifdef OBJCPLUS ! #define OBJCP_REMAP_FUNCTIONS ! #include "objcp-decl.h" ! #endif /* OBJCPLUS */ /* This is the default way of generating a method name. */ /* I am not sure it is really correct. *************** static void finish_objc (void); *** 125,151 **** static void synth_module_prologue (void); static tree objc_build_constructor (tree, tree); ! static rtx build_module_descriptor (void); static tree init_module_descriptor (tree); static tree build_objc_method_call (int, tree, tree, tree, tree); static void generate_strings (void); static tree get_proto_encoding (tree); static void build_selector_translation_table (void); ! static tree objc_add_static_instance (tree, tree); static void build_objc_exception_stuff (void); ! static tree objc_declare_variable (enum rid, tree, tree, tree); ! static tree objc_enter_block (void); ! static tree objc_exit_block (void); ! static void objc_build_try_enter_fragment (void); ! static void objc_build_try_exit_fragment (void); ! static void objc_build_extract_fragment (void); ! static tree objc_build_extract_expr (void); static tree build_ivar_template (void); static tree build_method_template (void); ! static tree build_private_template (tree); static void build_class_template (void); static void build_selector_template (void); static void build_category_template (void); --- 144,183 ---- static void synth_module_prologue (void); static tree objc_build_constructor (tree, tree); ! static void build_module_descriptor (void); ! static void build_module_initializer_routine (void); static tree init_module_descriptor (tree); static tree build_objc_method_call (int, tree, tree, tree, tree); static void generate_strings (void); static tree get_proto_encoding (tree); static void build_selector_translation_table (void); ! static tree lookup_interface (tree); static tree objc_add_static_instance (tree, tree); + static tree start_class (enum tree_code, tree, tree, tree); + static tree continue_class (tree); + static void finish_class (tree); + static void start_method_def (tree); + #ifdef OBJCPLUS + static void objc_start_function (tree, tree, tree, tree); + #else + static void objc_start_function (tree, tree, tree, struct c_arg_info *); + #endif + static tree start_protocol (enum tree_code, tree, tree); + static tree build_method_decl (enum tree_code, tree, tree, tree); + static tree objc_add_method (tree, tree, int); + static tree add_instance_variable (tree, int, tree); + static tree build_ivar_reference (tree); + static tree is_ivar (tree, tree); + static int is_private (tree); + static tree get_super_receiver (void); + static void build_objc_exception_stuff (void); ! static void build_next_objc_exception_stuff (void); static tree build_ivar_template (void); static tree build_method_template (void); ! static void build_private_template (tree); static void build_class_template (void); static void build_selector_template (void); static void build_category_template (void); *************** static tree build_category_initializer ( *** 155,176 **** static tree build_protocol_initializer (tree, tree, tree, tree, tree); static void synth_forward_declarations (void); static int ivar_list_length (tree); ! static tree get_class_ivars (tree, int); static void generate_ivar_lists (void); static void generate_dispatch_tables (void); static void generate_shared_structures (void); static tree generate_protocol_list (tree); - static void generate_forward_declaration_to_string_table (void); static void build_protocol_reference (tree); static tree build_keyword_selector (tree); ! static tree synth_id_with_class_suffix (const char *, tree); static void generate_static_references (void); static int check_methods_accessible (tree, tree, int); static void encode_aggregate_within (tree, int, int, int, int); static const char *objc_demangle (const char *); - static void objc_expand_function_end (void); /* Hash tables to manage the global pool of method prototypes. */ --- 187,206 ---- static tree build_protocol_initializer (tree, tree, tree, tree, tree); static void synth_forward_declarations (void); static int ivar_list_length (tree); ! static tree get_class_ivars (tree); static void generate_ivar_lists (void); static void generate_dispatch_tables (void); static void generate_shared_structures (void); static tree generate_protocol_list (tree); static void build_protocol_reference (tree); static tree build_keyword_selector (tree); ! static const char *synth_id_with_class_suffix (const char *, tree); static void generate_static_references (void); static int check_methods_accessible (tree, tree, int); static void encode_aggregate_within (tree, int, int, int, int); static const char *objc_demangle (const char *); /* Hash tables to manage the global pool of method prototypes. */ *************** static tree add_objc_string (tree, enum *** 200,205 **** --- 230,236 ---- static tree get_objc_string_decl (tree, enum string_section); static tree build_objc_string_decl (enum string_section); static tree build_selector_reference_decl (void); + static void build_selector_table_decl (void); /* Protocol additions. */ *************** static void encode_gnu_bitfield (int, tr *** 219,251 **** static void encode_type (tree, int, int); static void encode_field_decl (tree, int, int); static void really_start_method (tree, tree); ! static int comp_method_with_proto (tree, tree); static int objc_types_are_equivalent (tree, tree); static int comp_proto_with_proto (tree, tree); static tree get_arg_type_list (tree, int, int); ! static tree objc_expr_last (tree); static void synth_self_and_ucmd_args (void); /* Utilities for debugging and error diagnostics. */ static void warn_with_method (const char *, int, tree); ! static void error_with_ivar (const char *, tree, tree); ! static char *gen_method_decl (tree, char *); ! static char *gen_declaration (tree, char *); ! static void gen_declaration_1 (tree, char *); ! static char *gen_declarator (tree, char *, const char *); ! static int is_complex_decl (tree); ! static void adorn_decl (tree, char *); static void dump_interface (FILE *, tree); /* Everything else. */ - static tree define_decl (tree, tree); static tree lookup_method_in_protocol_list (tree, tree, int); static tree lookup_protocol_in_reflist (tree, tree); ! static tree create_builtin_decl (enum tree_code, tree, const char *); ! static void setup_string_decl (void); static int check_string_class_template (void); static tree my_build_string (int, const char *); static void build_objc_symtab_template (void); --- 250,289 ---- static void encode_type (tree, int, int); static void encode_field_decl (tree, int, int); + #ifdef OBJCPLUS static void really_start_method (tree, tree); ! #else ! static void really_start_method (tree, struct c_arg_info *); ! #endif static int objc_types_are_equivalent (tree, tree); static int comp_proto_with_proto (tree, tree); static tree get_arg_type_list (tree, int, int); ! static void objc_push_parm (tree); ! #ifdef OBJCPLUS ! static tree objc_get_parm_info (int); ! #else ! static struct c_arg_info *objc_get_parm_info (int); ! #endif static void synth_self_and_ucmd_args (void); /* Utilities for debugging and error diagnostics. */ static void warn_with_method (const char *, int, tree); ! static void error_with_ivar (const char *, tree); ! static char *gen_type_name (tree); ! static char *gen_type_name_0 (tree); ! static char *gen_method_decl (tree); ! static char *gen_declaration (tree); static void dump_interface (FILE *, tree); /* Everything else. */ static tree lookup_method_in_protocol_list (tree, tree, int); static tree lookup_protocol_in_reflist (tree, tree); ! static tree start_var_decl (tree, const char *); ! static void finish_var_decl (tree, tree); ! static tree create_field_decl (tree, const char *); ! static tree setup_string_decl (void); static int check_string_class_template (void); static tree my_build_string (int, const char *); static void build_objc_symtab_template (void); *************** static tree build_typed_selector_referen *** 259,265 **** static tree build_selector_reference (tree); static tree build_class_reference_decl (void); static void add_class_reference (tree); ! static tree build_protocol_template (void); static tree build_descriptor_table_initializer (tree, tree); static tree build_method_prototype_list_template (tree, int); static tree build_method_prototype_template (void); --- 297,303 ---- static tree build_selector_reference (tree); static tree build_class_reference_decl (void); static void add_class_reference (tree); ! static void build_protocol_template (void); static tree build_descriptor_table_initializer (tree, tree); static tree build_method_prototype_list_template (tree, int); static tree build_method_prototype_template (void); *************** static tree generate_dispatch_table (tre *** 280,286 **** static tree build_shared_structure_initializer (tree, tree, tree, tree, tree, int, tree, tree, tree); static void generate_category (tree); - static int is_objc_type_qualifier (tree); static tree adjust_type_for_id_default (tree); static tree check_duplicates (hash, int, int); static tree receiver_is_class_object (tree, int, int); --- 318,323 ---- *************** static int check_methods (tree, tree, in *** 288,294 **** static int conforms_to_protocol (tree, tree); static void check_protocol (tree, const char *, const char *); static void check_protocols (tree, const char *, const char *); - static void gen_declspecs (tree, char *, int); static void generate_classref_translation_entry (tree); static void handle_class_ref (tree); static void generate_struct_by_value_array (void) --- 325,330 ---- *************** static void generate_objc_image_info (vo *** 300,331 **** /* Reserved tag definitions. */ ! #define TYPE_ID "id" ! #define TAG_OBJECT "objc_object" ! #define TAG_CLASS "objc_class" ! #define TAG_SUPER "objc_super" ! #define TAG_SELECTOR "objc_selector" ! #define UTAG_CLASS "_objc_class" ! #define UTAG_IVAR "_objc_ivar" ! #define UTAG_IVAR_LIST "_objc_ivar_list" ! #define UTAG_METHOD "_objc_method" ! #define UTAG_METHOD_LIST "_objc_method_list" ! #define UTAG_CATEGORY "_objc_category" ! #define UTAG_MODULE "_objc_module" ! #define UTAG_SYMTAB "_objc_symtab" ! #define UTAG_SUPER "_objc_super" ! #define UTAG_SELECTOR "_objc_selector" ! #define UTAG_PROTOCOL "_objc_protocol" ! #define UTAG_METHOD_PROTOTYPE "_objc_method_prototype" ! #define UTAG_METHOD_PROTOTYPE_LIST "_objc__method_prototype_list" /* Note that the string object global name is only needed for the NeXT runtime. */ ! #define STRING_OBJECT_GLOBAL_FORMAT "_%sClassReference" ! #define PROTOCOL_OBJECT_CLASS_NAME "Protocol" static const char *TAG_GETCLASS; static const char *TAG_GETMETACLASS; --- 336,369 ---- /* Reserved tag definitions. */ ! #define OBJECT_TYPEDEF_NAME "id" ! #define CLASS_TYPEDEF_NAME "Class" ! #define TAG_OBJECT "objc_object" ! #define TAG_CLASS "objc_class" ! #define TAG_SUPER "objc_super" ! #define TAG_SELECTOR "objc_selector" ! #define UTAG_CLASS "_objc_class" ! #define UTAG_IVAR "_objc_ivar" ! #define UTAG_IVAR_LIST "_objc_ivar_list" ! #define UTAG_METHOD "_objc_method" ! #define UTAG_METHOD_LIST "_objc_method_list" ! #define UTAG_CATEGORY "_objc_category" ! #define UTAG_MODULE "_objc_module" ! #define UTAG_SYMTAB "_objc_symtab" ! #define UTAG_SUPER "_objc_super" ! #define UTAG_SELECTOR "_objc_selector" ! ! #define UTAG_PROTOCOL "_objc_protocol" ! #define UTAG_METHOD_PROTOTYPE "_objc_method_prototype" ! #define UTAG_METHOD_PROTOTYPE_LIST "_objc__method_prototype_list" /* Note that the string object global name is only needed for the NeXT runtime. */ ! #define STRING_OBJECT_GLOBAL_FORMAT "_%sClassReference" ! #define PROTOCOL_OBJECT_CLASS_NAME "Protocol" static const char *TAG_GETCLASS; static const char *TAG_GETMETACLASS; *************** static const char *TAG_MSGSENDSUPER; *** 335,341 **** when returning a structure. */ static const char *TAG_MSGSEND_STRET; static const char *TAG_MSGSENDSUPER_STRET; - static const char *TAG_EXECCLASS; static const char *default_constant_string_class_name; /* Runtime metadata flags. */ --- 373,378 ---- *************** static const char *default_constant_stri *** 354,359 **** --- 391,398 ---- #define OBJC_MODIFIER_TRANSIENT 0x00000200 #define OBJC_MODIFIER_NONE_SPECIFIED 0x80000000 + /* NeXT-specific tags. */ + #define TAG_MSGSEND_NONNIL "objc_msgSendNonNil" #define TAG_MSGSEND_NONNIL_STRET "objc_msgSendNonNil_stret" #define TAG_EXCEPTIONEXTRACT "objc_exception_extract" *************** static const char *default_constant_stri *** 364,389 **** #define TAG_SYNCENTER "objc_sync_enter" #define TAG_SYNCEXIT "objc_sync_exit" #define TAG_SETJMP "_setjmp" - #define TAG_RETURN_STRUCT "objc_return_struct" - #define UTAG_EXCDATA "_objc_exception_data" - #define UTAG_EXCDATA_VAR "_stackExceptionData" - #define UTAG_CAUGHTEXC_VAR "_caughtException" - #define UTAG_RETHROWEXC_VAR "_rethrowException" - #define UTAG_EVALONCE_VAR "_eval_once" ! struct val_stack { ! long val; ! struct val_stack *next; ! }; ! static struct val_stack *catch_count_stack, *exc_binding_stack; ! ! /* useful for debugging */ ! static int if_nesting_count; ! static int blk_nesting_count; ! static void val_stack_push (struct val_stack **, long); ! static void val_stack_pop (struct val_stack **); /* The OCTI_... enumeration itself is in objc/objc-act.h. */ tree objc_global_trees[OCTI_MAX]; --- 403,414 ---- #define TAG_SYNCENTER "objc_sync_enter" #define TAG_SYNCEXIT "objc_sync_exit" #define TAG_SETJMP "_setjmp" #define UTAG_EXCDATA "_objc_exception_data" ! /* GNU-specific tags. */ ! #define TAG_EXECCLASS "__objc_exec_class" ! #define TAG_GNUINIT "__objc_gnu_init" /* The OCTI_... enumeration itself is in objc/objc-act.h. */ tree objc_global_trees[OCTI_MAX]; *************** struct imp_entry *imp_list = 0; *** 394,399 **** --- 419,427 ---- int imp_count = 0; /* `@implementation' */ int cat_count = 0; /* `@category' */ + enum tree_code objc_inherit_code; + int objc_public_flag; + /* Use to generate method labels. */ static int method_slot = 0; *************** extern const char *dump_base_name; *** 411,416 **** --- 439,461 ---- static int flag_typed_selectors; + /* Store all constructed constant strings in a hash table so that + they get uniqued properly. */ + + struct string_descriptor GTY(()) + { + /* The literal argument . */ + tree literal; + + /* The resulting constant string. */ + tree constructor; + }; + + static GTY((param_is (struct string_descriptor))) htab_t string_htab; + + static hashval_t string_hash (const void *); + static int string_eq (const void *, const void *); + FILE *gen_declaration_file; /* Tells "encode_pointer/encode_aggregate" whether we are generating *************** generate_struct_by_value_array (void) *** 442,458 **** type = start_struct (RECORD_TYPE, NULL_TREE); strcpy (buffer, "c1"); ! field_decl = create_builtin_decl (FIELD_DECL, ! char_type_node, ! buffer); field_decl_chain = field_decl; for (j = 1; j < i; j++) { sprintf (buffer, "c%d", j + 1); ! field_decl = create_builtin_decl (FIELD_DECL, ! char_type_node, ! buffer); chainon (field_decl_chain, field_decl); } finish_struct (type, field_decl_chain, NULL_TREE); --- 487,501 ---- type = start_struct (RECORD_TYPE, NULL_TREE); strcpy (buffer, "c1"); ! field_decl = create_field_decl (char_type_node, ! buffer); field_decl_chain = field_decl; for (j = 1; j < i; j++) { sprintf (buffer, "c%d", j + 1); ! field_decl = create_field_decl (char_type_node, ! buffer); chainon (field_decl_chain, field_decl); } finish_struct (type, field_decl_chain, NULL_TREE); *************** generate_struct_by_value_array (void) *** 486,498 **** --- 529,547 ---- bool objc_init (void) { + #ifdef OBJCPLUS + if (cxx_init () == false) + #else if (c_objc_common_init () == false) + #endif return false; + #ifndef USE_MAPPED_LOCATION /* Force the line number back to 0; check_newline will have raised it to 1, which will make the builtin functions appear not to be built in. */ input_line = 0; + #endif /* If gen_declaration desired, open the output file. */ if (flag_gen_declaration) *************** objc_init (void) *** 512,518 **** TAG_MSGSENDSUPER = "objc_msgSendSuper"; TAG_MSGSEND_STRET = "objc_msgSend_stret"; TAG_MSGSENDSUPER_STRET = "objc_msgSendSuper_stret"; - TAG_EXECCLASS = "__objc_execClass"; default_constant_string_class_name = "NSConstantString"; } else --- 561,566 ---- *************** objc_init (void) *** 523,535 **** TAG_MSGSENDSUPER = "objc_msg_lookup_super"; /* GNU runtime does not provide special functions to support structure-returning methods. */ - TAG_EXECCLASS = "__objc_exec_class"; default_constant_string_class_name = "NXConstantString"; flag_typed_selectors = 1; } - objc_ellipsis_node = make_node (ERROR_MARK); - init_objc (); if (print_struct_values) --- 571,580 ---- *************** objc_init (void) *** 539,548 **** } void ! finish_file (void) { mark_referenced_methods (); ! c_objc_common_finish_file (); /* Finalize Objective-C runtime data. No need to generate tables and code if only checking syntax. */ --- 584,599 ---- } void ! objc_finish_file (void) { mark_referenced_methods (); ! ! #ifdef OBJCPLUS ! /* We need to instantiate templates _before_ we emit ObjC metadata; ! if we do not, some metadata (such as selectors) may go missing. */ ! at_eof = 1; ! instantiate_pending_templates (0); ! #endif /* Finalize Objective-C runtime data. No need to generate tables and code if only checking syntax. */ *************** finish_file (void) *** 551,569 **** if (gen_declaration_file) fclose (gen_declaration_file); } ! static tree ! define_decl (tree declarator, tree declspecs) ! { ! tree decl = start_decl (declarator, declspecs, 0, NULL_TREE); ! finish_decl (decl, NULL_TREE, NULL_TREE); ! return decl; ! } ! static tree lookup_method_in_protocol_list (tree rproto_list, tree sel_name, ! int class_meth) { tree rproto, p; tree fnd = 0; --- 602,620 ---- if (gen_declaration_file) fclose (gen_declaration_file); + + #ifdef OBJCPLUS + cp_finish_file (); + #endif } ! /* Return the first occurrence of a method declaration corresponding ! to sel_name in rproto_list. Search rproto_list recursively. ! If is_class is 0, search for instance methods, otherwise for class ! methods. */ static tree lookup_method_in_protocol_list (tree rproto_list, tree sel_name, ! int is_class) { tree rproto, p; tree fnd = 0; *************** lookup_method_in_protocol_list (tree rpr *** 574,586 **** if (TREE_CODE (p) == PROTOCOL_INTERFACE_TYPE) { ! if ((fnd = lookup_method (class_meth ? PROTOCOL_CLS_METHODS (p) : PROTOCOL_NST_METHODS (p), sel_name))) ; else if (PROTOCOL_LIST (p)) fnd = lookup_method_in_protocol_list (PROTOCOL_LIST (p), ! sel_name, class_meth); } else { --- 625,637 ---- if (TREE_CODE (p) == PROTOCOL_INTERFACE_TYPE) { ! if ((fnd = lookup_method (is_class ? PROTOCOL_CLS_METHODS (p) : PROTOCOL_NST_METHODS (p), sel_name))) ; else if (PROTOCOL_LIST (p)) fnd = lookup_method_in_protocol_list (PROTOCOL_LIST (p), ! sel_name, is_class); } else { *************** lookup_protocol_in_reflist (tree rproto_ *** 628,633 **** --- 679,864 ---- return 0; } + void + objc_start_class_interface (tree class, tree super_class, tree protos) + { + objc_interface_context + = objc_ivar_context + = start_class (CLASS_INTERFACE_TYPE, class, super_class, protos); + objc_public_flag = 0; + } + + void + objc_start_category_interface (tree class, tree categ, tree protos) + { + objc_interface_context + = start_class (CATEGORY_INTERFACE_TYPE, class, categ, protos); + objc_ivar_chain + = continue_class (objc_interface_context); + } + + void + objc_start_protocol (tree name, tree protos) + { + objc_interface_context + = start_protocol (PROTOCOL_INTERFACE_TYPE, name, protos); + } + + void + objc_continue_interface (void) + { + objc_ivar_chain + = continue_class (objc_interface_context); + } + + void + objc_finish_interface (void) + { + finish_class (objc_interface_context); + objc_interface_context = NULL_TREE; + } + + void + objc_start_class_implementation (tree class, tree super_class) + { + objc_implementation_context + = objc_ivar_context + = start_class (CLASS_IMPLEMENTATION_TYPE, class, super_class, NULL_TREE); + objc_public_flag = 0; + } + + void + objc_start_category_implementation (tree class, tree categ) + { + objc_implementation_context + = start_class (CATEGORY_IMPLEMENTATION_TYPE, class, categ, NULL_TREE); + objc_ivar_chain + = continue_class (objc_implementation_context); + } + + void + objc_continue_implementation (void) + { + objc_ivar_chain + = continue_class (objc_implementation_context); + } + + void + objc_finish_implementation (void) + { + if (objc_implementation_context) + { + finish_class (objc_implementation_context); + objc_ivar_chain = NULL_TREE; + objc_implementation_context = NULL_TREE; + } + else + warning ("%<@end%> must appear in an @implementation context"); + } + + void + objc_set_visibility (int visibility) + { + objc_public_flag = visibility; + } + + void + objc_set_method_type (enum tree_code type) + { + objc_inherit_code = (type == PLUS_EXPR + ? CLASS_METHOD_DECL + : INSTANCE_METHOD_DECL); + } + + tree + objc_build_method_signature (tree rettype, tree selector, tree optparms) + { + return build_method_decl (objc_inherit_code, rettype, selector, optparms); + } + + void + objc_add_method_declaration (tree decl) + { + if (!objc_interface_context) + fatal_error ("method declaration not in @interface context"); + + objc_add_method (objc_interface_context, + decl, + objc_inherit_code == CLASS_METHOD_DECL); + } + + void + objc_start_method_definition (tree decl) + { + if (!objc_implementation_context) + fatal_error ("method definition not in @implementation context"); + + objc_add_method (objc_implementation_context, + decl, + objc_inherit_code == CLASS_METHOD_DECL); + start_method_def (decl); + } + + void + objc_add_instance_variable (tree decl) + { + (void) add_instance_variable (objc_ivar_context, + objc_public_flag, + decl); + } + + /* Return 1 if IDENT is an ObjC/ObjC++ reserved keyword in the context of + an '@'. */ + + int + objc_is_reserved_word (tree ident) + { + unsigned char code = C_RID_CODE (ident); + + return (OBJC_IS_AT_KEYWORD (code) + #ifdef OBJCPLUS + || code == RID_CLASS || code == RID_PUBLIC + || code == RID_PROTECTED || code == RID_PRIVATE + || code == RID_TRY || code == RID_THROW || code == RID_CATCH + #endif + ); + } + + /* Return true if TYPE is 'id'. */ + + static bool + objc_is_object_id (tree type) + { + return OBJC_TYPE_NAME (type) == objc_object_id; + } + + static bool + objc_is_class_id (tree type) + { + return OBJC_TYPE_NAME (type) == objc_class_id; + } + + + int + objc_types_compatible_p (tree type1, tree type2) + { + + if (objc_is_object_ptr (type1) || objc_is_object_ptr (type2) + || objc_is_class_name (type1) || objc_is_class_name (type2)) + { + return lhd_types_compatible_p (type1, type2); + } + else + { + #ifdef OBJCPLUS + return cxx_types_compatible_p (type1, type2); + #else + return c_types_compatible_p (type1, type2); + #endif + } + } + + /* Return 1 if LHS and RHS are compatible types for assignment or various other operations. Return 0 if they are incompatible, and return -1 if we choose to not decide (because the types are really *************** objc_comptypes (tree lhs, tree rhs, int *** 659,677 **** && TREE_CODE (rhs) == POINTER_TYPE && TREE_CODE (TREE_TYPE (rhs)) == RECORD_TYPE) { ! int lhs_is_proto = IS_PROTOCOL_QUALIFIED_ID (lhs); ! int rhs_is_proto = IS_PROTOCOL_QUALIFIED_ID (rhs); if (lhs_is_proto) { ! tree lproto, lproto_list = TYPE_PROTOCOL_LIST (lhs); tree rproto, rproto_list; tree p; /* = */ if (rhs_is_proto) { ! rproto_list = TYPE_PROTOCOL_LIST (rhs); if (!reflexive) { --- 890,913 ---- && TREE_CODE (rhs) == POINTER_TYPE && TREE_CODE (TREE_TYPE (rhs)) == RECORD_TYPE) { ! int lhs_is_proto = IS_PROTOCOL_QUALIFIED_UNTYPED (lhs); ! int rhs_is_proto = IS_PROTOCOL_QUALIFIED_UNTYPED (rhs); if (lhs_is_proto) { ! tree lproto, lproto_list = TYPE_OBJC_PROTOCOL_LIST (TREE_TYPE (lhs)); tree rproto, rproto_list; tree p; /* = */ if (rhs_is_proto) { ! /* Class != id ; ! id != Class */ ! if (IS_ID (lhs) != IS_ID (rhs)) ! return 0; ! ! rproto_list = TYPE_OBJC_PROTOCOL_LIST (TREE_TYPE (rhs)); if (!reflexive) { *************** objc_comptypes (tree lhs, tree rhs, int *** 686,692 **** if (!rproto) warning ! ("object does not conform to the `%s' protocol", IDENTIFIER_POINTER (PROTOCOL_NAME (p))); } return 1; --- 922,928 ---- if (!rproto) warning ! ("object does not conform to the %qs protocol", IDENTIFIER_POINTER (PROTOCOL_NAME (p))); } return 1; *************** objc_comptypes (tree lhs, tree rhs, int *** 735,740 **** --- 971,980 ---- tree rname = OBJC_TYPE_NAME (TREE_TYPE (rhs)); tree rinter; + /* Class != * */ + if (IS_CLASS (lhs)) + return 0; + /* Make sure the protocol is supported by the object on the rhs. */ for (lproto = lproto_list; lproto; lproto = TREE_CHAIN (lproto)) *************** objc_comptypes (tree lhs, tree rhs, int *** 753,761 **** the protocol we're looking for, check for "one-off" protocols (e.g., `NSObject *foo;') attached to the rhs. */ ! if (!rproto) { ! rproto_list = TYPE_PROTOCOL_LIST (TREE_TYPE (rhs)); rproto = lookup_protocol_in_reflist (rproto_list, p); } --- 993,1001 ---- the protocol we're looking for, check for "one-off" protocols (e.g., `NSObject *foo;') attached to the rhs. */ ! if (!rproto && TYPE_HAS_OBJC_INFO (TREE_TYPE (rhs))) { ! rproto_list = TYPE_OBJC_PROTOCOL_LIST (TREE_TYPE (rhs)); rproto = lookup_protocol_in_reflist (rproto_list, p); } *************** objc_comptypes (tree lhs, tree rhs, int *** 772,792 **** } if (!rproto) ! warning ("class `%s' does not implement the `%s' protocol", IDENTIFIER_POINTER (OBJC_TYPE_NAME (TREE_TYPE (rhs))), IDENTIFIER_POINTER (PROTOCOL_NAME (p))); } return 1; } ! /* = id */ ! else if (OBJC_TYPE_NAME (TREE_TYPE (rhs)) == objc_object_id) { return 1; } ! /* = Class */ ! else if (OBJC_TYPE_NAME (TREE_TYPE (rhs)) == objc_class_id) { ! return 0; } /* = ?? : let comptypes decide. */ return -1; --- 1012,1032 ---- } if (!rproto) ! warning ("class %qs does not implement the %qs protocol", IDENTIFIER_POINTER (OBJC_TYPE_NAME (TREE_TYPE (rhs))), IDENTIFIER_POINTER (PROTOCOL_NAME (p))); } return 1; } ! /* id = id; Class = id */ ! else if (objc_is_object_id (TREE_TYPE (rhs))) { return 1; } ! /* id != Class; Class = Class */ ! else if (objc_is_class_id (TREE_TYPE (rhs))) { ! return IS_CLASS (lhs); } /* = ?? : let comptypes decide. */ return -1; *************** objc_comptypes (tree lhs, tree rhs, int *** 796,806 **** /* * = */ if (TYPED_OBJECT (TREE_TYPE (lhs))) { if (reflexive) { tree rname = OBJC_TYPE_NAME (TREE_TYPE (lhs)); tree rinter; ! tree rproto, rproto_list = TYPE_PROTOCOL_LIST (rhs); /* Make sure the protocol is supported by the object on the lhs. */ --- 1036,1050 ---- /* * = */ if (TYPED_OBJECT (TREE_TYPE (lhs))) { + /* * != Class */ + if (IS_CLASS (rhs)) + return 0; + if (reflexive) { tree rname = OBJC_TYPE_NAME (TREE_TYPE (lhs)); tree rinter; ! tree rproto, rproto_list = TYPE_OBJC_PROTOCOL_LIST (TREE_TYPE (rhs)); /* Make sure the protocol is supported by the object on the lhs. */ *************** objc_comptypes (tree lhs, tree rhs, int *** 822,830 **** check for "one-off" protocols (e.g., `NSObject *foo;') attached to the lhs. */ ! if (!lproto) { ! lproto_list = TYPE_PROTOCOL_LIST (TREE_TYPE (lhs)); lproto = lookup_protocol_in_reflist (lproto_list, p); --- 1066,1074 ---- check for "one-off" protocols (e.g., `NSObject *foo;') attached to the lhs. */ ! if (!lproto && TYPE_HAS_OBJC_INFO (TREE_TYPE (lhs))) { ! lproto_list = TYPE_OBJC_PROTOCOL_LIST (TREE_TYPE (lhs)); lproto = lookup_protocol_in_reflist (lproto_list, p); *************** objc_comptypes (tree lhs, tree rhs, int *** 845,851 **** } if (!lproto) ! warning ("class `%s' does not implement the `%s' protocol", IDENTIFIER_POINTER (OBJC_TYPE_NAME (TREE_TYPE (lhs))), IDENTIFIER_POINTER (PROTOCOL_NAME (p))); --- 1089,1095 ---- } if (!lproto) ! warning ("class %qs does not implement the %qs protocol", IDENTIFIER_POINTER (OBJC_TYPE_NAME (TREE_TYPE (lhs))), IDENTIFIER_POINTER (PROTOCOL_NAME (p))); *************** objc_comptypes (tree lhs, tree rhs, int *** 855,869 **** else return 0; } ! /* id = */ ! else if (OBJC_TYPE_NAME (TREE_TYPE (lhs)) == objc_object_id) { return 1; } ! /* Class = */ ! else if (OBJC_TYPE_NAME (TREE_TYPE (lhs)) == objc_class_id) { ! return 0; } /* ??? = : let comptypes decide */ else --- 1099,1113 ---- else return 0; } ! /* id = id ; id = Class */ ! else if (objc_is_object_id (TREE_TYPE (lhs))) { return 1; } ! /* Class != id ; Class = Class */ ! else if (objc_is_class_id (TREE_TYPE (lhs))) { ! return IS_CLASS (rhs); } /* ??? = : let comptypes decide */ else *************** objc_comptypes (tree lhs, tree rhs, int *** 894,911 **** 'Object *o = [[Object alloc] init]; falls in the case * = `id'. */ ! if ((OBJC_TYPE_NAME (lhs) == objc_object_id && TYPED_OBJECT (rhs)) ! || (OBJC_TYPE_NAME (rhs) == objc_object_id && TYPED_OBJECT (lhs))) return 1; /* `id' = `Class', `Class' = `id' */ ! else if ((OBJC_TYPE_NAME (lhs) == objc_object_id ! && OBJC_TYPE_NAME (rhs) == objc_class_id) ! || (OBJC_TYPE_NAME (lhs) == objc_class_id ! && OBJC_TYPE_NAME (rhs) == objc_object_id)) return 1; /* ` *' = ` *' */ else if (TYPED_OBJECT (lhs) && TYPED_OBJECT (rhs)) --- 1138,1158 ---- 'Object *o = [[Object alloc] init]; falls in the case * = `id'. */ ! if ((objc_is_object_id (lhs) && TYPED_OBJECT (rhs)) ! || (objc_is_object_id (rhs) && TYPED_OBJECT (lhs))) return 1; /* `id' = `Class', `Class' = `id' */ ! else if ((objc_is_object_id (lhs) && objc_is_class_id (rhs)) ! || (objc_is_class_id (lhs) && objc_is_object_id (rhs))) return 1; + /* `Class' != ` *' && ` *' != `Class'! */ + else if ((OBJC_TYPE_NAME (lhs) == objc_class_id && TYPED_OBJECT (rhs)) + || (OBJC_TYPE_NAME (rhs) == objc_class_id && TYPED_OBJECT (lhs))) + return 0; + /* ` *' = ` *' */ else if (TYPED_OBJECT (lhs) && TYPED_OBJECT (rhs)) *************** objc_check_decl (tree decl) *** 947,1034 **** if (TREE_CODE (type) != RECORD_TYPE) return; ! if (TYPE_NAME (type) && (type = is_class_name (TYPE_NAME (type)))) ! error ("statically allocated instance of Objective-C class `%s'", IDENTIFIER_POINTER (type)); } ! /* Implement static typing. At this point, we know we have an interface. */ tree ! get_static_reference (tree interface, tree protocols) { ! tree type = xref_tag (RECORD_TYPE, interface); ! if (protocols) { ! tree t, m = TYPE_MAIN_VARIANT (type); ! ! t = copy_node (type); ! ! /* Add this type to the chain of variants of TYPE. */ ! TYPE_NEXT_VARIANT (t) = TYPE_NEXT_VARIANT (m); ! TYPE_NEXT_VARIANT (m) = t; ! ! /* Look up protocols and install in lang specific list. Note ! that the protocol list can have a different lifetime than T! */ ! SET_TYPE_PROTOCOL_LIST (t, lookup_and_install_protocols (protocols)); ! ! /* This forces a new pointer type to be created later ! (in build_pointer_type)...so that the new template ! we just created will actually be used...what a hack! */ ! if (TYPE_POINTER_TO (t)) ! TYPE_POINTER_TO (t) = NULL_TREE; ! ! type = t; ! } ! ! return type; ! } ! ! tree ! get_object_reference (tree protocols) ! { ! tree type_decl = lookup_name (objc_id_id); ! tree type; ! if (type_decl && TREE_CODE (type_decl) == TYPE_DECL) ! { ! type = TREE_TYPE (type_decl); ! if (TYPE_MAIN_VARIANT (type) != id_type) ! warning ("unexpected type for `id' (%s)", ! gen_declaration (type, errbuf)); ! } ! else ! { ! error ("undefined type `id', please import "); ! return error_mark_node; } - /* This clause creates a new pointer type that is qualified with - the protocol specification...this info is used later to do more - elaborate type checking. */ - if (protocols) { ! tree t, m = TYPE_MAIN_VARIANT (type); ! ! t = copy_node (type); ! ! /* Add this type to the chain of variants of TYPE. */ ! TYPE_NEXT_VARIANT (t) = TYPE_NEXT_VARIANT (m); ! TYPE_NEXT_VARIANT (m) = t; ! /* Look up protocols...and install in lang specific list */ ! SET_TYPE_PROTOCOL_LIST (t, lookup_and_install_protocols (protocols)); ! /* This forces a new pointer type to be created later ! (in build_pointer_type)...so that the new template ! we just created will actually be used...what a hack! */ ! if (TYPE_POINTER_TO (t)) ! TYPE_POINTER_TO (t) = NULL_TREE; ! type = t; } return type; } --- 1194,1251 ---- if (TREE_CODE (type) != RECORD_TYPE) return; ! if (OBJC_TYPE_NAME (type) && (type = objc_is_class_name (OBJC_TYPE_NAME (type)))) ! error ("statically allocated instance of Objective-C class %qs", IDENTIFIER_POINTER (type)); } ! /* Construct a PROTOCOLS-qualified variant of INTERFACE, where INTERFACE may ! either name an Objective-C class, or refer to the special 'id' or 'Class' ! types. If INTERFACE is not a valid ObjC type, just return it unchanged. */ tree ! objc_get_protocol_qualified_type (tree interface, tree protocols) { ! /* If INTERFACE is not provided, default to 'id'. */ ! tree type = (interface ? objc_is_id (interface) : objc_object_type); ! bool is_ptr = (type != NULL_TREE); ! if (!is_ptr) { ! type = objc_is_class_name (interface); ! if (type) ! type = xref_tag (RECORD_TYPE, type); ! else ! return interface; } if (protocols) { ! type = build_variant_type_copy (type); ! /* For pointers (i.e., 'id' or 'Class'), attach the protocol(s) ! to the pointee. */ ! if (is_ptr) ! { ! TREE_TYPE (type) = build_variant_type_copy (TREE_TYPE (type)); ! TYPE_POINTER_TO (TREE_TYPE (type)) = type; ! type = TREE_TYPE (type); ! } ! /* Look up protocols and install in lang specific list. */ ! DUP_TYPE_OBJC_INFO (type, TYPE_MAIN_VARIANT (type)); ! TYPE_OBJC_PROTOCOL_LIST (type) = lookup_and_install_protocols (protocols); ! /* For RECORD_TYPEs, point to the @interface; for 'id' and 'Class', ! return the pointer to the new pointee variant. */ ! if (is_ptr) ! type = TYPE_POINTER_TO (type); ! else ! TYPE_OBJC_INTERFACE (type) ! = TYPE_OBJC_INTERFACE (TYPE_MAIN_VARIANT (type)); } + return type; } *************** check_protocol_recursively (tree proto, *** 1049,1055 **** pp = lookup_protocol (pp); if (pp == proto) ! fatal_error ("protocol `%s' has circular dependency", IDENTIFIER_POINTER (PROTOCOL_NAME (pp))); if (pp) check_protocol_recursively (proto, PROTOCOL_LIST (pp)); --- 1266,1272 ---- pp = lookup_protocol (pp); if (pp == proto) ! fatal_error ("protocol %qs has circular dependency", IDENTIFIER_POINTER (PROTOCOL_NAME (pp))); if (pp) check_protocol_recursively (proto, PROTOCOL_LIST (pp)); *************** lookup_and_install_protocols (tree proto *** 1071,1077 **** tree p = lookup_protocol (ident); if (!p) ! error ("cannot find protocol declaration for `%s'", IDENTIFIER_POINTER (ident)); else return_value = chainon (return_value, --- 1288,1294 ---- tree p = lookup_protocol (ident); if (!p) ! error ("cannot find protocol declaration for %qs", IDENTIFIER_POINTER (ident)); else return_value = chainon (return_value, *************** lookup_and_install_protocols (tree proto *** 1081,1127 **** return return_value; } ! /* Create and push a decl for a built-in external variable or field NAME. ! CODE says which. ! TYPE is its data type. */ static tree ! create_builtin_decl (enum tree_code code, tree type, const char *name) { ! tree decl = build_decl (code, get_identifier (name), type); ! if (code == VAR_DECL) ! { ! TREE_STATIC (decl) = 1; ! make_decl_rtl (decl, 0); ! pushdecl (decl); ! DECL_ARTIFICIAL (decl) = 1; ! } ! return decl; } ! /* Find the decl for the constant string class. */ static void setup_string_decl (void) { ! if (!string_class_decl) ! { ! if (!constant_string_global_id) ! { ! char *name; ! size_t length; ! /* %s in format will provide room for terminating null */ ! length = strlen (STRING_OBJECT_GLOBAL_FORMAT) ! + strlen (constant_string_class_name); ! name = xmalloc (length); ! sprintf (name, STRING_OBJECT_GLOBAL_FORMAT, ! constant_string_class_name); ! constant_string_global_id = get_identifier (name); ! } ! string_class_decl = lookup_name (constant_string_global_id); ! } } /* Purpose: "play" parser, creating/installing representations --- 1298,1362 ---- return return_value; } ! /* Create a declaration for field NAME of a given TYPE. */ static tree ! create_field_decl (tree type, const char *name) { ! return build_decl (FIELD_DECL, get_identifier (name), type); ! } ! /* Create a global, static declaration for variable NAME of a given TYPE. The ! finish_var_decl() routine will need to be called on it afterwards. */ ! static tree ! start_var_decl (tree type, const char *name) ! { ! tree var = build_decl (VAR_DECL, get_identifier (name), type); ! ! TREE_STATIC (var) = 1; ! DECL_INITIAL (var) = error_mark_node; /* A real initializer is coming... */ ! DECL_IGNORED_P (var) = 1; ! DECL_ARTIFICIAL (var) = 1; ! DECL_CONTEXT (var) = NULL_TREE; ! #ifdef OBJCPLUS ! DECL_THIS_STATIC (var) = 1; /* squash redeclaration errors */ ! #endif ! ! return var; } ! /* Finish off the variable declaration created by start_var_decl(). */ static void + finish_var_decl (tree var, tree initializer) + { + finish_decl (var, initializer, NULL_TREE); + /* Ensure that the variable actually gets output. */ + mark_decl_referenced (var); + /* Mark the decl to avoid "defined but not used" warning. */ + TREE_USED (var) = 1; + } + + /* Find the decl for the constant string class reference. This is only + used for the NeXT runtime. */ + + static tree setup_string_decl (void) { ! char *name; ! size_t length; ! ! /* %s in format will provide room for terminating null */ ! length = strlen (STRING_OBJECT_GLOBAL_FORMAT) ! + strlen (constant_string_class_name); ! name = xmalloc (length); ! sprintf (name, STRING_OBJECT_GLOBAL_FORMAT, ! constant_string_class_name); ! constant_string_global_id = get_identifier (name); ! string_class_decl = lookup_name (constant_string_global_id); ! ! return string_class_decl; } /* Purpose: "play" parser, creating/installing representations *************** setup_string_decl (void) *** 1138,1327 **** static void synth_module_prologue (void) { ! tree temp_type; ! /* Defined in `objc.h' */ ! objc_object_id = get_identifier (TAG_OBJECT); ! objc_object_reference = xref_tag (RECORD_TYPE, objc_object_id); ! id_type = build_pointer_type (objc_object_reference); ! objc_id_id = get_identifier (TYPE_ID); objc_class_id = get_identifier (TAG_CLASS); ! objc_class_type = build_pointer_type (xref_tag (RECORD_TYPE, objc_class_id)); ! temp_type = get_identifier (PROTOCOL_OBJECT_CLASS_NAME); ! objc_declare_class (tree_cons (NULL_TREE, temp_type, NULL_TREE)); ! protocol_type = build_pointer_type (xref_tag (RECORD_TYPE, ! temp_type)); ! ! /* Declare type of selector-objects that represent an operation name. */ ! ! /* `struct objc_selector *' */ ! selector_type ! = build_pointer_type (xref_tag (RECORD_TYPE, ! get_identifier (TAG_SELECTOR))); ! /* Forward declare type, or else the prototype for msgSendSuper will ! complain. */ ! /* `struct objc_super *' */ ! super_type = build_pointer_type (xref_tag (RECORD_TYPE, ! get_identifier (TAG_SUPER))); ! /* id objc_msgSend (id, SEL, ...); */ ! temp_type ! = build_function_type (id_type, ! tree_cons (NULL_TREE, id_type, ! tree_cons (NULL_TREE, selector_type, ! NULL_TREE))); ! if (! flag_next_runtime) ! { ! umsg_decl = build_decl (FUNCTION_DECL, ! get_identifier (TAG_MSGSEND), temp_type); ! DECL_EXTERNAL (umsg_decl) = 1; ! TREE_PUBLIC (umsg_decl) = 1; ! DECL_INLINE (umsg_decl) = 1; ! DECL_ARTIFICIAL (umsg_decl) = 1; ! make_decl_rtl (umsg_decl, NULL); ! pushdecl (umsg_decl); ! } else ! { ! umsg_decl = builtin_function (TAG_MSGSEND, ! temp_type, 0, NOT_BUILT_IN, ! NULL, NULL_TREE); ! /* id objc_msgSendNonNil (id, SEL, ...); */ ! umsg_nonnil_decl = builtin_function (TAG_MSGSEND_NONNIL, ! temp_type, 0, NOT_BUILT_IN, ! NULL, NULL_TREE); ! } ! ! /* id objc_msgSendSuper (struct objc_super *, SEL, ...); */ ! ! temp_type ! = build_function_type (id_type, ! tree_cons (NULL_TREE, super_type, ! tree_cons (NULL_TREE, selector_type, ! NULL_TREE))); ! ! umsg_super_decl = builtin_function (TAG_MSGSENDSUPER, ! temp_type, 0, NOT_BUILT_IN, ! NULL, NULL_TREE); ! ! /* The NeXT runtime defines the following additional entry points, ! used for dispatching calls to methods returning structs: ! ! #if defined(__cplusplus) ! id objc_msgSend_stret(id self, SEL op, ...); ! id objc_msgSendSuper_stret(struct objc_super *super, SEL op, ...); ! #else ! void objc_msgSend_stret(void * stretAddr, id self, SEL op, ...); ! void objc_msgSendSuper_stret(void * stretAddr, struct objc_super *super, ! SEL op, ...); ! #endif ! struct objc_return_struct objc_msgSendNonNil_stret(id self, SEL op, ...); ! These prototypes appear in ; however, they ! CANNOT BE USED DIRECTLY. In order to call one of the ..._stret ! functions, the function must first be cast to a signature that ! corresponds to the actual ObjC method being invoked. This is ! what is done by the build_objc_method_call() routine below. */ if (flag_next_runtime) { ! tree objc_return_struct_type ! = xref_tag (RECORD_TYPE, ! get_identifier (TAG_RETURN_STRUCT)); ! tree stret_temp_type ! = build_function_type (id_type, ! tree_cons (NULL_TREE, id_type, ! tree_cons (NULL_TREE, selector_type, NULL_TREE))); ! umsg_stret_decl = builtin_function (TAG_MSGSEND_STRET, ! stret_temp_type, 0, NOT_BUILT_IN, NULL, NULL_TREE); - stret_temp_type - = build_function_type (objc_return_struct_type, - tree_cons (NULL_TREE, id_type, - tree_cons (NULL_TREE, selector_type, - NULL_TREE))); - umsg_nonnil_stret_decl = builtin_function (TAG_MSGSEND_NONNIL_STRET, ! stret_temp_type, 0, NOT_BUILT_IN, NULL, NULL_TREE); ! stret_temp_type ! = build_function_type (id_type, ! tree_cons (NULL_TREE, super_type, ! tree_cons (NULL_TREE, selector_type, NULL_TREE))); ! umsg_super_stret_decl = builtin_function (TAG_MSGSENDSUPER_STRET, ! stret_temp_type, 0, NOT_BUILT_IN, 0, NULL_TREE); } /* id objc_getClass (const char *); */ ! temp_type = build_function_type (id_type, tree_cons (NULL_TREE, const_string_type_node, OBJC_VOID_AT_END)); objc_get_class_decl ! = builtin_function (TAG_GETCLASS, temp_type, 0, NOT_BUILT_IN, NULL, NULL_TREE); /* id objc_getMetaClass (const char *); */ objc_get_meta_class_decl ! = builtin_function (TAG_GETMETACLASS, temp_type, 0, NOT_BUILT_IN, NULL, NULL_TREE); build_super_template (); if (flag_next_runtime) ! build_objc_exception_stuff (); /* static SEL _OBJC_SELECTOR_TABLE[]; */ if (! flag_next_runtime) ! { ! if (flag_typed_selectors) ! { ! /* Suppress outputting debug symbols, because ! dbxout_init hasn'r been called yet. */ ! enum debug_info_type save_write_symbols = write_symbols; ! const struct gcc_debug_hooks *const save_hooks = debug_hooks; ! write_symbols = NO_DEBUG; ! debug_hooks = &do_nothing_debug_hooks; ! ! build_selector_template (); ! temp_type = build_array_type (objc_selector_template, NULL_TREE); ! ! write_symbols = save_write_symbols; ! debug_hooks = save_hooks; ! } ! else ! temp_type = build_array_type (selector_type, NULL_TREE); ! ! layout_type (temp_type); ! UOBJC_SELECTOR_TABLE_decl ! = create_builtin_decl (VAR_DECL, temp_type, ! "_OBJC_SELECTOR_TABLE"); ! ! /* Avoid warning when not sending messages. */ ! TREE_USED (UOBJC_SELECTOR_TABLE_decl) = 1; ! } ! ! generate_forward_declaration_to_string_table (); /* Forward declare constant_string_id and constant_string_type. */ if (!constant_string_class_name) --- 1373,1561 ---- static void synth_module_prologue (void) { ! tree type; ! enum debug_info_type save_write_symbols = write_symbols; ! const struct gcc_debug_hooks *const save_hooks = debug_hooks; ! /* Suppress outputting debug symbols, because ! dbxout_init hasn'r been called yet. */ ! write_symbols = NO_DEBUG; ! debug_hooks = &do_nothing_debug_hooks; ! #ifdef OBJCPLUS ! push_lang_context (lang_name_c); /* extern "C" */ ! #endif ! /* The following are also defined in and friends. */ ! objc_object_id = get_identifier (TAG_OBJECT); objc_class_id = get_identifier (TAG_CLASS); ! objc_object_reference = xref_tag (RECORD_TYPE, objc_object_id); ! objc_class_reference = xref_tag (RECORD_TYPE, objc_class_id); ! ! objc_object_type = build_pointer_type (objc_object_reference); ! objc_class_type = build_pointer_type (objc_class_reference); ! objc_object_name = get_identifier (OBJECT_TYPEDEF_NAME); ! objc_class_name = get_identifier (CLASS_TYPEDEF_NAME); ! /* Declare the 'id' and 'Class' typedefs. */ + type = lang_hooks.decls.pushdecl (build_decl (TYPE_DECL, + objc_object_name, + objc_object_type)); + DECL_IN_SYSTEM_HEADER (type) = 1; + type = lang_hooks.decls.pushdecl (build_decl (TYPE_DECL, + objc_class_name, + objc_class_type)); + DECL_IN_SYSTEM_HEADER (type) = 1; ! /* Forward-declare '@interface Protocol'. */ ! type = get_identifier (PROTOCOL_OBJECT_CLASS_NAME); ! objc_declare_class (tree_cons (NULL_TREE, type, NULL_TREE)); ! objc_protocol_type = build_pointer_type (xref_tag (RECORD_TYPE, ! type)); ! /* Declare type of selector-objects that represent an operation name. */ ! if (flag_next_runtime) ! /* `struct objc_selector *' */ ! objc_selector_type ! = build_pointer_type (xref_tag (RECORD_TYPE, ! get_identifier (TAG_SELECTOR))); else ! /* `const struct objc_selector *' */ ! objc_selector_type ! = build_pointer_type ! (build_qualified_type (xref_tag (RECORD_TYPE, ! get_identifier (TAG_SELECTOR)), ! TYPE_QUAL_CONST)); ! /* Declare receiver type used for dispatching messages to 'super'. */ ! /* `struct objc_super *' */ ! objc_super_type = build_pointer_type (xref_tag (RECORD_TYPE, ! get_identifier (TAG_SUPER))); if (flag_next_runtime) { ! /* NB: In order to call one of the ..._stret (struct-returning) ! functions, the function *MUST* first be cast to a signature that ! corresponds to the actual ObjC method being invoked. This is ! what is done by the build_objc_method_call() routine below. */ ! /* id objc_msgSend (id, SEL, ...); */ ! /* id objc_msgSendNonNil (id, SEL, ...); */ ! /* id objc_msgSend_stret (id, SEL, ...); */ ! /* id objc_msgSendNonNil_stret (id, SEL, ...); */ ! type ! = build_function_type (objc_object_type, ! tree_cons (NULL_TREE, objc_object_type, ! tree_cons (NULL_TREE, objc_selector_type, NULL_TREE))); ! umsg_decl = builtin_function (TAG_MSGSEND, ! type, 0, NOT_BUILT_IN, ! NULL, NULL_TREE); ! umsg_nonnil_decl = builtin_function (TAG_MSGSEND_NONNIL, ! type, 0, NOT_BUILT_IN, ! NULL, NULL_TREE); umsg_stret_decl = builtin_function (TAG_MSGSEND_STRET, ! type, 0, NOT_BUILT_IN, NULL, NULL_TREE); umsg_nonnil_stret_decl = builtin_function (TAG_MSGSEND_NONNIL_STRET, ! type, 0, NOT_BUILT_IN, NULL, NULL_TREE); ! /* id objc_msgSendSuper (struct objc_super *, SEL, ...); */ ! /* id objc_msgSendSuper_stret (struct objc_super *, SEL, ...); */ ! type ! = build_function_type (objc_object_type, ! tree_cons (NULL_TREE, objc_super_type, ! tree_cons (NULL_TREE, objc_selector_type, NULL_TREE))); ! umsg_super_decl = builtin_function (TAG_MSGSENDSUPER, ! type, 0, NOT_BUILT_IN, ! NULL, NULL_TREE); umsg_super_stret_decl = builtin_function (TAG_MSGSENDSUPER_STRET, ! type, 0, NOT_BUILT_IN, 0, NULL_TREE); } + else + { + /* GNU runtime messenger entry points. */ + + /* typedef id (*IMP)(id, SEL, ...); */ + tree IMP_type + = build_pointer_type + (build_function_type (objc_object_type, + tree_cons (NULL_TREE, objc_object_type, + tree_cons (NULL_TREE, objc_selector_type, + NULL_TREE)))); + + /* IMP objc_msg_lookup (id, SEL); */ + type + = build_function_type (IMP_type, + tree_cons (NULL_TREE, objc_object_type, + tree_cons (NULL_TREE, objc_selector_type, + OBJC_VOID_AT_END))); + umsg_decl = builtin_function (TAG_MSGSEND, + type, 0, NOT_BUILT_IN, + NULL, NULL_TREE); + + /* IMP objc_msg_lookup_super (struct objc_super *, SEL); */ + type + = build_function_type (IMP_type, + tree_cons (NULL_TREE, objc_super_type, + tree_cons (NULL_TREE, objc_selector_type, + OBJC_VOID_AT_END))); + umsg_super_decl = builtin_function (TAG_MSGSENDSUPER, + type, 0, NOT_BUILT_IN, + NULL, NULL_TREE); + + /* The following GNU runtime entry point is called to initialize + each module: + + __objc_exec_class (void *); */ + type + = build_function_type (void_type_node, + tree_cons (NULL_TREE, ptr_type_node, + OBJC_VOID_AT_END)); + execclass_decl = builtin_function (TAG_EXECCLASS, + type, 0, NOT_BUILT_IN, + NULL, NULL_TREE); + } /* id objc_getClass (const char *); */ ! type = build_function_type (objc_object_type, tree_cons (NULL_TREE, const_string_type_node, OBJC_VOID_AT_END)); objc_get_class_decl ! = builtin_function (TAG_GETCLASS, type, 0, NOT_BUILT_IN, NULL, NULL_TREE); /* id objc_getMetaClass (const char *); */ objc_get_meta_class_decl ! = builtin_function (TAG_GETMETACLASS, type, 0, NOT_BUILT_IN, NULL, NULL_TREE); + build_class_template (); build_super_template (); + build_protocol_template (); + build_category_template (); + build_objc_exception_stuff (); + if (flag_next_runtime) ! build_next_objc_exception_stuff (); /* static SEL _OBJC_SELECTOR_TABLE[]; */ if (! flag_next_runtime) ! build_selector_table_decl (); /* Forward declare constant_string_id and constant_string_type. */ if (!constant_string_class_name) *************** synth_module_prologue (void) *** 1336,1342 **** #ifndef OBJCPLUS /* The C++ front-end does not appear to grok __attribute__((__unused__)). */ unused_list = build_tree_list (get_identifier ("__unused__"), NULL_TREE); ! #endif } /* Ensure that the ivar list for NSConstantString/NXConstantString --- 1570,1583 ---- #ifndef OBJCPLUS /* The C++ front-end does not appear to grok __attribute__((__unused__)). */ unused_list = build_tree_list (get_identifier ("__unused__"), NULL_TREE); ! #endif ! ! #ifdef OBJCPLUS ! pop_lang_context (); ! #endif ! ! write_symbols = save_write_symbols; ! debug_hooks = save_hooks; } /* Ensure that the ivar list for NSConstantString/NXConstantString *************** my_build_string (int len, const char *st *** 1385,1390 **** --- 1626,1658 ---- return fix_string_type (build_string (len, str)); } + + static hashval_t + string_hash (const void *ptr) + { + tree str = ((struct string_descriptor *)ptr)->literal; + const unsigned char *p = (const unsigned char *) TREE_STRING_POINTER (str); + int i, len = TREE_STRING_LENGTH (str); + hashval_t h = len; + + for (i = 0; i < len; i++) + h = ((h * 613) + p[i]); + + return h; + } + + static int + string_eq (const void *ptr1, const void *ptr2) + { + tree str1 = ((struct string_descriptor *)ptr1)->literal; + tree str2 = ((struct string_descriptor *)ptr2)->literal; + int len1 = TREE_STRING_LENGTH (str1); + + return (len1 == TREE_STRING_LENGTH (str2) + && !memcmp (TREE_STRING_POINTER (str1), TREE_STRING_POINTER (str2), + len1)); + } + /* Given a chain of STRING_CST's, build a static instance of NXConstantString which points at the concatenation of those strings. We place the string object in the __string_objects *************** my_build_string (int len, const char *st *** 1393,1468 **** NXConstantString class object. */ tree ! build_objc_string_object (tree string) { tree initlist, constructor, constant_string_class; int length; string = fix_string_type (string); - - constant_string_class = lookup_interface (constant_string_id); - if (!constant_string_class - || !(constant_string_type - = CLASS_STATIC_TEMPLATE (constant_string_class))) - { - error ("cannot find interface declaration for `%s'", - IDENTIFIER_POINTER (constant_string_id)); - return error_mark_node; - } - - /* Call to 'combine_strings' has been moved above. */ TREE_SET_CODE (string, STRING_CST); length = TREE_STRING_LENGTH (string) - 1; if (!string_layout_checked) { ! /* The NSConstantString/NXConstantString ivar layout is now ! known. */ ! if (!check_string_class_template ()) ! { ! error ("interface `%s' does not have valid constant string layout", ! IDENTIFIER_POINTER (constant_string_id)); ! return error_mark_node; ! } ! add_class_reference (constant_string_id); ! } ! ! /* & ((NXConstantString) { NULL, string, length }) */ ! if (flag_next_runtime) ! { /* For the NeXT runtime, we can generate a literal reference to the string class, don't need to run a constructor. */ ! setup_string_decl (); ! if (string_class_decl == NULL_TREE) { ! error ("cannot find reference tag for class `%s'", ! IDENTIFIER_POINTER (constant_string_id)); ! return error_mark_node; } - initlist = build_tree_list - (NULL_TREE, - copy_node (build_unary_op (ADDR_EXPR, string_class_decl, 0))); - } - else - { - initlist = build_tree_list (NULL_TREE, build_int_2 (0, 0)); } ! initlist ! = tree_cons (NULL_TREE, copy_node (build_unary_op (ADDR_EXPR, string, 1)), ! initlist); ! initlist = tree_cons (NULL_TREE, build_int_2 (length, 0), initlist); ! constructor = objc_build_constructor (constant_string_type, ! nreverse (initlist)); ! if (!flag_next_runtime) { ! constructor ! = objc_add_static_instance (constructor, constant_string_type); } ! return (build_unary_op (ADDR_EXPR, constructor, 1)); } /* Declare a static instance of CLASS_DECL initialized by CONSTRUCTOR. */ --- 1661,1756 ---- NXConstantString class object. */ tree ! objc_build_string_object (tree string) { tree initlist, constructor, constant_string_class; int length; + tree fields, addr; + struct string_descriptor *desc, key; + void **loc; + /* Prep the string argument. */ string = fix_string_type (string); TREE_SET_CODE (string, STRING_CST); length = TREE_STRING_LENGTH (string) - 1; + /* Check whether the string class being used actually exists and has the + correct ivar layout. */ if (!string_layout_checked) { ! string_layout_checked = -1; ! constant_string_class = lookup_interface (constant_string_id); ! if (!constant_string_class ! || !(constant_string_type ! = CLASS_STATIC_TEMPLATE (constant_string_class))) ! error ("cannot find interface declaration for %qs", ! IDENTIFIER_POINTER (constant_string_id)); ! /* The NSConstantString/NXConstantString ivar layout is now known. */ ! else if (!check_string_class_template ()) ! error ("interface %qs does not have valid constant string layout", ! IDENTIFIER_POINTER (constant_string_id)); /* For the NeXT runtime, we can generate a literal reference to the string class, don't need to run a constructor. */ ! else if (flag_next_runtime && !setup_string_decl ()) ! error ("cannot find reference tag for class %qs", ! IDENTIFIER_POINTER (constant_string_id)); ! else { ! string_layout_checked = 1; /* Success! */ ! add_class_reference (constant_string_id); } } ! if (string_layout_checked == -1) ! return error_mark_node; ! /* Perhaps we already constructed a constant string just like this one? */ ! key.literal = string; ! loc = htab_find_slot (string_htab, &key, INSERT); ! desc = *loc; ! ! if (!desc) { ! tree var; ! *loc = desc = ggc_alloc (sizeof (*desc)); ! desc->literal = string; ! ! /* GNU: & ((NXConstantString) { NULL, string, length }) */ ! /* NeXT: & ((NSConstantString) { isa, string, length }) */ ! fields = TYPE_FIELDS (constant_string_type); ! initlist ! = build_tree_list (fields, ! flag_next_runtime ! ? build_unary_op (ADDR_EXPR, string_class_decl, 0) ! : build_int_cst (NULL_TREE, 0)); ! fields = TREE_CHAIN (fields); ! initlist = tree_cons (fields, build_unary_op (ADDR_EXPR, string, 1), ! initlist); ! fields = TREE_CHAIN (fields); ! initlist = tree_cons (fields, build_int_cst (NULL_TREE, length), ! initlist); ! constructor = objc_build_constructor (constant_string_type, ! nreverse (initlist)); ! TREE_INVARIANT (constructor) = true; ! ! if (!flag_next_runtime) ! constructor ! = objc_add_static_instance (constructor, constant_string_type); ! else ! { ! var = build_decl (CONST_DECL, NULL, TREE_TYPE (constructor)); ! DECL_INITIAL (var) = constructor; ! TREE_STATIC (var) = 1; ! pushdecl_top_level (var); ! constructor = var; ! } ! desc->constructor = constructor; } ! addr = build_unary_op (ADDR_EXPR, desc->constructor, 1); ! ! return addr; } /* Declare a static instance of CLASS_DECL initialized by CONSTRUCTOR. */ *************** objc_add_static_instance (tree construct *** 1497,1503 **** Postpone till end of input. */ DECL_DEFER_OUTPUT (decl) = 1; pushdecl_top_level (decl); ! rest_of_decl_compilation (decl, 0, 1, 0); /* Add the DECL to the head of this CLASS' list. */ TREE_PURPOSE (*chain) = tree_cons (NULL_TREE, decl, TREE_PURPOSE (*chain)); --- 1785,1791 ---- Postpone till end of input. */ DECL_DEFER_OUTPUT (decl) = 1; pushdecl_top_level (decl); ! rest_of_decl_compilation (decl, 1, 0); /* Add the DECL to the head of this CLASS' list. */ TREE_PURPOSE (*chain) = tree_cons (NULL_TREE, decl, TREE_PURPOSE (*chain)); *************** objc_add_static_instance (tree construct *** 1511,1546 **** static tree objc_build_constructor (tree type, tree elts) { ! tree constructor, f, e; ! ! /* ??? Most of the places that we build constructors, we don't fill in ! the type of integers properly. Convert them all en masse. */ ! if (TREE_CODE (type) == ARRAY_TYPE) ! { ! f = TREE_TYPE (type); ! if (TREE_CODE (f) == POINTER_TYPE || TREE_CODE (f) == INTEGER_TYPE) ! for (e = elts; e ; e = TREE_CHAIN (e)) ! TREE_VALUE (e) = convert (f, TREE_VALUE (e)); ! } ! else ! { ! f = TYPE_FIELDS (type); ! for (e = elts; e && f; e = TREE_CHAIN (e), f = TREE_CHAIN (f)) ! if (TREE_CODE (TREE_TYPE (f)) == POINTER_TYPE ! || TREE_CODE (TREE_TYPE (f)) == INTEGER_TYPE) ! TREE_VALUE (e) = convert (TREE_TYPE (f), TREE_VALUE (e)); ! } - constructor = build_constructor (type, elts); TREE_CONSTANT (constructor) = 1; TREE_STATIC (constructor) = 1; TREE_READONLY (constructor) = 1; #ifdef OBJCPLUS ! /* zlaski 2001-Apr-02: mark this as a call to a constructor, as required by ! build_unary_op (wasn't true in 2.7.2.1 days) */ TREE_HAS_CONSTRUCTOR (constructor) = 1; #endif return constructor; } --- 1799,1818 ---- static tree objc_build_constructor (tree type, tree elts) { ! tree constructor = build_constructor (type, elts); TREE_CONSTANT (constructor) = 1; TREE_STATIC (constructor) = 1; TREE_READONLY (constructor) = 1; #ifdef OBJCPLUS ! /* Adjust for impedance mismatch. We should figure out how to build ! CONSTRUCTORs that consistently please both the C and C++ gods. */ ! if (!TREE_PURPOSE (elts)) ! TREE_TYPE (constructor) = NULL_TREE; TREE_HAS_CONSTRUCTOR (constructor) = 1; #endif + return constructor; } *************** build_objc_symtab_template (void) *** 1566,1596 **** = start_struct (RECORD_TYPE, get_identifier (UTAG_SYMTAB)); /* long sel_ref_cnt; */ ! ! field_decl = create_builtin_decl (FIELD_DECL, ! long_integer_type_node, ! "sel_ref_cnt"); field_decl_chain = field_decl; /* SEL *refs; */ ! ! field_decl = create_builtin_decl (FIELD_DECL, ! build_pointer_type (selector_type), ! "refs"); chainon (field_decl_chain, field_decl); /* short cls_def_cnt; */ ! ! field_decl = create_builtin_decl (FIELD_DECL, ! short_integer_type_node, ! "cls_def_cnt"); chainon (field_decl_chain, field_decl); /* short cat_def_cnt; */ ! ! field_decl = create_builtin_decl (FIELD_DECL, ! short_integer_type_node, ! "cat_def_cnt"); chainon (field_decl_chain, field_decl); if (imp_count || cat_count || !flag_next_runtime) --- 1838,1858 ---- = start_struct (RECORD_TYPE, get_identifier (UTAG_SYMTAB)); /* long sel_ref_cnt; */ ! field_decl = create_field_decl (long_integer_type_node, "sel_ref_cnt"); field_decl_chain = field_decl; /* SEL *refs; */ ! field_decl = create_field_decl (build_pointer_type (objc_selector_type), ! "refs"); chainon (field_decl_chain, field_decl); /* short cls_def_cnt; */ ! field_decl = create_field_decl (short_integer_type_node, "cls_def_cnt"); chainon (field_decl_chain, field_decl); /* short cat_def_cnt; */ ! field_decl = create_field_decl (short_integer_type_node, ! "cat_def_cnt"); chainon (field_decl_chain, field_decl); if (imp_count || cat_count || !flag_next_runtime) *************** build_objc_symtab_template (void) *** 1599,1609 **** /* NB: The index is one less than the size of the array. */ int index = imp_count + cat_count + (flag_next_runtime? -1: 0); ! field_decl = create_builtin_decl ! (FIELD_DECL, ! build_array_type (ptr_type_node, ! build_index_type (build_int_2 (index, 0))), "defs"); chainon (field_decl_chain, field_decl); } --- 1861,1870 ---- /* NB: The index is one less than the size of the array. */ int index = imp_count + cat_count + (flag_next_runtime? -1: 0); ! field_decl = create_field_decl ! (build_array_type (ptr_type_node, ! build_index_type (build_int_cst (NULL_TREE, index))), "defs"); chainon (field_decl_chain, field_decl); } *************** init_def_list (tree type) *** 1648,1654 **** if (static_instances_decl) expr = build_unary_op (ADDR_EXPR, static_instances_decl, 0); else ! expr = build_int_2 (0, 0); initlist = tree_cons (NULL_TREE, expr, initlist); } --- 1909,1915 ---- if (static_instances_decl) expr = build_unary_op (ADDR_EXPR, static_instances_decl, 0); else ! expr = build_int_cst (NULL_TREE, 0); initlist = tree_cons (NULL_TREE, expr, initlist); } *************** init_objc_symtab (tree type) *** 1665,1689 **** /* sel_ref_cnt = { ..., 5, ... } */ ! initlist = build_tree_list (NULL_TREE, build_int_2 (0, 0)); /* refs = { ..., _OBJC_SELECTOR_TABLE, ... } */ if (flag_next_runtime || ! sel_ref_chain) ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); else ! initlist = tree_cons (NULL_TREE, ! build_unary_op (ADDR_EXPR, ! UOBJC_SELECTOR_TABLE_decl, 1), ! initlist); /* cls_def_cnt = { ..., 5, ... } */ ! initlist = tree_cons (NULL_TREE, build_int_2 (imp_count, 0), initlist); /* cat_def_cnt = { ..., 5, ... } */ ! initlist = tree_cons (NULL_TREE, build_int_2 (cat_count, 0), initlist); /* cls_def = { ..., { &Foo, &Bar, ...}, ... } */ --- 1926,1953 ---- /* sel_ref_cnt = { ..., 5, ... } */ ! initlist = build_tree_list (NULL_TREE, ! build_int_cst (long_integer_type_node, 0)); /* refs = { ..., _OBJC_SELECTOR_TABLE, ... } */ if (flag_next_runtime || ! sel_ref_chain) ! initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist); else ! initlist ! = tree_cons (NULL_TREE, ! convert (build_pointer_type (objc_selector_type), ! build_unary_op (ADDR_EXPR, ! UOBJC_SELECTOR_TABLE_decl, 1)), ! initlist); /* cls_def_cnt = { ..., 5, ... } */ ! initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, imp_count), initlist); /* cat_def_cnt = { ..., 5, ... } */ ! initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, cat_count), initlist); /* cls_def = { ..., { &Foo, &Bar, ...}, ... } */ *************** init_objc_symtab (tree type) *** 1706,1722 **** static tree build_metadata_decl (const char *name, tree type) { ! tree decl, decl_specs; ! /* extern struct TYPE NAME_; */ ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_EXTERN]); ! decl_specs = tree_cons (NULL_TREE, type, decl_specs); ! decl = define_decl (synth_id_with_class_suffix ! (name, ! objc_implementation_context), ! decl_specs); ! TREE_USED (decl) = 1; ! DECL_ARTIFICIAL (decl) = 1; ! TREE_PUBLIC (decl) = 0; return decl; } --- 1970,1982 ---- static tree build_metadata_decl (const char *name, tree type) { ! tree decl; ! ! /* struct TYPE NAME_; */ ! decl = start_var_decl (type, synth_id_with_class_suffix ! (name, ! objc_implementation_context)); ! return decl; } *************** forward_declare_categories (void) *** 1737,1743 **** objc_implementation_context = impent->imp_context; /* extern struct objc_category _OBJC_CATEGORY_; */ impent->class_decl = build_metadata_decl ("_OBJC_CATEGORY", ! objc_category_template); } } objc_implementation_context = sav; --- 1997,2003 ---- objc_implementation_context = impent->imp_context; /* extern struct objc_category _OBJC_CATEGORY_; */ impent->class_decl = build_metadata_decl ("_OBJC_CATEGORY", ! objc_category_template); } } objc_implementation_context = sav; *************** forward_declare_categories (void) *** 1749,1780 **** static void generate_objc_symtab_decl (void) { - tree sc_spec; - - if (!objc_category_template) - build_category_template (); - /* forward declare categories */ if (cat_count) forward_declare_categories (); ! if (!objc_symtab_template) ! build_objc_symtab_template (); ! ! sc_spec = build_tree_list (NULL_TREE, ridpointers[(int) RID_STATIC]); ! ! UOBJC_SYMBOLS_decl = start_decl (get_identifier ("_OBJC_SYMBOLS"), ! tree_cons (NULL_TREE, ! objc_symtab_template, sc_spec), ! 1, ! NULL_TREE); ! ! TREE_USED (UOBJC_SYMBOLS_decl) = 1; ! DECL_IGNORED_P (UOBJC_SYMBOLS_decl) = 1; ! DECL_ARTIFICIAL (UOBJC_SYMBOLS_decl) = 1; ! finish_decl (UOBJC_SYMBOLS_decl, ! init_objc_symtab (TREE_TYPE (UOBJC_SYMBOLS_decl)), ! NULL_TREE); } static tree --- 2009,2022 ---- static void generate_objc_symtab_decl (void) { /* forward declare categories */ if (cat_count) forward_declare_categories (); ! build_objc_symtab_template (); ! UOBJC_SYMBOLS_decl = start_var_decl (objc_symtab_template, "_OBJC_SYMBOLS"); ! finish_var_decl (UOBJC_SYMBOLS_decl, ! init_objc_symtab (TREE_TYPE (UOBJC_SYMBOLS_decl))); } static tree *************** init_module_descriptor (tree type) *** 1784,1795 **** /* version = { 1, ... } */ ! expr = build_int_2 (OBJC_VERSION, 0); initlist = build_tree_list (NULL_TREE, expr); ! /* size = { ..., sizeof (struct objc_module), ... } */ ! expr = size_in_bytes (objc_module_template); initlist = tree_cons (NULL_TREE, expr, initlist); /* name = { ..., "foo.m", ... } */ --- 2026,2038 ---- /* version = { 1, ... } */ ! expr = build_int_cst (long_integer_type_node, OBJC_VERSION); initlist = build_tree_list (NULL_TREE, expr); ! /* size = { ..., sizeof (struct _objc_module), ... } */ ! expr = convert (long_integer_type_node, ! size_in_bytes (objc_module_template)); initlist = tree_cons (NULL_TREE, expr, initlist); /* name = { ..., "foo.m", ... } */ *************** init_module_descriptor (tree type) *** 1802,1955 **** if (UOBJC_SYMBOLS_decl) expr = build_unary_op (ADDR_EXPR, UOBJC_SYMBOLS_decl, 0); else ! expr = build_int_2 (0, 0); initlist = tree_cons (NULL_TREE, expr, initlist); return objc_build_constructor (type, nreverse (initlist)); } /* Write out the data structures to describe Objective C classes defined. - If appropriate, compile and output a setup function to initialize them. - Return a symbol_ref to the function to call to initialize the Objective C - data structures for this file (and perhaps for other files also). ! struct objc_module { ... } _OBJC_MODULE = { ... }; */ ! static rtx build_module_descriptor (void) { ! tree decl_specs, field_decl, field_decl_chain; objc_module_template = start_struct (RECORD_TYPE, get_identifier (UTAG_MODULE)); ! /* Long version; */ ! ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_LONG]); ! field_decl = get_identifier ("version"); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); field_decl_chain = field_decl; ! /* long size; */ ! ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_LONG]); ! field_decl = get_identifier ("size"); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); ! /* char *name; */ ! ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_CHAR]); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("name")); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); ! /* struct objc_symtab *symtab; */ ! ! decl_specs = get_identifier (UTAG_SYMTAB); ! decl_specs = build_tree_list (NULL_TREE, xref_tag (RECORD_TYPE, decl_specs)); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("symtab")); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); finish_struct (objc_module_template, field_decl_chain, NULL_TREE); ! /* Create an instance of "objc_module". */ ! ! decl_specs = tree_cons (NULL_TREE, objc_module_template, ! build_tree_list (NULL_TREE, ! ridpointers[(int) RID_STATIC])); ! ! UOBJC_MODULES_decl = start_decl (get_identifier ("_OBJC_MODULES"), ! decl_specs, 1, NULL_TREE); ! ! DECL_ARTIFICIAL (UOBJC_MODULES_decl) = 1; ! DECL_IGNORED_P (UOBJC_MODULES_decl) = 1; ! DECL_CONTEXT (UOBJC_MODULES_decl) = NULL_TREE; ! ! finish_decl (UOBJC_MODULES_decl, ! init_module_descriptor (TREE_TYPE (UOBJC_MODULES_decl)), ! NULL_TREE); ! ! /* Mark the decl to avoid "defined but not used" warning. */ ! DECL_IN_SYSTEM_HEADER (UOBJC_MODULES_decl) = 1; ! ! /* Generate a constructor call for the module descriptor. ! This code was generated by reading the grammar rules ! of c-parse.in; Therefore, it may not be the most efficient ! way of generating the requisite code. */ ! if (flag_next_runtime) ! return NULL_RTX; ! { ! tree parms, execclass_decl, decelerator, void_list_node_1; ! tree init_function_name, init_function_decl; ! /* Declare void __objc_execClass (void *); */ ! void_list_node_1 = build_tree_list (NULL_TREE, void_type_node); ! execclass_decl = build_decl (FUNCTION_DECL, ! get_identifier (TAG_EXECCLASS), ! build_function_type (void_type_node, ! tree_cons (NULL_TREE, ptr_type_node, ! OBJC_VOID_AT_END))); ! ! DECL_EXTERNAL (execclass_decl) = 1; ! DECL_ARTIFICIAL (execclass_decl) = 1; ! TREE_PUBLIC (execclass_decl) = 1; ! pushdecl (execclass_decl); ! rest_of_decl_compilation (execclass_decl, 0, 0, 0); ! assemble_external (execclass_decl); ! /* void _GLOBAL_$I$ () {objc_execClass (&L_OBJC_MODULES);} */ ! init_function_name = get_file_function_name ('I'); ! start_function (void_list_node_1, ! build_nt (CALL_EXPR, init_function_name, ! tree_cons (NULL_TREE, NULL_TREE, ! OBJC_VOID_AT_END), ! NULL_TREE), ! NULL_TREE); ! store_parm_decls (); ! init_function_decl = current_function_decl; ! TREE_PUBLIC (init_function_decl) = ! targetm.have_ctors_dtors; ! TREE_USED (init_function_decl) = 1; ! /* Don't let this one be deferred. */ ! DECL_INLINE (init_function_decl) = 0; ! DECL_UNINLINABLE (init_function_decl) = 1; ! current_function_cannot_inline ! = "static constructors and destructors cannot be inlined"; ! parms ! = build_tree_list (NULL_TREE, ! build_unary_op (ADDR_EXPR, UOBJC_MODULES_decl, 0)); ! decelerator = build_function_call (execclass_decl, parms); ! c_expand_expr_stmt (decelerator); ! finish_function (); ! return XEXP (DECL_RTL (init_function_decl), 0); ! } } ! /* extern const char _OBJC_STRINGS[]; */ ! static void ! generate_forward_declaration_to_string_table (void) { ! tree sc_spec, decl_specs, expr_decl; ! sc_spec = tree_cons (NULL_TREE, ridpointers[(int) RID_EXTERN], NULL_TREE); ! decl_specs = tree_cons (NULL_TREE, ridpointers[(int) RID_CHAR], sc_spec); ! expr_decl ! = build_nt (ARRAY_REF, get_identifier ("_OBJC_STRINGS"), NULL_TREE); ! UOBJC_STRINGS_decl = define_decl (expr_decl, decl_specs); } /* Return the DECL of the string IDENT in the SECTION. */ --- 2045,2172 ---- if (UOBJC_SYMBOLS_decl) expr = build_unary_op (ADDR_EXPR, UOBJC_SYMBOLS_decl, 0); else ! expr = build_int_cst (NULL_TREE, 0); initlist = tree_cons (NULL_TREE, expr, initlist); return objc_build_constructor (type, nreverse (initlist)); } /* Write out the data structures to describe Objective C classes defined. ! struct _objc_module { ... } _OBJC_MODULE = { ... }; */ ! static void build_module_descriptor (void) { ! tree field_decl, field_decl_chain; ! ! #ifdef OBJCPLUS ! push_lang_context (lang_name_c); /* extern "C" */ ! #endif objc_module_template = start_struct (RECORD_TYPE, get_identifier (UTAG_MODULE)); ! /* long version; */ ! field_decl = create_field_decl (long_integer_type_node, "version"); field_decl_chain = field_decl; ! /* long size; */ ! field_decl = create_field_decl (long_integer_type_node, "size"); chainon (field_decl_chain, field_decl); ! /* char *name; */ ! field_decl = create_field_decl (string_type_node, "name"); chainon (field_decl_chain, field_decl); ! /* struct _objc_symtab *symtab; */ ! field_decl ! = create_field_decl (build_pointer_type ! (xref_tag (RECORD_TYPE, ! get_identifier (UTAG_SYMTAB))), ! "symtab"); chainon (field_decl_chain, field_decl); finish_struct (objc_module_template, field_decl_chain, NULL_TREE); ! /* Create an instance of "_objc_module". */ ! UOBJC_MODULES_decl = start_var_decl (objc_module_template, "_OBJC_MODULES"); ! finish_var_decl (UOBJC_MODULES_decl, ! init_module_descriptor (TREE_TYPE (UOBJC_MODULES_decl))); ! #ifdef OBJCPLUS ! pop_lang_context (); ! #endif ! } ! /* The GNU runtime requires us to provide a static initializer function ! for each module: ! static void __objc_gnu_init (void) { ! __objc_exec_class (&L_OBJC_MODULES); ! } */ ! static void ! build_module_initializer_routine (void) ! { ! tree body; ! #ifdef OBJCPLUS ! push_lang_context (lang_name_c); /* extern "C" */ ! #endif ! objc_push_parm (build_decl (PARM_DECL, NULL_TREE, void_type_node)); ! objc_start_function (get_identifier (TAG_GNUINIT), ! build_function_type (void_type_node, ! OBJC_VOID_AT_END), ! NULL_TREE, objc_get_parm_info (0)); ! body = c_begin_compound_stmt (true); ! add_stmt (build_function_call ! (execclass_decl, ! build_tree_list ! (NULL_TREE, ! build_unary_op (ADDR_EXPR, ! UOBJC_MODULES_decl, 0)))); ! add_stmt (c_end_compound_stmt (body, true)); ! TREE_PUBLIC (current_function_decl) = 0; ! #ifndef OBJCPLUS ! /* For Objective-C++, we will need to call __objc_gnu_init ! from objc_generate_static_init_call() below. */ ! DECL_STATIC_CONSTRUCTOR (current_function_decl) = 1; ! #endif ! GNU_INIT_decl = current_function_decl; ! finish_function (); ! #ifdef OBJCPLUS ! pop_lang_context (); ! #endif } ! #ifdef OBJCPLUS ! /* Return 1 if the __objc_gnu_init function has been synthesized and needs ! to be called by the module initializer routine. */ ! int ! objc_static_init_needed_p (void) { ! return (GNU_INIT_decl != NULL_TREE); ! } ! /* Generate a call to the __objc_gnu_init initializer function. */ ! tree ! objc_generate_static_init_call (tree ctors ATTRIBUTE_UNUSED) ! { ! add_stmt (build_stmt (EXPR_STMT, ! build_function_call (GNU_INIT_decl, NULL_TREE))); ! return ctors; } + #endif /* OBJCPLUS */ /* Return the DECL of the string IDENT in the SECTION. */ *************** get_objc_string_decl (tree ident, enum s *** 1981,1989 **** static void generate_static_references (void) { ! tree decls = NULL_TREE, ident, decl_spec, expr_decl, expr = NULL_TREE; tree class_name, class, decl, initlist; ! tree cl_chain, in_chain, type; int num_inst, num_class; char buf[256]; --- 2198,2207 ---- static void generate_static_references (void) { ! tree decls = NULL_TREE, expr = NULL_TREE; tree class_name, class, decl, initlist; ! tree cl_chain, in_chain, type ! = build_array_type (build_pointer_type (void_type_node), NULL_TREE); int num_inst, num_class; char buf[256]; *************** generate_static_references (void) *** 1997,2011 **** in_chain; num_inst++, in_chain = TREE_CHAIN (in_chain)); sprintf (buf, "_OBJC_STATIC_INSTANCES_%d", num_class); ! ident = get_identifier (buf); ! ! expr_decl = build_nt (ARRAY_REF, ident, NULL_TREE); ! decl_spec = tree_cons (NULL_TREE, build_pointer_type (void_type_node), ! build_tree_list (NULL_TREE, ! ridpointers[(int) RID_STATIC])); ! decl = start_decl (expr_decl, decl_spec, 1, NULL_TREE); ! DECL_CONTEXT (decl) = 0; ! DECL_ARTIFICIAL (decl) = 1; /* Output {class_name, ...}. */ class = TREE_VALUE (cl_chain); --- 2215,2221 ---- in_chain; num_inst++, in_chain = TREE_CHAIN (in_chain)); sprintf (buf, "_OBJC_STATIC_INSTANCES_%d", num_class); ! decl = start_var_decl (type, buf); /* Output {class_name, ...}. */ class = TREE_VALUE (cl_chain); *************** generate_static_references (void) *** 2022,2055 **** } /* Output {..., NULL}. */ ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); expr = objc_build_constructor (TREE_TYPE (decl), nreverse (initlist)); ! finish_decl (decl, expr, NULL_TREE); ! TREE_USED (decl) = 1; ! ! type = build_array_type (build_pointer_type (void_type_node), 0); ! decl = build_decl (VAR_DECL, ident, type); ! TREE_USED (decl) = 1; ! TREE_STATIC (decl) = 1; decls = tree_cons (NULL_TREE, build_unary_op (ADDR_EXPR, decl, 1), decls); } ! decls = tree_cons (NULL_TREE, build_int_2 (0, 0), decls); ! ident = get_identifier ("_OBJC_STATIC_INSTANCES"); ! expr_decl = build_nt (ARRAY_REF, ident, NULL_TREE); ! decl_spec = tree_cons (NULL_TREE, build_pointer_type (void_type_node), ! build_tree_list (NULL_TREE, ! ridpointers[(int) RID_STATIC])); ! static_instances_decl ! = start_decl (expr_decl, decl_spec, 1, NULL_TREE); ! TREE_USED (static_instances_decl) = 1; ! DECL_CONTEXT (static_instances_decl) = 0; ! DECL_ARTIFICIAL (static_instances_decl) = 1; ! expr = objc_build_constructor (TREE_TYPE (static_instances_decl), ! nreverse (decls)); ! finish_decl (static_instances_decl, expr, NULL_TREE); } /* Output all strings. */ --- 2232,2249 ---- } /* Output {..., NULL}. */ ! initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist); expr = objc_build_constructor (TREE_TYPE (decl), nreverse (initlist)); ! finish_var_decl (decl, expr); decls = tree_cons (NULL_TREE, build_unary_op (ADDR_EXPR, decl, 1), decls); } ! decls = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), decls); ! expr = objc_build_constructor (type, nreverse (decls)); ! static_instances_decl = start_var_decl (type, "_OBJC_STATIC_INSTANCES"); ! finish_var_decl (static_instances_decl, expr); } /* Output all strings. */ *************** generate_static_references (void) *** 2057,2109 **** static void generate_strings (void) { - tree sc_spec, decl_specs, expr_decl; tree chain, string_expr; ! tree string, decl; for (chain = class_names_chain; chain; chain = TREE_CHAIN (chain)) { string = TREE_VALUE (chain); decl = TREE_PURPOSE (chain); ! sc_spec ! = tree_cons (NULL_TREE, ridpointers[(int) RID_STATIC], NULL_TREE); ! decl_specs = tree_cons (NULL_TREE, ridpointers[(int) RID_CHAR], sc_spec); ! expr_decl = build_nt (ARRAY_REF, DECL_NAME (decl), NULL_TREE); ! decl = start_decl (expr_decl, decl_specs, 1, NULL_TREE); ! DECL_CONTEXT (decl) = NULL_TREE; string_expr = my_build_string (IDENTIFIER_LENGTH (string) + 1, IDENTIFIER_POINTER (string)); ! finish_decl (decl, string_expr, NULL_TREE); } for (chain = meth_var_names_chain; chain; chain = TREE_CHAIN (chain)) { string = TREE_VALUE (chain); decl = TREE_PURPOSE (chain); ! sc_spec ! = tree_cons (NULL_TREE, ridpointers[(int) RID_STATIC], NULL_TREE); ! decl_specs = tree_cons (NULL_TREE, ridpointers[(int) RID_CHAR], sc_spec); ! expr_decl = build_nt (ARRAY_REF, DECL_NAME (decl), NULL_TREE); ! decl = start_decl (expr_decl, decl_specs, 1, NULL_TREE); ! DECL_CONTEXT (decl) = NULL_TREE; string_expr = my_build_string (IDENTIFIER_LENGTH (string) + 1, IDENTIFIER_POINTER (string)); ! finish_decl (decl, string_expr, NULL_TREE); } for (chain = meth_var_types_chain; chain; chain = TREE_CHAIN (chain)) { string = TREE_VALUE (chain); decl = TREE_PURPOSE (chain); ! sc_spec ! = tree_cons (NULL_TREE, ridpointers[(int) RID_STATIC], NULL_TREE); ! decl_specs = tree_cons (NULL_TREE, ridpointers[(int) RID_CHAR], sc_spec); ! expr_decl = build_nt (ARRAY_REF, DECL_NAME (decl), NULL_TREE); ! decl = start_decl (expr_decl, decl_specs, 1, NULL_TREE); ! DECL_CONTEXT (decl) = NULL_TREE; string_expr = my_build_string (IDENTIFIER_LENGTH (string) + 1, ! IDENTIFIER_POINTER (string)); ! finish_decl (decl, string_expr, NULL_TREE); } } --- 2251,2302 ---- static void generate_strings (void) { tree chain, string_expr; ! tree string, decl, type; for (chain = class_names_chain; chain; chain = TREE_CHAIN (chain)) { string = TREE_VALUE (chain); decl = TREE_PURPOSE (chain); ! type = build_array_type ! (char_type_node, ! build_index_type ! (build_int_cst (NULL_TREE, ! IDENTIFIER_LENGTH (string)))); ! decl = start_var_decl (type, IDENTIFIER_POINTER (DECL_NAME (decl))); string_expr = my_build_string (IDENTIFIER_LENGTH (string) + 1, IDENTIFIER_POINTER (string)); ! finish_var_decl (decl, string_expr); } for (chain = meth_var_names_chain; chain; chain = TREE_CHAIN (chain)) { string = TREE_VALUE (chain); decl = TREE_PURPOSE (chain); ! type = build_array_type ! (char_type_node, ! build_index_type ! (build_int_cst (NULL_TREE, ! IDENTIFIER_LENGTH (string)))); ! decl = start_var_decl (type, IDENTIFIER_POINTER (DECL_NAME (decl))); string_expr = my_build_string (IDENTIFIER_LENGTH (string) + 1, IDENTIFIER_POINTER (string)); ! finish_var_decl (decl, string_expr); } for (chain = meth_var_types_chain; chain; chain = TREE_CHAIN (chain)) { string = TREE_VALUE (chain); decl = TREE_PURPOSE (chain); ! type = build_array_type ! (char_type_node, ! build_index_type ! (build_int_cst (NULL_TREE, ! IDENTIFIER_LENGTH (string)))); ! decl = start_var_decl (type, IDENTIFIER_POINTER (DECL_NAME (decl))); string_expr = my_build_string (IDENTIFIER_LENGTH (string) + 1, ! IDENTIFIER_POINTER (string)); ! finish_var_decl (decl, string_expr); } } *************** static GTY(()) int selector_reference_id *** 2112,2135 **** static tree build_selector_reference_decl (void) { ! tree decl, ident; char buf[256]; sprintf (buf, "_OBJC_SELECTOR_REFERENCES_%d", selector_reference_idx++); ! ident = get_identifier (buf); ! decl = build_decl (VAR_DECL, ident, selector_type); ! DECL_EXTERNAL (decl) = 1; ! TREE_PUBLIC (decl) = 0; ! TREE_USED (decl) = 1; ! DECL_ARTIFICIAL (decl) = 1; ! DECL_CONTEXT (decl) = 0; ! make_decl_rtl (decl, 0); ! pushdecl_top_level (decl); ! return decl; } /* Just a handy wrapper for add_objc_string. */ --- 2305,2333 ---- static tree build_selector_reference_decl (void) { ! tree decl; char buf[256]; sprintf (buf, "_OBJC_SELECTOR_REFERENCES_%d", selector_reference_idx++); + decl = start_var_decl (objc_selector_type, buf); ! return decl; ! } ! static void ! build_selector_table_decl (void) ! { ! tree temp; ! if (flag_typed_selectors) ! { ! build_selector_template (); ! temp = build_array_type (objc_selector_template, NULL_TREE); ! } ! else ! temp = build_array_type (objc_selector_type, NULL_TREE); ! UOBJC_SELECTOR_TABLE_decl = start_var_decl (temp, "_OBJC_SELECTOR_TABLE"); } /* Just a handy wrapper for add_objc_string. */ *************** build_selector_reference_decl (void) *** 2137,2156 **** static tree build_selector (tree ident) { ! tree expr = add_objc_string (ident, meth_var_names); ! if (flag_typed_selectors) ! return expr; ! else ! return build_c_cast (selector_type, expr); /* cast! */ } static void build_selector_translation_table (void) { - tree sc_spec, decl_specs; tree chain, initlist = NULL_TREE; int offset = 0; ! tree decl = NULL_TREE, var_decl, name; for (chain = sel_ref_chain; chain; chain = TREE_CHAIN (chain)) { --- 2335,2350 ---- static tree build_selector (tree ident) { ! return convert (objc_selector_type, ! add_objc_string (ident, meth_var_names)); } static void build_selector_translation_table (void) { tree chain, initlist = NULL_TREE; int offset = 0; ! tree decl = NULL_TREE; for (chain = sel_ref_chain; chain; chain = TREE_CHAIN (chain)) { *************** build_selector_translation_table (void) *** 2171,2210 **** } } if (!found) ! { ! /* Adjust line number for warning message. */ ! int save_lineno = input_line; ! if (flag_next_runtime && TREE_PURPOSE (chain)) ! input_line = DECL_SOURCE_LINE (TREE_PURPOSE (chain)); ! warning ("creating selector for non existant method %s", ! IDENTIFIER_POINTER (TREE_VALUE (chain))); ! input_line = save_lineno; ! } } expr = build_selector (TREE_VALUE (chain)); - - if (flag_next_runtime) - { - name = DECL_NAME (TREE_PURPOSE (chain)); - - sc_spec = build_tree_list (NULL_TREE, ridpointers[(int) RID_STATIC]); - - /* static SEL _OBJC_SELECTOR_REFERENCES_n = ...; */ - decl_specs = tree_cons (NULL_TREE, selector_type, sc_spec); - - var_decl = name; - - /* The `decl' that is returned from start_decl is the one that we - forward declared in `build_selector_reference' */ - decl = start_decl (var_decl, decl_specs, 1, NULL_TREE ); - } - /* add one for the '\0' character */ offset += IDENTIFIER_LENGTH (TREE_VALUE (chain)) + 1; if (flag_next_runtime) ! finish_decl (decl, expr, NULL_TREE); else { if (flag_typed_selectors) --- 2365,2390 ---- } } if (!found) ! { ! location_t *loc; ! if (flag_next_runtime && TREE_PURPOSE (chain)) ! loc = &DECL_SOURCE_LOCATION (TREE_PURPOSE (chain)); ! else ! loc = &input_location; ! warning ("%Hcreating selector for nonexistent method %qE", ! loc, TREE_VALUE (chain)); ! } } expr = build_selector (TREE_VALUE (chain)); /* add one for the '\0' character */ offset += IDENTIFIER_LENGTH (TREE_VALUE (chain)) + 1; if (flag_next_runtime) ! { ! decl = TREE_PURPOSE (chain); ! finish_var_decl (decl, expr); ! } else { if (flag_typed_selectors) *************** build_selector_translation_table (void) *** 2216,2238 **** expr = objc_build_constructor (objc_selector_template, nreverse (eltlist)); } - initlist = tree_cons (NULL_TREE, expr, initlist); } } if (! flag_next_runtime) { ! /* Cause the variable and its initial value to be actually output. */ ! DECL_EXTERNAL (UOBJC_SELECTOR_TABLE_decl) = 0; ! TREE_STATIC (UOBJC_SELECTOR_TABLE_decl) = 1; ! /* NULL terminate the list and fix the decl for output. */ ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); ! DECL_INITIAL (UOBJC_SELECTOR_TABLE_decl) = objc_ellipsis_node; initlist = objc_build_constructor (TREE_TYPE (UOBJC_SELECTOR_TABLE_decl), nreverse (initlist)); ! finish_decl (UOBJC_SELECTOR_TABLE_decl, initlist, NULL_TREE); ! current_function_decl = NULL_TREE; } } --- 2396,2423 ---- expr = objc_build_constructor (objc_selector_template, nreverse (eltlist)); } + initlist = tree_cons (NULL_TREE, expr, initlist); } } if (! flag_next_runtime) { ! /* Cause the selector table (previously forward-declared) ! to be actually output. */ ! initlist = tree_cons (NULL_TREE, ! flag_typed_selectors ! ? objc_build_constructor ! (objc_selector_template, ! tree_cons (NULL_TREE, ! build_int_cst (NULL_TREE, 0), ! tree_cons (NULL_TREE, ! build_int_cst (NULL_TREE, 0), ! NULL_TREE))) ! : build_int_cst (NULL_TREE, 0), initlist); initlist = objc_build_constructor (TREE_TYPE (UOBJC_SELECTOR_TABLE_decl), nreverse (initlist)); ! finish_var_decl (UOBJC_SELECTOR_TABLE_decl, initlist); } } *************** get_proto_encoding (tree proto) *** 2253,2259 **** return add_objc_string (encoding, meth_var_types); } else ! return build_int_2 (0, 0); } /* sel_ref_chain is a list whose "value" fields will be instances of --- 2438,2444 ---- return add_objc_string (encoding, meth_var_types); } else ! return build_int_cst (NULL_TREE, 0); } /* sel_ref_chain is a list whose "value" fields will be instances of *************** build_typed_selector_reference (tree ide *** 2280,2288 **** return_at_index: expr = build_unary_op (ADDR_EXPR, build_array_ref (UOBJC_SELECTOR_TABLE_decl, ! build_int_2 (index, 0)), 1); ! return build_c_cast (selector_type, expr); } static tree --- 2465,2473 ---- return_at_index: expr = build_unary_op (ADDR_EXPR, build_array_ref (UOBJC_SELECTOR_TABLE_decl, ! build_int_cst (NULL_TREE, index)), 1); ! return convert (objc_selector_type, expr); } static tree *************** build_selector_reference (tree ident) *** 2298,2317 **** return (flag_next_runtime ? TREE_PURPOSE (*chain) : build_array_ref (UOBJC_SELECTOR_TABLE_decl, ! build_int_2 (index, 0))); index++; chain = &TREE_CHAIN (*chain); } ! expr = build_selector_reference_decl (); *chain = tree_cons (expr, ident, NULL_TREE); return (flag_next_runtime ? expr : build_array_ref (UOBJC_SELECTOR_TABLE_decl, ! build_int_2 (index, 0))); } static GTY(()) int class_reference_idx; --- 2483,2502 ---- return (flag_next_runtime ? TREE_PURPOSE (*chain) : build_array_ref (UOBJC_SELECTOR_TABLE_decl, ! build_int_cst (NULL_TREE, index))); index++; chain = &TREE_CHAIN (*chain); } ! expr = (flag_next_runtime ? build_selector_reference_decl (): NULL_TREE); *chain = tree_cons (expr, ident, NULL_TREE); return (flag_next_runtime ? expr : build_array_ref (UOBJC_SELECTOR_TABLE_decl, ! build_int_cst (NULL_TREE, index))); } static GTY(()) int class_reference_idx; *************** static GTY(()) int class_reference_idx; *** 2319,2340 **** static tree build_class_reference_decl (void) { ! tree decl, ident; char buf[256]; sprintf (buf, "_OBJC_CLASS_REFERENCES_%d", class_reference_idx++); ! ! ident = get_identifier (buf); ! ! decl = build_decl (VAR_DECL, ident, objc_class_type); ! DECL_EXTERNAL (decl) = 1; ! TREE_PUBLIC (decl) = 0; ! TREE_USED (decl) = 1; ! DECL_CONTEXT (decl) = 0; ! DECL_ARTIFICIAL (decl) = 1; ! ! make_decl_rtl (decl, 0); ! pushdecl_top_level (decl); return decl; } --- 2504,2514 ---- static tree build_class_reference_decl (void) { ! tree decl; char buf[256]; sprintf (buf, "_OBJC_CLASS_REFERENCES_%d", class_reference_idx++); ! decl = start_var_decl (objc_class_type, buf); return decl; } *************** add_class_reference (tree ident) *** 2371,2377 **** reference variable. */ tree ! get_class_reference (tree ident) { tree orig_ident; --- 2545,2551 ---- reference variable. */ tree ! objc_get_class_reference (tree ident) { tree orig_ident; *************** get_class_reference (tree ident) *** 2384,2392 **** #endif orig_ident = ident; ! if (!(ident = is_class_name (ident))) { ! error ("`%s' is not an Objective-C class name or alias", IDENTIFIER_POINTER (orig_ident)); return error_mark_node; } --- 2558,2566 ---- #endif orig_ident = ident; ! if (!(ident = objc_is_class_name (ident))) { ! error ("%qs is not an Objective-C class name or alias", IDENTIFIER_POINTER (orig_ident)); return error_mark_node; } *************** add_objc_string (tree ident, enum string *** 2444,2450 **** while (*chain) { if (TREE_VALUE (*chain) == ident) ! return build_unary_op (ADDR_EXPR, TREE_PURPOSE (*chain), 1); chain = &TREE_CHAIN (*chain); } --- 2618,2625 ---- while (*chain) { if (TREE_VALUE (*chain) == ident) ! return convert (string_type_node, ! build_unary_op (ADDR_EXPR, TREE_PURPOSE (*chain), 1)); chain = &TREE_CHAIN (*chain); } *************** add_objc_string (tree ident, enum string *** 2453,2459 **** *chain = tree_cons (decl, ident, NULL_TREE); ! return build_unary_op (ADDR_EXPR, decl, 1); } static GTY(()) int class_names_idx; --- 2628,2634 ---- *chain = tree_cons (decl, ident, NULL_TREE); ! return convert (string_type_node, build_unary_op (ADDR_EXPR, decl, 1)); } static GTY(()) int class_names_idx; *************** build_objc_string_decl (enum string_sect *** 2482,2489 **** TREE_CONSTANT (decl) = 1; DECL_CONTEXT (decl) = 0; DECL_ARTIFICIAL (decl) = 1; ! make_decl_rtl (decl, 0); pushdecl_top_level (decl); return decl; --- 2657,2667 ---- TREE_CONSTANT (decl) = 1; DECL_CONTEXT (decl) = 0; DECL_ARTIFICIAL (decl) = 1; + #ifdef OBJCPLUS + DECL_THIS_STATIC (decl) = 1; /* squash redeclaration errors */ + #endif ! make_decl_rtl (decl); pushdecl_top_level (decl); return decl; *************** objc_declare_alias (tree alias_ident, tr *** 2501,2510 **** } #endif /* OBJCPLUS */ ! if (!(underlying_class = is_class_name (class_ident))) ! warning ("cannot find class `%s'", IDENTIFIER_POINTER (class_ident)); ! else if (is_class_name (alias_ident)) ! warning ("class `%s' already exists", IDENTIFIER_POINTER (alias_ident)); else alias_chain = tree_cons (underlying_class, alias_ident, alias_chain); } --- 2679,2688 ---- } #endif /* OBJCPLUS */ ! if (!(underlying_class = objc_is_class_name (class_ident))) ! warning ("cannot find class %qs", IDENTIFIER_POINTER (class_ident)); ! else if (objc_is_class_name (alias_ident)) ! warning ("class %qs already exists", IDENTIFIER_POINTER (alias_ident)); else alias_chain = tree_cons (underlying_class, alias_ident, alias_chain); } *************** objc_declare_class (tree ident_list) *** 2523,2549 **** { tree ident = TREE_VALUE (list); ! if (! is_class_name (ident)) { ! tree record = lookup_name (ident); ! ! if (record && ! TREE_STATIC_TEMPLATE (record)) { ! error ("`%s' redeclared as different kind of symbol", ! IDENTIFIER_POINTER (ident)); ! error ("%Jprevious declaration of '%D'", ! record, record); } record = xref_tag (RECORD_TYPE, ident); ! TREE_STATIC_TEMPLATE (record) = 1; class_chain = tree_cons (NULL_TREE, ident, class_chain); } } } tree ! is_class_name (tree ident) { tree chain; --- 2701,2735 ---- { tree ident = TREE_VALUE (list); ! if (! objc_is_class_name (ident)) { ! tree record = lookup_name (ident), type = record; ! ! if (record) { ! if (TREE_CODE (record) == TYPE_DECL) ! type = DECL_ORIGINAL_TYPE (record); ! ! if (!TYPE_HAS_OBJC_INFO (type) ! || !TYPE_OBJC_INTERFACE (type)) ! { ! error ("%qs redeclared as different kind of symbol", ! IDENTIFIER_POINTER (ident)); ! error ("%Jprevious declaration of '%D'", ! record, record); ! } } record = xref_tag (RECORD_TYPE, ident); ! INIT_TYPE_OBJC_INFO (record); ! TYPE_OBJC_INTERFACE (record) = ident; class_chain = tree_cons (NULL_TREE, ident, class_chain); } } } tree ! objc_is_class_name (tree ident) { tree chain; *************** is_class_name (tree ident) *** 2551,2561 **** && identifier_global_value (ident)) ident = identifier_global_value (ident); while (ident && TREE_CODE (ident) == TYPE_DECL && DECL_ORIGINAL_TYPE (ident)) ! ident = TYPE_NAME (DECL_ORIGINAL_TYPE (ident)); - #ifdef OBJCPLUS if (ident && TREE_CODE (ident) == RECORD_TYPE) ! ident = TYPE_NAME (ident); if (ident && TREE_CODE (ident) == TYPE_DECL) ident = DECL_NAME (ident); #endif --- 2737,2747 ---- && identifier_global_value (ident)) ident = identifier_global_value (ident); while (ident && TREE_CODE (ident) == TYPE_DECL && DECL_ORIGINAL_TYPE (ident)) ! ident = OBJC_TYPE_NAME (DECL_ORIGINAL_TYPE (ident)); if (ident && TREE_CODE (ident) == RECORD_TYPE) ! ident = OBJC_TYPE_NAME (ident); ! #ifdef OBJCPLUS if (ident && TREE_CODE (ident) == TYPE_DECL) ident = DECL_NAME (ident); #endif *************** is_class_name (tree ident) *** 2580,2585 **** --- 2766,2791 ---- return 0; } + /* Check whether TYPE is either 'id' or 'Class'. */ + + tree + objc_is_id (tree type) + { + if (type && TREE_CODE (type) == IDENTIFIER_NODE + && identifier_global_value (type)) + type = identifier_global_value (type); + + if (type && TREE_CODE (type) == TYPE_DECL) + type = TREE_TYPE (type); + + /* NB: This function may be called before the ObjC front-end has + been initialized, in which case OBJC_OBJECT_TYPE will (still) be NULL. */ + return (objc_object_type && type + && (IS_ID (type) || IS_CLASS (type) || IS_SUPER (type)) + ? type + : NULL_TREE); + } + /* Check whether TYPE is either 'id', 'Class', or a pointer to an ObjC class instance. This is needed by other parts of the compiler to handle ObjC types gracefully. */ *************** is_class_name (tree ident) *** 2587,2605 **** tree objc_is_object_ptr (tree type) { type = TYPE_MAIN_VARIANT (type); ! if (!type || TREE_CODE (type) != POINTER_TYPE) return 0; ! /* NB: This function may be called before the ObjC front-end has ! been initialized, in which case ID_TYPE will be NULL. */ ! if (id_type && type && TYPE_P (type) ! && (IS_ID (type) ! || TREE_TYPE (type) == TREE_TYPE (objc_class_type))) ! return type; ! return is_class_name (OBJC_TYPE_NAME (TREE_TYPE (type))); } ! tree lookup_interface (tree ident) { tree chain; --- 2793,2812 ---- tree objc_is_object_ptr (tree type) { + tree ret; + type = TYPE_MAIN_VARIANT (type); ! if (!POINTER_TYPE_P (type)) return 0; ! ! ret = objc_is_id (type); ! if (!ret) ! ret = objc_is_class_name (TREE_TYPE (type)); ! ! return ret; } ! static tree lookup_interface (tree ident) { tree chain; *************** lookup_interface (tree ident) *** 2619,3288 **** /* Implement @defs () within struct bodies. */ tree ! get_class_ivars_from_name (tree class_name) { tree interface = lookup_interface (class_name); - tree field, fields = NULL_TREE; if (interface) ! { ! tree raw_ivar = get_class_ivars (interface, 1); ! /* Regenerate the FIELD_DECLs for the enclosing struct. */ ! for (; raw_ivar; raw_ivar = TREE_CHAIN (raw_ivar)) ! { ! field = grokfield (TREE_PURPOSE (TREE_VALUE (raw_ivar)), ! TREE_PURPOSE (raw_ivar), ! TREE_VALUE (TREE_VALUE (raw_ivar))); ! #ifdef OBJCPLUS ! finish_member_declaration (field); ! #else ! fields = chainon (fields, field); ! #endif ! } ! } ! else ! error ("cannot find interface declaration for `%s'", ! IDENTIFIER_POINTER (class_name)); ! return fields; } /* Used by: build_private_template, continue_class, and for @defs constructs. */ static tree ! get_class_ivars (tree interface, int raw) { ! tree my_name, super_name, ivar_chain; ! my_name = CLASS_NAME (interface); ! super_name = CLASS_SUPER_NAME (interface); ! if (raw) ! ivar_chain = CLASS_RAW_IVARS (interface); ! else ! { ! ivar_chain = CLASS_IVARS (interface); ! /* Save off a pristine copy of the leaf ivars (i.e, those not ! inherited from a super class). */ ! if (!CLASS_OWN_IVARS (interface)) ! CLASS_OWN_IVARS (interface) = copy_list (ivar_chain); ! } ! while (super_name) { ! tree op1; ! tree super_interface = lookup_interface (super_name); ! ! if (!super_interface) ! { ! /* fatal did not work with 2 args...should fix */ ! error ("cannot find interface declaration for `%s', superclass of `%s'", ! IDENTIFIER_POINTER (super_name), ! IDENTIFIER_POINTER (my_name)); ! exit (FATAL_EXIT_CODE); ! } ! ! if (super_interface == interface) ! fatal_error ("circular inheritance in interface declaration for `%s'", ! IDENTIFIER_POINTER (super_name)); ! ! interface = super_interface; ! my_name = CLASS_NAME (interface); ! super_name = CLASS_SUPER_NAME (interface); ! ! op1 = (raw ? CLASS_RAW_IVARS (interface) : CLASS_OWN_IVARS (interface)); ! if (op1) ! { ! tree head = copy_list (op1); ! ! /* Prepend super class ivars...make a copy of the list, we ! do not want to alter the original. */ ! chainon (head, ivar_chain); ! ivar_chain = head; ! } } return ivar_chain; } static tree ! objc_enter_block (void) { ! tree block; ! ! #ifdef OBJCPLUS ! block = begin_compound_stmt (0); ! #else ! block = c_begin_compound_stmt (); ! pushlevel (0); ! clear_last_expr (); ! add_scope_stmt (/*begin_p=*/1, /*partial_p=*/0); ! #endif ! ! objc_exception_block_stack = tree_cons (NULL_TREE, block, ! objc_exception_block_stack); ! blk_nesting_count++; ! return block; } ! static tree ! objc_exit_block (void) { ! tree block = TREE_VALUE (objc_exception_block_stack); ! #ifndef OBJCPLUS ! tree scope_stmt, inner; ! #endif ! objc_clear_super_receiver (); ! #ifdef OBJCPLUS ! finish_compound_stmt (0, block); ! #else ! scope_stmt = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0); ! inner = poplevel (KEEP_MAYBE, 1, 0); ! SCOPE_STMT_BLOCK (TREE_PURPOSE (scope_stmt)) ! = SCOPE_STMT_BLOCK (TREE_VALUE (scope_stmt)) ! = inner; ! RECHAIN_STMTS (block, COMPOUND_BODY (block)); ! #endif ! last_expr_type = NULL_TREE; ! objc_exception_block_stack = TREE_CHAIN (objc_exception_block_stack); ! blk_nesting_count--; ! return block; ! } ! static tree ! objc_declare_variable (enum rid scspec, tree name, tree type, tree init) ! { ! tree decl; ! type = tree_cons (NULL_TREE, type, ! tree_cons (NULL_TREE, ridpointers[(int) scspec], ! NULL_TREE)); ! TREE_STATIC (type) = 1; ! decl = start_decl (name, type, (init != NULL_TREE), NULL_TREE); ! finish_decl (decl, init, NULL_TREE); ! /* This prevents `unused variable' warnings when compiling with -Wall. */ ! TREE_USED (decl) = 1; ! DECL_ARTIFICIAL (decl) = 1; ! return decl; ! } ! tree ! objc_build_throw_stmt (tree throw_expr) { ! tree func_params; ! if (!flag_objc_exceptions) ! fatal_error ("Use `-fobjc-exceptions' to enable Objective-C exception syntax"); ! if (!throw_expr && objc_caught_exception) ! throw_expr = TREE_VALUE (objc_caught_exception); ! if (!throw_expr) { ! error ("`@throw;' (rethrow) used outside of a `@catch' block"); ! return error_mark_node; } ! ! func_params = tree_cons (NULL_TREE, throw_expr, NULL_TREE); ! ! assemble_external (objc_exception_throw_decl); ! return c_expand_expr_stmt (build_function_call (objc_exception_throw_decl, ! func_params)); } ! static void ! val_stack_push (struct val_stack **nc, long val) { ! struct val_stack *new_elem = xmalloc (sizeof (struct val_stack)); ! new_elem->val = val; ! new_elem->next = *nc; ! *nc = new_elem; } ! static void ! val_stack_pop (struct val_stack **nc) { ! struct val_stack *old_elem = *nc; ! *nc = old_elem->next; ! free (old_elem); } ! static void ! objc_build_try_enter_fragment (void) { ! /* objc_exception_try_enter(&_stackExceptionData); ! if (!_setjmp(&_stackExceptionData.buf)) { */ ! tree func_params, if_stmt, cond; ! func_params ! = tree_cons (NULL_TREE, ! build_unary_op (ADDR_EXPR, ! TREE_VALUE (objc_stack_exception_data), ! 0), ! NULL_TREE); ! assemble_external (objc_exception_try_enter_decl); ! c_expand_expr_stmt (build_function_call ! (objc_exception_try_enter_decl, func_params)); ! if_stmt = c_begin_if_stmt (); ! if_nesting_count++; ! /* If has been included, the _setjmp prototype has ! acquired a real, breathing type for its parameter. Cast our ! argument to that type. */ ! func_params ! = tree_cons (NULL_TREE, ! build_c_cast (TYPE_ARG_TYPES (TREE_TYPE (objc_setjmp_decl)) ! ? TREE_VALUE (TYPE_ARG_TYPES (TREE_TYPE (objc_setjmp_decl))) ! : ptr_type_node, ! build_unary_op ! (ADDR_EXPR, ! build_component_ref (TREE_VALUE (objc_stack_exception_data), ! get_identifier ("buf")), 0)), ! NULL_TREE); ! assemble_external (objc_setjmp_decl); ! cond = build_unary_op (TRUTH_NOT_EXPR, ! build_function_call (objc_setjmp_decl, func_params), ! 0); ! c_expand_start_cond (c_common_truthvalue_conversion (cond), ! 0, if_stmt); ! objc_enter_block (); } static tree ! objc_build_extract_expr (void) { ! /* ... = objc_exception_extract(&_stackExceptionData); */ ! tree func_params ! = tree_cons (NULL_TREE, ! build_unary_op (ADDR_EXPR, ! TREE_VALUE (objc_stack_exception_data), 0), ! NULL_TREE); ! assemble_external (objc_exception_extract_decl); ! return build_function_call (objc_exception_extract_decl, func_params); } ! static void ! objc_build_try_exit_fragment (void) ! { ! /* objc_exception_try_exit(&_stackExceptionData); */ ! ! tree func_params ! = tree_cons (NULL_TREE, ! build_unary_op (ADDR_EXPR, ! TREE_VALUE (objc_stack_exception_data), 0), ! NULL_TREE); ! ! assemble_external (objc_exception_try_exit_decl); ! c_expand_expr_stmt (build_function_call (objc_exception_try_exit_decl, ! func_params)); ! } ! static void ! objc_build_extract_fragment (void) { ! /* } else { ! _rethrowException = objc_exception_extract(&_stackExceptionData); ! } */ ! ! objc_exit_block (); ! c_finish_then (); ! c_expand_start_else (); ! objc_enter_block (); ! c_expand_expr_stmt (build_modify_expr ! (TREE_VALUE (objc_rethrow_exception), ! NOP_EXPR, ! objc_build_extract_expr ())); ! objc_exit_block (); ! c_finish_else (); ! c_expand_end_cond (); ! if_nesting_count--; ! } ! tree ! objc_build_try_prologue (void) ! { ! /* { // new scope ! struct _objc_exception_data _stackExceptionData; ! volatile id _rethrowException = nil; ! { // begin TRY-CATCH scope ! objc_exception_try_enter(&_stackExceptionData); ! if (!_setjmp(&_stackExceptionData.buf)) { */ ! tree try_catch_block; ! if (!flag_objc_exceptions) ! fatal_error ("Use `-fobjc-exceptions' to enable Objective-C exception syntax"); ! objc_mark_locals_volatile ((void *)(exc_binding_stack ! ? exc_binding_stack->val ! : 0)); ! objc_enter_block (); ! objc_stack_exception_data ! = tree_cons (NULL_TREE, ! objc_declare_variable (RID_AUTO, ! get_identifier (UTAG_EXCDATA_VAR), ! xref_tag (RECORD_TYPE, ! get_identifier (UTAG_EXCDATA)), ! NULL_TREE), ! objc_stack_exception_data); ! objc_rethrow_exception = tree_cons (NULL_TREE, ! objc_declare_variable (RID_VOLATILE, ! get_identifier (UTAG_RETHROWEXC_VAR), ! id_type, ! build_int_2 (0, 0)), ! objc_rethrow_exception); ! try_catch_block = objc_enter_block (); ! val_stack_push (&exc_binding_stack, (long) get_current_scope ()); ! objc_build_try_enter_fragment (); ! return try_catch_block; } ! void ! objc_build_try_epilogue (int also_catch_prologue) ! { ! if (also_catch_prologue) ! { ! /* } else { ! register id _caughtException = objc_exception_extract( &_stackExceptionData); ! objc_exception_try_enter(&_stackExceptionData); ! if(!_setjmp(&_stackExceptionData.buf)) { ! if (0) { */ ! ! tree if_stmt; ! ! objc_exit_block (); ! c_finish_then (); ! ! c_expand_start_else (); ! objc_enter_block (); ! objc_caught_exception ! = tree_cons (NULL_TREE, ! objc_declare_variable (RID_REGISTER, ! get_identifier (UTAG_CAUGHTEXC_VAR), ! id_type, ! objc_build_extract_expr ()), ! objc_caught_exception); ! objc_build_try_enter_fragment (); ! val_stack_push (&catch_count_stack, 1); ! if_stmt = c_begin_if_stmt (); ! if_nesting_count++; ! c_expand_start_cond (c_common_truthvalue_conversion (boolean_false_node), ! 0, if_stmt); ! objc_enter_block (); ! /* Start a new chain of @catch statements for this @try. */ ! objc_catch_type = tree_cons (objc_catch_type, NULL_TREE, NULL_TREE); ! } ! else ! { /* !also_catch_prologue */ ! /* } else { ! _rethrowException = objc_exception_extract( &_stackExceptionData); ! } ! } */ ! objc_build_extract_fragment (); ! objc_exit_block (); ! } ! } ! void ! objc_build_catch_stmt (tree catch_expr) { ! /* } else if (objc_exception_match(objc_get_class("SomeClass"), _caughtException)) { ! register SomeClass *e = _caughtException; */ ! tree if_stmt, cond, func_params, prev_catch, var_name, var_type; ! int catch_id; ! #ifndef OBJCPLUS ! /* Yet another C/C++ impedance mismatch. */ ! catch_expr = TREE_PURPOSE (catch_expr); ! #endif ! var_name = TREE_VALUE (catch_expr); ! var_type = TREE_VALUE (TREE_PURPOSE (catch_expr)); ! if (TREE_CODE (var_name) == INDIRECT_REF) ! var_name = TREE_OPERAND (var_name, 0); ! if (TREE_CODE (var_type) == TYPE_DECL ! || TREE_CODE (var_type) == POINTER_TYPE) ! var_type = TREE_TYPE (var_type); ! catch_id = (var_type == TREE_TYPE (id_type)); ! if (!flag_objc_exceptions) ! fatal_error ("Use `-fobjc-exceptions' to enable Objective-C exception syntax"); ! if (!(catch_id || TYPED_OBJECT (var_type))) ! fatal_error ("`@catch' parameter is not a known Objective-C class type"); ! /* Examine previous @catch clauses for the current @try block for ! superclasses of the 'var_type' class. */ ! for (prev_catch = objc_catch_type; TREE_VALUE (prev_catch); ! prev_catch = TREE_CHAIN (prev_catch)) { ! if (TREE_VALUE (prev_catch) == TREE_TYPE (id_type)) ! { ! warning ("Exception already handled by preceding `@catch(id)'"); ! break; ! } ! else if (!catch_id ! && objc_comptypes (TREE_VALUE (prev_catch), var_type, 0) == 1) ! warning ("Exception of type `%s *' already handled by `@catch (%s *)'", ! IDENTIFIER_POINTER (OBJC_TYPE_NAME (var_type)), ! IDENTIFIER_POINTER (OBJC_TYPE_NAME (TREE_VALUE (prev_catch)))); } ! objc_catch_type = tree_cons (NULL_TREE, var_type, objc_catch_type); ! objc_exit_block (); ! c_finish_then (); ! c_expand_start_else (); ! catch_count_stack->val++; ! if_stmt = c_begin_if_stmt (); ! if_nesting_count++; ! if (catch_id) ! cond = integer_one_node; ! else ! { ! cond = get_class_reference (OBJC_TYPE_NAME (var_type)); ! ! func_params ! = tree_cons (NULL_TREE, cond, ! tree_cons (NULL_TREE, ! TREE_VALUE (objc_caught_exception), ! NULL_TREE)); ! assemble_external (objc_exception_match_decl); ! cond = build_function_call (objc_exception_match_decl, func_params); ! } ! c_expand_start_cond (c_common_truthvalue_conversion (cond), ! 0, if_stmt); ! objc_enter_block (); ! objc_declare_variable (RID_REGISTER, var_name, ! build_pointer_type (var_type), ! TREE_VALUE (objc_caught_exception)); } void ! objc_build_catch_epilogue (void) { ! /* } else { ! _rethrowException = _caughtException; ! objc_exception_try_exit(&_stackExceptionData); ! } ! } else { ! _rethrowException = objc_exception_extract(&_stackExceptionData); ! } ! } ! } // end TRY-CATCH scope ! */ ! ! objc_exit_block (); ! c_finish_then (); ! ! c_expand_start_else (); ! objc_enter_block (); ! c_expand_expr_stmt ! (build_modify_expr ! (TREE_VALUE (objc_rethrow_exception), ! NOP_EXPR, ! TREE_VALUE (objc_caught_exception))); ! objc_build_try_exit_fragment (); ! objc_exit_block (); ! while (catch_count_stack->val--) ! { ! c_finish_else (); /* close off all the nested ifs ! */ ! c_expand_end_cond (); ! if_nesting_count--; ! } ! val_stack_pop (&catch_count_stack); ! objc_caught_exception = TREE_CHAIN (objc_caught_exception); ! ! objc_build_extract_fragment (); ! ! objc_exit_block (); ! c_finish_else (); ! c_expand_end_cond (); ! if_nesting_count--; ! objc_exit_block (); ! /* Return to enclosing chain of @catch statements (if any). */ ! while (TREE_VALUE (objc_catch_type)) ! objc_catch_type = TREE_CHAIN (objc_catch_type); ! objc_catch_type = TREE_PURPOSE (objc_catch_type); } ! tree ! objc_build_finally_prologue (void) { ! /* { // begin FINALLY scope ! if (!_rethrowException) { ! objc_exception_try_exit(&_stackExceptionData); ! } */ ! tree blk = objc_enter_block (); ! tree if_stmt = c_begin_if_stmt (); ! if_nesting_count++; ! c_expand_start_cond (c_common_truthvalue_conversion ! (build_unary_op ! (TRUTH_NOT_EXPR, ! TREE_VALUE (objc_rethrow_exception), 0)), ! 0, if_stmt); ! objc_enter_block (); ! objc_build_try_exit_fragment (); ! objc_exit_block (); ! c_finish_then (); ! c_expand_end_cond (); ! if_nesting_count--; ! return blk; ! } ! tree ! objc_build_finally_epilogue (void) ! { ! /* if (_rethrowException) { ! objc_exception_throw(_rethrowException); } ! } // end FINALLY scope ! } */ ! tree if_stmt = c_begin_if_stmt (); ! if_nesting_count++; ! c_expand_start_cond ! (c_common_truthvalue_conversion (TREE_VALUE (objc_rethrow_exception)), ! 0, if_stmt); ! objc_enter_block (); ! objc_build_throw_stmt (TREE_VALUE (objc_rethrow_exception)); ! objc_exit_block (); ! c_finish_then (); ! c_expand_end_cond (); ! if_nesting_count--; ! objc_exit_block (); ! objc_rethrow_exception = TREE_CHAIN (objc_rethrow_exception); ! objc_stack_exception_data = TREE_CHAIN (objc_stack_exception_data); ! val_stack_pop (&exc_binding_stack); ! return objc_exit_block (); } ! tree ! objc_build_try_catch_finally_stmt (int has_catch, int has_finally) { ! /* NB: The operative assumption here is that TRY_FINALLY_EXPR will ! deal with all exits from 'try_catch_blk' and route them through ! 'finally_blk'. */ ! tree outer_blk = objc_build_finally_epilogue (); ! tree prec_stmt = TREE_CHAIN (TREE_CHAIN (COMPOUND_BODY (outer_blk))); ! tree try_catch_blk = TREE_CHAIN (prec_stmt), try_catch_expr; ! tree finally_blk = TREE_CHAIN (try_catch_blk), finally_expr; ! tree succ_stmt = TREE_CHAIN (finally_blk); ! tree try_finally_stmt, try_finally_expr; ! if (!flag_objc_exceptions) ! fatal_error ("Use `-fobjc-exceptions' to enable Objective-C exception syntax"); ! /* It is an error to have a @try block without a @catch and/or @finally ! (even though sensible code can be generated nonetheless). */ ! if (!has_catch && !has_finally) ! error ("`@try' without `@catch' or `@finally'"); ! /* We shall now do something truly disgusting. We shall remove the ! 'try_catch_blk' and 'finally_blk' from the 'outer_blk' statement ! chain, and replace them with a TRY_FINALLY_EXPR statement! If ! this doesn't work, we will have to learn (from Per/gcj) how to ! construct the 'outer_blk' lazily. */ ! TREE_CHAIN (try_catch_blk) = TREE_CHAIN (finally_blk) = NULL_TREE; ! try_catch_expr = build1 (STMT_EXPR, void_type_node, try_catch_blk); ! TREE_SIDE_EFFECTS (try_catch_expr) = 1; ! finally_expr = build1 (STMT_EXPR, void_type_node, finally_blk); ! TREE_SIDE_EFFECTS (finally_expr) = 1; ! try_finally_expr = build (TRY_FINALLY_EXPR, void_type_node, try_catch_expr, ! finally_expr); ! TREE_SIDE_EFFECTS (try_finally_expr) = 1; ! try_finally_stmt = build_stmt (EXPR_STMT, try_finally_expr); ! TREE_CHAIN (prec_stmt) = try_finally_stmt; ! TREE_CHAIN (try_finally_stmt) = succ_stmt; ! ! return outer_blk; /* the whole enchilada */ } ! void ! objc_build_synchronized_prologue (tree sync_expr) { ! /* { ! id _eval_once = ; ! @try { ! objc_sync_enter( _eval_once ); */ ! tree func_params; ! if (!flag_objc_exceptions) ! fatal_error ("Use `-fobjc-exceptions' to enable Objective-C exception syntax"); ! objc_enter_block (); ! objc_eval_once ! = tree_cons (NULL_TREE, ! objc_declare_variable (RID_AUTO, ! get_identifier (UTAG_EVALONCE_VAR), ! id_type, ! sync_expr), ! objc_eval_once); ! objc_build_try_prologue (); ! objc_enter_block (); ! func_params = tree_cons (NULL_TREE, ! TREE_VALUE (objc_eval_once), ! NULL_TREE); ! assemble_external (objc_sync_enter_decl); ! c_expand_expr_stmt (build_function_call ! (objc_sync_enter_decl, func_params)); } ! tree ! objc_build_synchronized_epilogue (void) { ! /* } ! @finally { ! objc_sync_exit( _eval_once ); ! } ! } */ ! ! tree func_params; ! objc_exit_block (); ! objc_build_try_epilogue (0); ! objc_build_finally_prologue (); ! func_params = tree_cons (NULL_TREE, TREE_VALUE (objc_eval_once), ! NULL_TREE); ! assemble_external (objc_sync_exit_decl); ! c_expand_expr_stmt (build_function_call (objc_sync_exit_decl, ! func_params)); ! objc_build_try_catch_finally_stmt (0, 1); ! return objc_exit_block (); } /* Predefine the following data type: struct _objc_exception_data --- 2826,3434 ---- /* Implement @defs () within struct bodies. */ tree ! objc_get_class_ivars (tree class_name) { tree interface = lookup_interface (class_name); if (interface) ! return get_class_ivars (interface); ! error ("cannot find interface declaration for %qs", ! IDENTIFIER_POINTER (class_name)); ! return error_mark_node; } /* Used by: build_private_template, continue_class, and for @defs constructs. */ static tree ! get_class_ivars (tree interface) { ! tree ivar_chain = copy_list (CLASS_RAW_IVARS (interface)); ! /* Both CLASS_RAW_IVARS and CLASS_IVARS contain a list of ivars declared ! by the current class (i.e., they do not include super-class ivars). ! However, the CLASS_IVARS list will be side-effected by a call to ! finish_struct(), which will fill in field offsets. */ ! if (!CLASS_IVARS (interface)) ! CLASS_IVARS (interface) = ivar_chain; ! while (CLASS_SUPER_NAME (interface)) { ! /* Prepend super-class ivars. */ ! interface = lookup_interface (CLASS_SUPER_NAME (interface)); ! ivar_chain = chainon (copy_list (CLASS_RAW_IVARS (interface)), ! ivar_chain); } return ivar_chain; } static tree ! objc_create_temporary_var (tree type) { ! tree decl; ! ! decl = build_decl (VAR_DECL, NULL_TREE, type); ! TREE_USED (decl) = 1; ! DECL_ARTIFICIAL (decl) = 1; ! DECL_IGNORED_P (decl) = 1; ! DECL_CONTEXT (decl) = current_function_decl; ! return decl; } + + /* Exception handling constructs. We begin by having the parser do most + of the work and passing us blocks. What we do next depends on whether + we're doing "native" exception handling or legacy Darwin setjmp exceptions. + We abstract all of this in a handful of appropriately named routines. */ ! /* Stack of open try blocks. */ ! ! struct objc_try_context { ! struct objc_try_context *outer; ! /* Statements (or statement lists) as processed by the parser. */ ! tree try_body; ! tree finally_body; ! /* Some file position locations. */ ! location_t try_locus; ! location_t end_try_locus; ! location_t end_catch_locus; ! location_t finally_locus; ! location_t end_finally_locus; ! /* A STATEMENT_LIST of CATCH_EXPRs, appropriate for sticking into op1 ! of a TRY_CATCH_EXPR. Even when doing Darwin setjmp. */ ! tree catch_list; ! /* The CATCH_EXPR of an open @catch clause. */ ! tree current_catch; ! /* The VAR_DECL holding the Darwin equivalent of EXC_PTR_EXPR. */ ! tree caught_decl; ! tree stack_decl; ! tree rethrow_decl; ! }; ! static struct objc_try_context *cur_try_context; ! ! /* This hook, called via lang_eh_runtime_type, generates a runtime object ! that represents TYPE. For Objective-C, this is just the class name. */ ! /* ??? Isn't there a class object or some such? Is it easy to get? */ ! ! #ifndef OBJCPLUS ! static tree ! objc_eh_runtime_type (tree type) { ! return add_objc_string (OBJC_TYPE_NAME (TREE_TYPE (type)), class_names); ! } ! #endif ! /* Initialize exception handling. */ ! static void ! objc_init_exceptions (void) ! { ! static bool done = false; ! if (done) ! return; ! done = true; ! if (flag_objc_sjlj_exceptions) { ! /* On Darwin, ObjC exceptions require a sufficiently recent ! version of the runtime, so the user must ask for them explicitly. */ ! if (!flag_objc_exceptions) ! warning ("use %<-fobjc-exceptions%> to enable Objective-C " ! "exception syntax"); } ! #ifndef OBJCPLUS ! else ! { ! c_eh_initialized_p = true; ! eh_personality_libfunc ! = init_one_libfunc (USING_SJLJ_EXCEPTIONS ! ? "__gnu_objc_personality_sj0" ! : "__gnu_objc_personality_v0"); ! using_eh_for_cleanups (); ! lang_eh_runtime_type = objc_eh_runtime_type; ! } ! #endif } ! /* Build an EXC_PTR_EXPR, or the moral equivalent. In the case of Darwin, ! we'll arrange for it to be initialized (and associated with a binding) ! later. */ ! ! static tree ! objc_build_exc_ptr (void) { ! if (flag_objc_sjlj_exceptions) ! { ! tree var = cur_try_context->caught_decl; ! if (!var) ! { ! var = objc_create_temporary_var (objc_object_type); ! cur_try_context->caught_decl = var; ! } ! return var; ! } ! else ! return build (EXC_PTR_EXPR, objc_object_type); } ! /* Build "objc_exception_try_exit(&_stack)". */ ! ! static tree ! next_sjlj_build_try_exit (void) { ! tree t; ! t = build_fold_addr_expr (cur_try_context->stack_decl); ! t = tree_cons (NULL, t, NULL); ! t = build_function_call (objc_exception_try_exit_decl, t); ! return t; } ! /* Build ! objc_exception_try_enter (&_stack); ! if (_setjmp(&_stack.buf)) ! ; ! else ! ; ! Return the COND_EXPR. Note that the THEN and ELSE fields are left ! empty, ready for the caller to fill them in. */ ! ! static tree ! next_sjlj_build_enter_and_setjmp (void) { ! tree t, enter, sj, cond; ! t = build_fold_addr_expr (cur_try_context->stack_decl); ! t = tree_cons (NULL, t, NULL); ! enter = build_function_call (objc_exception_try_enter_decl, t); ! t = build_component_ref (cur_try_context->stack_decl, ! get_identifier ("buf")); ! t = build_fold_addr_expr (t); ! t = convert (ptr_type_node, t); ! t = tree_cons (NULL, t, NULL); ! sj = build_function_call (objc_setjmp_decl, t); ! cond = build (COMPOUND_EXPR, TREE_TYPE (sj), enter, sj); ! cond = lang_hooks.truthvalue_conversion (cond); ! return build (COND_EXPR, void_type_node, cond, NULL, NULL); } + /* Build + DECL = objc_exception_extract(&_stack); + */ + static tree ! next_sjlj_build_exc_extract (tree decl) { ! tree t; ! t = build_fold_addr_expr (cur_try_context->stack_decl); ! t = tree_cons (NULL, t, NULL); ! t = build_function_call (objc_exception_extract_decl, t); ! t = convert (TREE_TYPE (decl), t); ! t = build (MODIFY_EXPR, void_type_node, decl, t); ! return t; } ! /* Build ! if (objc_exception_match(obj_get_class(TYPE), _caught) ! BODY ! else if (...) ! ... ! else ! { ! _rethrow = _caught; ! objc_exception_try_exit(&_stack); ! } ! from the sequence of CATCH_EXPRs in the current try context. */ ! static tree ! next_sjlj_build_catch_list (void) { ! tree_stmt_iterator i = tsi_start (cur_try_context->catch_list); ! tree catch_seq, t; ! tree *last = &catch_seq; ! bool saw_id = false; ! for (; !tsi_end_p (i); tsi_next (&i)) ! { ! tree stmt = tsi_stmt (i); ! tree type = CATCH_TYPES (stmt); ! tree body = CATCH_BODY (stmt); ! if (type == NULL) ! { ! *last = body; ! saw_id = true; ! break; ! } ! else ! { ! tree args, cond; ! if (type == error_mark_node) ! cond = error_mark_node; ! else ! { ! args = tree_cons (NULL, cur_try_context->caught_decl, NULL); ! t = objc_get_class_reference (OBJC_TYPE_NAME (TREE_TYPE (type))); ! args = tree_cons (NULL, t, args); ! t = build_function_call (objc_exception_match_decl, args); ! cond = lang_hooks.truthvalue_conversion (t); ! } ! t = build (COND_EXPR, void_type_node, cond, body, NULL); ! SET_EXPR_LOCUS (t, EXPR_LOCUS (stmt)); ! *last = t; ! last = &COND_EXPR_ELSE (t); ! } ! } ! if (!saw_id) ! { ! t = build (MODIFY_EXPR, void_type_node, cur_try_context->rethrow_decl, ! cur_try_context->caught_decl); ! SET_EXPR_LOCATION (t, cur_try_context->end_catch_locus); ! append_to_statement_list (t, last); ! t = next_sjlj_build_try_exit (); ! SET_EXPR_LOCATION (t, cur_try_context->end_catch_locus); ! append_to_statement_list (t, last); ! } ! return catch_seq; } ! /* Build a complete @try-@catch-@finally block for legacy Darwin setjmp ! exception handling. We aim to build: ! { ! struct _objc_exception_data _stack; ! id volatile _rethrow = 0; ! try ! { ! objc_exception_try_enter (&_stack); ! if (_setjmp(&_stack.buf)) ! { ! id _caught = objc_exception_extract(&_stack); ! objc_exception_try_enter (&_stack); ! if (_setjmp(&_stack.buf)) ! _rethrow = objc_exception_extract(&_stack); ! else ! CATCH-LIST ! } ! else ! TRY-BLOCK ! } ! finally ! { ! if (!_rethrow) ! objc_exception_try_exit(&_stack); ! FINALLY-BLOCK ! if (_rethrow) ! objc_exception_throw(_rethrow); ! } ! } ! If CATCH-LIST is empty, we can omit all of the block containing ! "_caught" except for the setting of _rethrow. Note the use of ! a real TRY_FINALLY_EXPR here, which is not involved in EH per-se, ! but handles goto and other exits from the block. */ ! static tree ! next_sjlj_build_try_catch_finally (void) { ! tree rethrow_decl, stack_decl, t; ! tree catch_seq, try_fin, bind; ! /* Create the declarations involved. */ ! t = xref_tag (RECORD_TYPE, get_identifier (UTAG_EXCDATA)); ! stack_decl = objc_create_temporary_var (t); ! cur_try_context->stack_decl = stack_decl; ! rethrow_decl = objc_create_temporary_var (objc_object_type); ! cur_try_context->rethrow_decl = rethrow_decl; ! TREE_THIS_VOLATILE (rethrow_decl) = 1; ! TREE_CHAIN (rethrow_decl) = stack_decl; ! /* Build the outermost variable binding level. */ ! bind = build (BIND_EXPR, void_type_node, rethrow_decl, NULL, NULL); ! SET_EXPR_LOCATION (bind, cur_try_context->try_locus); ! TREE_SIDE_EFFECTS (bind) = 1; ! /* Initialize rethrow_decl. */ ! t = build (MODIFY_EXPR, void_type_node, rethrow_decl, ! convert (objc_object_type, null_pointer_node)); ! SET_EXPR_LOCATION (t, cur_try_context->try_locus); ! append_to_statement_list (t, &BIND_EXPR_BODY (bind)); ! /* Build the outermost TRY_FINALLY_EXPR. */ ! try_fin = build (TRY_FINALLY_EXPR, void_type_node, NULL, NULL); ! SET_EXPR_LOCATION (try_fin, cur_try_context->try_locus); ! TREE_SIDE_EFFECTS (try_fin) = 1; ! append_to_statement_list (try_fin, &BIND_EXPR_BODY (bind)); ! /* Create the complete catch sequence. */ ! if (cur_try_context->catch_list) { ! tree caught_decl = objc_build_exc_ptr (); ! catch_seq = build_stmt (BIND_EXPR, caught_decl, NULL, NULL); ! ! t = next_sjlj_build_exc_extract (caught_decl); ! append_to_statement_list (t, &BIND_EXPR_BODY (catch_seq)); ! ! t = next_sjlj_build_enter_and_setjmp (); ! COND_EXPR_THEN (t) = next_sjlj_build_exc_extract (rethrow_decl); ! COND_EXPR_ELSE (t) = next_sjlj_build_catch_list (); ! append_to_statement_list (t, &BIND_EXPR_BODY (catch_seq)); } + else + catch_seq = next_sjlj_build_exc_extract (rethrow_decl); + SET_EXPR_LOCATION (catch_seq, cur_try_context->end_try_locus); ! /* Build the main register-and-try if statement. */ ! t = next_sjlj_build_enter_and_setjmp (); ! SET_EXPR_LOCATION (t, cur_try_context->try_locus); ! COND_EXPR_THEN (t) = catch_seq; ! COND_EXPR_ELSE (t) = cur_try_context->try_body; ! TREE_OPERAND (try_fin, 0) = t; ! /* Build the complete FINALLY statement list. */ ! t = next_sjlj_build_try_exit (); ! t = build_stmt (COND_EXPR, ! lang_hooks.truthvalue_conversion (rethrow_decl), ! NULL, t); ! SET_EXPR_LOCATION (t, cur_try_context->finally_locus); ! append_to_statement_list (t, &TREE_OPERAND (try_fin, 1)); ! append_to_statement_list (cur_try_context->finally_body, ! &TREE_OPERAND (try_fin, 1)); ! t = tree_cons (NULL, rethrow_decl, NULL); ! t = build_function_call (objc_exception_throw_decl, t); ! t = build_stmt (COND_EXPR, ! lang_hooks.truthvalue_conversion (rethrow_decl), ! t, NULL); ! SET_EXPR_LOCATION (t, cur_try_context->end_finally_locus); ! append_to_statement_list (t, &TREE_OPERAND (try_fin, 1)); ! return bind; } + /* Called just after parsing the @try and its associated BODY. We now + must prepare for the tricky bits -- handling the catches and finally. */ + void ! objc_begin_try_stmt (location_t try_locus, tree body) { ! struct objc_try_context *c = xcalloc (1, sizeof (*c)); ! c->outer = cur_try_context; ! c->try_body = body; ! c->try_locus = try_locus; ! c->end_try_locus = input_location; ! cur_try_context = c; ! objc_init_exceptions (); } ! /* Called just after parsing "@catch (parm)". Open a binding level, ! enter DECL into the binding level, and initialize it. Leave the ! binding level open while the body of the compound statement is parsed. */ ! ! void ! objc_begin_catch_clause (tree decl) { ! tree compound, type, t; ! /* Begin a new scope that the entire catch clause will live in. */ ! compound = c_begin_compound_stmt (true); ! /* The parser passed in a PARM_DECL, but what we really want is a VAR_DECL. */ ! decl = build_decl (VAR_DECL, DECL_NAME (decl), TREE_TYPE (decl)); ! lang_hooks.decls.pushdecl (decl); ! /* Since a decl is required here by syntax, don't warn if its unused. */ ! /* ??? As opposed to __attribute__((unused))? Anyway, this appears to ! be what the previous objc implementation did. */ ! TREE_USED (decl) = 1; ! /* Verify that the type of the catch is valid. It must be a pointer ! to an Objective-C class, or "id" (which is catch-all). */ ! type = TREE_TYPE (decl); ! if (POINTER_TYPE_P (type) && objc_is_object_id (TREE_TYPE (type))) ! type = NULL; ! else if (!POINTER_TYPE_P (type) || !TYPED_OBJECT (TREE_TYPE (type))) ! { ! error ("@catch parameter is not a known Objective-C class type"); ! type = error_mark_node; ! } ! else if (cur_try_context->catch_list) ! { ! /* Examine previous @catch clauses and see if we've already ! caught the type in question. */ ! tree_stmt_iterator i = tsi_start (cur_try_context->catch_list); ! for (; !tsi_end_p (i); tsi_next (&i)) ! { ! tree stmt = tsi_stmt (i); ! t = CATCH_TYPES (stmt); ! if (t == error_mark_node) ! continue; ! if (!t || objc_comptypes (TREE_TYPE (t), TREE_TYPE (type), 0) == 1) ! { ! warning ("exception of type %<%T%> will be caught", ! TREE_TYPE (type)); ! warning ("%H by earlier handler for %<%T%>", ! EXPR_LOCUS (stmt), TREE_TYPE (t ? t : objc_object_type)); ! break; ! } } ! } ! /* Record the data for the catch in the try context so that we can ! finalize it later. */ ! t = build_stmt (CATCH_EXPR, type, compound); ! cur_try_context->current_catch = t; ! /* Initialize the decl from the EXC_PTR_EXPR we get from the runtime. */ ! t = objc_build_exc_ptr (); ! t = convert (TREE_TYPE (decl), t); ! t = build (MODIFY_EXPR, void_type_node, decl, t); ! add_stmt (t); ! } ! /* Called just after parsing the closing brace of a @catch clause. Close ! the open binding level, and record a CATCH_EXPR for it. */ ! void ! objc_finish_catch_clause (void) ! { ! tree c = cur_try_context->current_catch; ! cur_try_context->current_catch = NULL; ! cur_try_context->end_catch_locus = input_location; ! ! CATCH_BODY (c) = c_end_compound_stmt (CATCH_BODY (c), 1); ! append_to_statement_list (c, &cur_try_context->catch_list); } ! /* Called after parsing a @finally clause and its associated BODY. ! Record the body for later placement. */ ! ! void ! objc_build_finally_clause (location_t finally_locus, tree body) { ! cur_try_context->finally_body = body; ! cur_try_context->finally_locus = finally_locus; ! cur_try_context->end_finally_locus = input_location; ! } ! /* Called to finalize a @try construct. */ ! void ! objc_finish_try_stmt (void) ! { ! struct objc_try_context *c = cur_try_context; ! tree stmt; ! if (c->catch_list == NULL && c->finally_body == NULL) ! error ("%<@try%> without %<@catch%> or %<@finally%>"); ! /* If we're doing Darwin setjmp exceptions, build the big nasty. */ ! if (flag_objc_sjlj_exceptions) ! { ! if (!cur_try_context->finally_body) ! { ! cur_try_context->finally_locus = input_location; ! cur_try_context->end_finally_locus = input_location; ! } ! stmt = next_sjlj_build_try_catch_finally (); ! } ! else ! { ! /* Otherwise, nest the CATCH inside a FINALLY. */ ! stmt = c->try_body; ! if (c->catch_list) ! { ! stmt = build_stmt (TRY_CATCH_EXPR, stmt, c->catch_list); ! SET_EXPR_LOCATION (stmt, cur_try_context->try_locus); ! } ! if (c->finally_body) ! { ! stmt = build_stmt (TRY_FINALLY_EXPR, stmt, c->finally_body); ! SET_EXPR_LOCATION (stmt, cur_try_context->try_locus); ! } ! } ! add_stmt (stmt); ! cur_try_context = c->outer; ! free (c); } ! tree ! objc_build_throw_stmt (tree throw_expr) { ! tree args; ! objc_init_exceptions (); ! if (throw_expr == NULL) ! { ! /* If we're not inside a @catch block, there is no "current ! exception" to be rethrown. */ ! if (cur_try_context == NULL ! || cur_try_context->current_catch == NULL) ! { ! error ("%<@throw%> (rethrow) used outside of a @catch block"); ! return NULL_TREE; ! } ! /* Otherwise the object is still sitting in the EXC_PTR_EXPR ! value that we get from the runtime. */ ! throw_expr = objc_build_exc_ptr (); ! } ! /* A throw is just a call to the runtime throw function with the ! object as a parameter. */ ! args = tree_cons (NULL, throw_expr, NULL); ! return add_stmt (build_function_call (objc_exception_throw_decl, args)); } ! void ! objc_build_synchronized (location_t start_locus, tree mutex, tree body) { ! tree args, call; ! /* First lock the mutex. */ ! mutex = save_expr (mutex); ! args = tree_cons (NULL, mutex, NULL); ! call = build_function_call (objc_sync_enter_decl, args); ! SET_EXPR_LOCATION (call, start_locus); ! add_stmt (call); ! /* Build the mutex unlock. */ ! args = tree_cons (NULL, mutex, NULL); ! call = build_function_call (objc_sync_exit_decl, args); ! SET_EXPR_LOCATION (call, input_location); ! /* Put the that and the body in a TRY_FINALLY. */ ! objc_begin_try_stmt (start_locus, body); ! objc_build_finally_clause (input_location, call); ! objc_finish_try_stmt (); } + /* Predefine the following data type: struct _objc_exception_data *************** objc_build_synchronized_epilogue (void) *** 3303,3342 **** #endif static void ! build_objc_exception_stuff (void) { tree field_decl, field_decl_chain, index, temp_type; - /* Suppress outputting debug symbols, because - dbxout_init hasn't been called yet. */ - enum debug_info_type save_write_symbols = write_symbols; - const struct gcc_debug_hooks *save_hooks = debug_hooks; - - write_symbols = NO_DEBUG; - debug_hooks = &do_nothing_debug_hooks; objc_exception_data_template = start_struct (RECORD_TYPE, get_identifier (UTAG_EXCDATA)); /* int buf[_JBLEN]; */ ! index = build_index_type (build_int_2 (_JBLEN - 1, 0)); ! field_decl = create_builtin_decl (FIELD_DECL, ! build_array_type (integer_type_node, index), ! "buf"); field_decl_chain = field_decl; /* void *pointers[4]; */ ! index = build_index_type (build_int_2 (4 - 1, 0)); ! field_decl = create_builtin_decl (FIELD_DECL, ! build_array_type (ptr_type_node, index), ! "pointers"); chainon (field_decl_chain, field_decl); finish_struct (objc_exception_data_template, field_decl_chain, NULL_TREE); /* int _setjmp(...); */ ! /* If the user includes , this shall be superceded by 'int _setjmp(jmp_buf);' */ temp_type = build_function_type (integer_type_node, NULL_TREE); objc_setjmp_decl --- 3449,3479 ---- #endif static void ! build_next_objc_exception_stuff (void) { tree field_decl, field_decl_chain, index, temp_type; objc_exception_data_template = start_struct (RECORD_TYPE, get_identifier (UTAG_EXCDATA)); /* int buf[_JBLEN]; */ ! index = build_index_type (build_int_cst (NULL_TREE, _JBLEN - 1)); ! field_decl = create_field_decl (build_array_type (integer_type_node, index), ! "buf"); field_decl_chain = field_decl; /* void *pointers[4]; */ ! index = build_index_type (build_int_cst (NULL_TREE, 4 - 1)); ! field_decl = create_field_decl (build_array_type (ptr_type_node, index), ! "pointers"); chainon (field_decl_chain, field_decl); finish_struct (objc_exception_data_template, field_decl_chain, NULL_TREE); /* int _setjmp(...); */ ! /* If the user includes , this shall be superseded by 'int _setjmp(jmp_buf);' */ temp_type = build_function_type (integer_type_node, NULL_TREE); objc_setjmp_decl *************** build_objc_exception_stuff (void) *** 3344,3350 **** /* id objc_exception_extract(struct _objc_exception_data *); */ temp_type ! = build_function_type (id_type, tree_cons (NULL_TREE, build_pointer_type (objc_exception_data_template), OBJC_VOID_AT_END)); --- 3481,3487 ---- /* id objc_exception_extract(struct _objc_exception_data *); */ temp_type ! = build_function_type (objc_object_type, tree_cons (NULL_TREE, build_pointer_type (objc_exception_data_template), OBJC_VOID_AT_END)); *************** build_objc_exception_stuff (void) *** 3361,3494 **** = builtin_function (TAG_EXCEPTIONTRYENTER, temp_type, 0, NOT_BUILT_IN, NULL, NULL_TREE); objc_exception_try_exit_decl = builtin_function (TAG_EXCEPTIONTRYEXIT, temp_type, 0, NOT_BUILT_IN, NULL, NULL_TREE); /* void objc_exception_throw(id) __attribute__((noreturn)); */ /* void objc_sync_enter(id); */ /* void objc_sync_exit(id); */ temp_type = build_function_type (void_type_node, ! tree_cons (NULL_TREE, id_type, OBJC_VOID_AT_END)); objc_exception_throw_decl ! = builtin_function (TAG_EXCEPTIONTHROW, temp_type, 0, NOT_BUILT_IN, NULL, NULL_TREE); ! DECL_ATTRIBUTES (objc_exception_throw_decl) ! = tree_cons (get_identifier ("noreturn"), NULL_TREE, NULL_TREE); objc_sync_enter_decl ! = builtin_function (TAG_SYNCENTER, temp_type, 0, NOT_BUILT_IN, NULL, NULL_TREE); objc_sync_exit_decl ! = builtin_function (TAG_SYNCEXIT, temp_type, 0, NOT_BUILT_IN, NULL, NULL_TREE); ! /* int objc_exception_match(id, id); */ ! temp_type = build_function_type (integer_type_node, ! tree_cons (NULL_TREE, id_type, ! tree_cons (NULL_TREE, id_type, ! OBJC_VOID_AT_END))); ! objc_exception_match_decl ! = builtin_function (TAG_EXCEPTIONMATCH, temp_type, 0, NOT_BUILT_IN, NULL, NULL_TREE); ! ! write_symbols = save_write_symbols; ! debug_hooks = save_hooks; } ! /* struct { ! struct objc_class *isa; ... }; */ ! static tree build_private_template (tree class) { ! tree ivar_context; ! ! if (CLASS_STATIC_TEMPLATE (class)) ! { ! uprivate_record = CLASS_STATIC_TEMPLATE (class); ! ivar_context = TYPE_FIELDS (CLASS_STATIC_TEMPLATE (class)); ! } ! else { ! uprivate_record = start_struct (RECORD_TYPE, CLASS_NAME (class)); ! ivar_context = get_class_ivars (class, 0); ! ! finish_struct (uprivate_record, ivar_context, NULL_TREE); ! ! CLASS_STATIC_TEMPLATE (class) = uprivate_record; /* mark this record as class template - for class type checking */ ! TREE_STATIC_TEMPLATE (uprivate_record) = 1; } - - instance_type - = groktypename (build_tree_list (build_tree_list (NULL_TREE, - uprivate_record), - build1 (INDIRECT_REF, NULL_TREE, - NULL_TREE))); - - return ivar_context; } /* Begin code generation for protocols... */ ! /* struct objc_protocol { char *protocol_name; ! struct objc_protocol **protocol_list; ! struct objc_method_desc *instance_methods; ! struct objc_method_desc *class_methods; }; */ ! static tree build_protocol_template (void) { ! tree decl_specs, field_decl, field_decl_chain; ! tree template; ! ! template = start_struct (RECORD_TYPE, get_identifier (UTAG_PROTOCOL)); ! /* struct objc_class *isa; */ ! decl_specs = build_tree_list (NULL_TREE, xref_tag (RECORD_TYPE, ! get_identifier (UTAG_CLASS))); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("isa")); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); field_decl_chain = field_decl; /* char *protocol_name; */ ! ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_CHAR]); ! field_decl ! = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("protocol_name")); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); ! /* struct objc_protocol **protocol_list; */ ! ! decl_specs = build_tree_list (NULL_TREE, template); ! field_decl ! = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("protocol_list")); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, field_decl); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); /* struct objc_method_list *instance_methods; */ ! ! decl_specs ! = build_tree_list (NULL_TREE, ! xref_tag (RECORD_TYPE, ! get_identifier (UTAG_METHOD_PROTOTYPE_LIST))); ! field_decl ! = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("instance_methods")); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); /* struct objc_method_list *class_methods; */ ! ! decl_specs ! = build_tree_list (NULL_TREE, ! xref_tag (RECORD_TYPE, ! get_identifier (UTAG_METHOD_PROTOTYPE_LIST))); ! field_decl ! = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("class_methods")); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); ! return finish_struct (template, field_decl_chain, NULL_TREE); } static tree --- 3498,3615 ---- = builtin_function (TAG_EXCEPTIONTRYENTER, temp_type, 0, NOT_BUILT_IN, NULL, NULL_TREE); objc_exception_try_exit_decl = builtin_function (TAG_EXCEPTIONTRYEXIT, temp_type, 0, NOT_BUILT_IN, NULL, NULL_TREE); + + /* int objc_exception_match(id, id); */ + temp_type + = build_function_type (integer_type_node, + tree_cons (NULL_TREE, objc_object_type, + tree_cons (NULL_TREE, objc_object_type, + OBJC_VOID_AT_END))); + objc_exception_match_decl + = builtin_function (TAG_EXCEPTIONMATCH, temp_type, 0, NOT_BUILT_IN, NULL, NULL_TREE); + } + + static void + build_objc_exception_stuff (void) + { + tree noreturn_list, nothrow_list, temp_type; + + noreturn_list = tree_cons (get_identifier ("noreturn"), NULL, NULL); + nothrow_list = tree_cons (get_identifier ("nothrow"), NULL, NULL); + /* void objc_exception_throw(id) __attribute__((noreturn)); */ /* void objc_sync_enter(id); */ /* void objc_sync_exit(id); */ temp_type = build_function_type (void_type_node, ! tree_cons (NULL_TREE, objc_object_type, OBJC_VOID_AT_END)); objc_exception_throw_decl ! = builtin_function (TAG_EXCEPTIONTHROW, temp_type, 0, NOT_BUILT_IN, NULL, ! noreturn_list); objc_sync_enter_decl ! = builtin_function (TAG_SYNCENTER, temp_type, 0, NOT_BUILT_IN, ! NULL, nothrow_list); objc_sync_exit_decl ! = builtin_function (TAG_SYNCEXIT, temp_type, 0, NOT_BUILT_IN, ! NULL, nothrow_list); } ! /* Construct a C struct corresponding to ObjC class CLASS, with the same ! name as the class: ! ! struct { ! struct _objc_class *isa; ... }; */ ! static void build_private_template (tree class) { ! if (!CLASS_STATIC_TEMPLATE (class)) { ! tree record = start_struct (RECORD_TYPE, CLASS_NAME (class)); + finish_struct (record, get_class_ivars (class), NULL_TREE); /* mark this record as class template - for class type checking */ ! INIT_TYPE_OBJC_INFO (record); ! TYPE_OBJC_INTERFACE (record) = class; ! CLASS_STATIC_TEMPLATE (class) = record; } } /* Begin code generation for protocols... */ ! /* struct _objc_protocol { ! struct _objc_class *isa; char *protocol_name; ! struct _objc_protocol **protocol_list; ! struct _objc__method_prototype_list *instance_methods; ! struct _objc__method_prototype_list *class_methods; }; */ ! static void build_protocol_template (void) { ! tree field_decl, field_decl_chain; ! objc_protocol_template = start_struct (RECORD_TYPE, ! get_identifier (UTAG_PROTOCOL)); ! /* struct _objc_class *isa; */ ! field_decl = create_field_decl (build_pointer_type ! (xref_tag (RECORD_TYPE, ! get_identifier (UTAG_CLASS))), ! "isa"); field_decl_chain = field_decl; /* char *protocol_name; */ ! field_decl = create_field_decl (string_type_node, "protocol_name"); chainon (field_decl_chain, field_decl); ! /* struct _objc_protocol **protocol_list; */ ! field_decl = create_field_decl (build_pointer_type ! (build_pointer_type ! (objc_protocol_template)), ! "protocol_list"); chainon (field_decl_chain, field_decl); /* struct objc_method_list *instance_methods; */ ! field_decl = create_field_decl (build_pointer_type ! (xref_tag (RECORD_TYPE, ! get_identifier ! (UTAG_METHOD_PROTOTYPE_LIST))), ! "instance_methods"); chainon (field_decl_chain, field_decl); /* struct objc_method_list *class_methods; */ ! field_decl = create_field_decl (build_pointer_type ! (xref_tag (RECORD_TYPE, ! get_identifier ! (UTAG_METHOD_PROTOTYPE_LIST))), ! "class_methods"); chainon (field_decl_chain, field_decl); ! finish_struct (objc_protocol_template, field_decl_chain, NULL_TREE); } static tree *************** static tree *** 3534,3558 **** build_method_prototype_list_template (tree list_type, int size) { tree objc_ivar_list_record; ! tree decl_specs, field_decl, field_decl_chain; /* Generate an unnamed struct definition. */ objc_ivar_list_record = start_struct (RECORD_TYPE, NULL_TREE); /* int method_count; */ ! ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_INT]); ! field_decl = get_identifier ("method_count"); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); field_decl_chain = field_decl; /* struct objc_method method_list[]; */ ! ! decl_specs = build_tree_list (NULL_TREE, list_type); ! field_decl = build_nt (ARRAY_REF, get_identifier ("method_list"), ! build_int_2 (size, 0)); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); finish_struct (objc_ivar_list_record, field_decl_chain, NULL_TREE); --- 3655,3676 ---- build_method_prototype_list_template (tree list_type, int size) { tree objc_ivar_list_record; ! tree field_decl, field_decl_chain; /* Generate an unnamed struct definition. */ objc_ivar_list_record = start_struct (RECORD_TYPE, NULL_TREE); /* int method_count; */ ! field_decl = create_field_decl (integer_type_node, "method_count"); field_decl_chain = field_decl; /* struct objc_method method_list[]; */ ! field_decl = create_field_decl (build_array_type ! (list_type, ! build_index_type ! (build_int_cst (NULL_TREE, size - 1))), ! "method_list"); chainon (field_decl_chain, field_decl); finish_struct (objc_ivar_list_record, field_decl_chain, NULL_TREE); *************** static tree *** 3564,3585 **** build_method_prototype_template (void) { tree proto_record; ! tree decl_specs, field_decl, field_decl_chain; proto_record = start_struct (RECORD_TYPE, get_identifier (UTAG_METHOD_PROTOTYPE)); ! /* struct objc_selector *_cmd; */ ! decl_specs = tree_cons (NULL_TREE, xref_tag (RECORD_TYPE, ! get_identifier (TAG_SELECTOR)), NULL_TREE); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("_cmd")); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); field_decl_chain = field_decl; ! decl_specs = tree_cons (NULL_TREE, ridpointers[(int) RID_CHAR], NULL_TREE); ! field_decl ! = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("method_types")); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); finish_struct (proto_record, field_decl_chain, NULL_TREE); --- 3682,3698 ---- build_method_prototype_template (void) { tree proto_record; ! tree field_decl, field_decl_chain; proto_record = start_struct (RECORD_TYPE, get_identifier (UTAG_METHOD_PROTOTYPE)); ! /* SEL _cmd; */ ! field_decl = create_field_decl (objc_selector_type, "_cmd"); field_decl_chain = field_decl; ! /* char *method_types; */ ! field_decl = create_field_decl (string_type_node, "method_types"); chainon (field_decl_chain, field_decl); finish_struct (proto_record, field_decl_chain, NULL_TREE); *************** build_method_prototype_template (void) *** 3590,3596 **** static tree objc_method_parm_type (tree type) { ! type = groktypename (TREE_TYPE (type)); if (TREE_CODE (type) == TYPE_DECL) type = TREE_TYPE (type); return TYPE_MAIN_VARIANT (type); --- 3703,3709 ---- static tree objc_method_parm_type (tree type) { ! type = TREE_VALUE (TREE_TYPE (type)); if (TREE_CODE (type) == TYPE_DECL) type = TREE_TYPE (type); return TYPE_MAIN_VARIANT (type); *************** objc_encoded_type_size (tree type) *** 3603,3611 **** /* Make all integer and enum types at least as large as an int. */ ! if (sz > 0 && (TREE_CODE (type) == INTEGER_TYPE ! || TREE_CODE (type) == BOOLEAN_TYPE ! || TREE_CODE (type) == ENUMERAL_TYPE)) sz = MAX (sz, int_size_in_bytes (integer_type_node)); /* Treat arrays as pointers, since that's how they're passed in. */ --- 3716,3722 ---- /* Make all integer and enum types at least as large as an int. */ ! if (sz > 0 && INTEGRAL_TYPE_P (type)) sz = MAX (sz, int_size_in_bytes (integer_type_node)); /* Treat arrays as pointers, since that's how they're passed in. */ *************** static tree *** 3688,3707 **** generate_descriptor_table (tree type, const char *name, int size, tree list, tree proto) { ! tree sc_spec, decl_specs, decl, initlist; ! ! sc_spec = tree_cons (NULL_TREE, ridpointers[(int) RID_STATIC], NULL_TREE); ! decl_specs = tree_cons (NULL_TREE, type, sc_spec); ! decl = start_decl (synth_id_with_class_suffix (name, proto), ! decl_specs, 1, NULL_TREE); ! DECL_CONTEXT (decl) = NULL_TREE; ! initlist = build_tree_list (NULL_TREE, build_int_2 (size, 0)); initlist = tree_cons (NULL_TREE, list, initlist); ! finish_decl (decl, objc_build_constructor (type, nreverse (initlist)), ! NULL_TREE); return decl; } --- 3799,3812 ---- generate_descriptor_table (tree type, const char *name, int size, tree list, tree proto) { ! tree decl, initlist; ! decl = start_var_decl (type, synth_id_with_class_suffix (name, proto)); ! initlist = build_tree_list (NULL_TREE, build_int_cst (NULL_TREE, size)); initlist = tree_cons (NULL_TREE, list, initlist); ! finish_var_decl (decl, objc_build_constructor (type, nreverse (initlist))); return decl; } *************** static void *** 3710,3726 **** generate_method_descriptors (tree protocol) { tree initlist, chain, method_list_template; - tree cast, variable_length_type; int size; if (!objc_method_prototype_template) objc_method_prototype_template = build_method_prototype_template (); - cast = build_tree_list (build_tree_list (NULL_TREE, xref_tag (RECORD_TYPE, - get_identifier (UTAG_METHOD_PROTOTYPE_LIST))), - NULL_TREE); - variable_length_type = groktypename (cast); - chain = PROTOCOL_CLS_METHODS (protocol); if (chain) { --- 3815,3825 ---- *************** generate_method_descriptors (tree protoc *** 3738,3744 **** = generate_descriptor_table (method_list_template, "_OBJC_PROTOCOL_CLASS_METHODS", size, initlist, protocol); - TREE_TYPE (UOBJC_CLASS_METHODS_decl) = variable_length_type; } else UOBJC_CLASS_METHODS_decl = 0; --- 3837,3842 ---- *************** generate_method_descriptors (tree protoc *** 3759,3765 **** = generate_descriptor_table (method_list_template, "_OBJC_PROTOCOL_INSTANCE_METHODS", size, initlist, protocol); - TREE_TYPE (UOBJC_INSTANCE_METHODS_decl) = variable_length_type; } else UOBJC_INSTANCE_METHODS_decl = 0; --- 3857,3862 ---- *************** generate_protocol_references (tree plist *** 3822,3840 **** objects). Because, as explained above, the compiler generates as few Protocol objects as possible, some Protocol object might end up being referenced multiple times when compiled with the GNU runtime, ! and end up being fixed up multiple times at runtime inizialization. But that doesn't hurt, it's just a little inefficient. */ static void generate_protocols (void) { tree p, encoding; ! tree sc_spec, decl_specs, decl; tree initlist, protocol_name_expr, refs_decl, refs_expr; - tree cast_type2; - - if (! objc_protocol_template) - objc_protocol_template = build_protocol_template (); /* If a protocol was directly referenced, pull in indirect references. */ for (p = protocol_chain; p; p = TREE_CHAIN (p)) --- 3919,3933 ---- objects). Because, as explained above, the compiler generates as few Protocol objects as possible, some Protocol object might end up being referenced multiple times when compiled with the GNU runtime, ! and end up being fixed up multiple times at runtime initialization. But that doesn't hurt, it's just a little inefficient. */ static void generate_protocols (void) { tree p, encoding; ! tree decl; tree initlist, protocol_name_expr, refs_decl, refs_expr; /* If a protocol was directly referenced, pull in indirect references. */ for (p = protocol_chain; p; p = TREE_CHAIN (p)) *************** generate_protocols (void) *** 3847,3853 **** tree cls_methods = PROTOCOL_CLS_METHODS (p); /* If protocol wasn't referenced, don't generate any code. */ ! if (! PROTOCOL_FORWARD_DECL (p)) continue; /* Make sure we link in the Protocol class. */ --- 3940,3948 ---- tree cls_methods = PROTOCOL_CLS_METHODS (p); /* If protocol wasn't referenced, don't generate any code. */ ! decl = PROTOCOL_FORWARD_DECL (p); ! ! if (!decl) continue; /* Make sure we link in the Protocol class. */ *************** generate_protocols (void) *** 3881,3913 **** refs_decl = 0; /* static struct objc_protocol _OBJC_PROTOCOL_; */ - - sc_spec = tree_cons (NULL_TREE, ridpointers[(int) RID_STATIC], - NULL_TREE); - decl_specs = tree_cons (NULL_TREE, objc_protocol_template, sc_spec); - - decl = start_decl (synth_id_with_class_suffix ("_OBJC_PROTOCOL", p), - decl_specs, 1, NULL_TREE); - - DECL_CONTEXT (decl) = NULL_TREE; - protocol_name_expr = add_objc_string (PROTOCOL_NAME (p), class_names); if (refs_decl) ! { ! cast_type2 ! = groktypename ! (build_tree_list (build_tree_list (NULL_TREE, ! objc_protocol_template), ! build1 (INDIRECT_REF, NULL_TREE, ! build1 (INDIRECT_REF, NULL_TREE, ! NULL_TREE)))); ! ! refs_expr = build_unary_op (ADDR_EXPR, refs_decl, 0); ! TREE_TYPE (refs_expr) = cast_type2; ! } else ! refs_expr = build_int_2 (0, 0); /* UOBJC_INSTANCE_METHODS_decl/UOBJC_CLASS_METHODS_decl are set by generate_method_descriptors, which is called above. */ --- 3976,3989 ---- refs_decl = 0; /* static struct objc_protocol _OBJC_PROTOCOL_; */ protocol_name_expr = add_objc_string (PROTOCOL_NAME (p), class_names); if (refs_decl) ! refs_expr = convert (build_pointer_type (build_pointer_type ! (objc_protocol_template)), ! build_unary_op (ADDR_EXPR, refs_decl, 0)); else ! refs_expr = build_int_cst (NULL_TREE, 0); /* UOBJC_INSTANCE_METHODS_decl/UOBJC_CLASS_METHODS_decl are set by generate_method_descriptors, which is called above. */ *************** generate_protocols (void) *** 3915,3924 **** protocol_name_expr, refs_expr, UOBJC_INSTANCE_METHODS_decl, UOBJC_CLASS_METHODS_decl); ! finish_decl (decl, initlist, NULL_TREE); ! ! /* Mark the decl as used to avoid "defined but not used" warning. */ ! TREE_USED (decl) = 1; } } --- 3991,3997 ---- protocol_name_expr, refs_expr, UOBJC_INSTANCE_METHODS_decl, UOBJC_CLASS_METHODS_decl); ! finish_var_decl (decl, initlist); } } *************** build_protocol_initializer (tree type, t *** 3928,3953 **** tree class_methods) { tree initlist = NULL_TREE, expr; ! tree cast_type; ! ! cast_type = groktypename ! (build_tree_list ! (build_tree_list (NULL_TREE, ! xref_tag (RECORD_TYPE, ! get_identifier (UTAG_CLASS))), ! build1 (INDIRECT_REF, NULL_TREE, NULL_TREE))); /* Filling the "isa" in with one allows the runtime system to detect that the version change...should remove before final release. */ ! expr = build_int_2 (PROTOCOL_VERSION, 0); ! TREE_TYPE (expr) = cast_type; initlist = tree_cons (NULL_TREE, expr, initlist); initlist = tree_cons (NULL_TREE, protocol_name, initlist); initlist = tree_cons (NULL_TREE, protocol_list, initlist); if (!instance_methods) ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); else { expr = build_unary_op (ADDR_EXPR, instance_methods, 0); --- 4001,4020 ---- tree class_methods) { tree initlist = NULL_TREE, expr; ! tree cast_type = build_pointer_type ! (xref_tag (RECORD_TYPE, ! get_identifier (UTAG_CLASS))); /* Filling the "isa" in with one allows the runtime system to detect that the version change...should remove before final release. */ ! expr = build_int_cst (cast_type, PROTOCOL_VERSION); initlist = tree_cons (NULL_TREE, expr, initlist); initlist = tree_cons (NULL_TREE, protocol_name, initlist); initlist = tree_cons (NULL_TREE, protocol_list, initlist); if (!instance_methods) ! initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist); else { expr = build_unary_op (ADDR_EXPR, instance_methods, 0); *************** build_protocol_initializer (tree type, t *** 3955,3961 **** } if (!class_methods) ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); else { expr = build_unary_op (ADDR_EXPR, class_methods, 0); --- 4022,4028 ---- } if (!class_methods) ! initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist); else { expr = build_unary_op (ADDR_EXPR, class_methods, 0); *************** build_protocol_initializer (tree type, t *** 3965,4036 **** return objc_build_constructor (type, nreverse (initlist)); } ! /* struct objc_category { char *category_name; char *class_name; ! struct objc_method_list *instance_methods; ! struct objc_method_list *class_methods; ! struct objc_protocol_list *protocols; }; */ static void build_category_template (void) { ! tree decl_specs, field_decl, field_decl_chain; objc_category_template = start_struct (RECORD_TYPE, get_identifier (UTAG_CATEGORY)); - /* char *category_name; */ ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_CHAR]); ! field_decl ! = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("category_name")); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); field_decl_chain = field_decl; /* char *class_name; */ ! ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_CHAR]); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("class_name")); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); ! /* struct objc_method_list *instance_methods; */ ! ! decl_specs = build_tree_list (NULL_TREE, ! xref_tag (RECORD_TYPE, ! get_identifier (UTAG_METHOD_LIST))); ! field_decl ! = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("instance_methods")); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); ! /* struct objc_method_list *class_methods; */ ! ! decl_specs = build_tree_list (NULL_TREE, ! xref_tag (RECORD_TYPE, ! get_identifier (UTAG_METHOD_LIST))); ! field_decl ! = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("class_methods")); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); ! /* struct objc_protocol **protocol_list; */ ! ! decl_specs = build_tree_list (NULL_TREE, ! xref_tag (RECORD_TYPE, ! get_identifier (UTAG_PROTOCOL))); ! field_decl ! = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("protocol_list")); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, field_decl); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); finish_struct (objc_category_template, field_decl_chain, NULL_TREE); } ! /* struct objc_selector { ! void *sel_id; char *sel_type; }; */ --- 4032,4089 ---- return objc_build_constructor (type, nreverse (initlist)); } ! /* struct _objc_category { char *category_name; char *class_name; ! struct _objc_method_list *instance_methods; ! struct _objc_method_list *class_methods; ! struct _objc_protocol_list *protocols; }; */ static void build_category_template (void) { ! tree field_decl, field_decl_chain; objc_category_template = start_struct (RECORD_TYPE, get_identifier (UTAG_CATEGORY)); ! /* char *category_name; */ ! field_decl = create_field_decl (string_type_node, "category_name"); field_decl_chain = field_decl; /* char *class_name; */ ! field_decl = create_field_decl (string_type_node, "class_name"); chainon (field_decl_chain, field_decl); ! /* struct _objc_method_list *instance_methods; */ ! field_decl = create_field_decl (build_pointer_type ! (xref_tag (RECORD_TYPE, ! get_identifier ! (UTAG_METHOD_LIST))), ! "instance_methods"); chainon (field_decl_chain, field_decl); ! /* struct _objc_method_list *class_methods; */ ! field_decl = create_field_decl (build_pointer_type ! (xref_tag (RECORD_TYPE, ! get_identifier ! (UTAG_METHOD_LIST))), ! "class_methods"); chainon (field_decl_chain, field_decl); ! /* struct _objc_protocol **protocol_list; */ ! field_decl = create_field_decl (build_pointer_type ! (build_pointer_type ! (objc_protocol_template)), ! "protocol_list"); chainon (field_decl_chain, field_decl); finish_struct (objc_category_template, field_decl_chain, NULL_TREE); } ! /* struct _objc_selector { ! SEL sel_id; char *sel_type; }; */ *************** static void *** 4038,4084 **** build_selector_template (void) { ! tree decl_specs, field_decl, field_decl_chain; objc_selector_template = start_struct (RECORD_TYPE, get_identifier (UTAG_SELECTOR)); ! /* void *sel_id; */ ! ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_VOID]); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("sel_id")); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); field_decl_chain = field_decl; /* char *sel_type; */ ! ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_CHAR]); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("sel_type")); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); finish_struct (objc_selector_template, field_decl_chain, NULL_TREE); } ! /* struct objc_class { ! struct objc_class *isa; ! struct objc_class *super_class; char *name; long version; long info; long instance_size; ! struct objc_ivar_list *ivars; ! struct objc_method_list *methods; ! if (flag_next_runtime) struct objc_cache *cache; ! else { struct sarray *dtable; ! struct objc_class *subclass_list; ! struct objc_class *sibling_class; ! } ! struct objc_protocol_list *protocols; ! if (flag_next_runtime) void *sel_id; void *gc_object_type; }; */ --- 4091,4132 ---- build_selector_template (void) { ! tree field_decl, field_decl_chain; objc_selector_template = start_struct (RECORD_TYPE, get_identifier (UTAG_SELECTOR)); ! /* SEL sel_id; */ ! field_decl = create_field_decl (objc_selector_type, "sel_id"); field_decl_chain = field_decl; /* char *sel_type; */ ! field_decl = create_field_decl (string_type_node, "sel_type"); chainon (field_decl_chain, field_decl); finish_struct (objc_selector_template, field_decl_chain, NULL_TREE); } ! /* struct _objc_class { ! struct _objc_class *isa; ! struct _objc_class *super_class; char *name; long version; long info; long instance_size; ! struct _objc_ivar_list *ivars; ! struct _objc_method_list *methods; ! #ifdef __NEXT_RUNTIME__ struct objc_cache *cache; ! #else struct sarray *dtable; ! struct _objc_class *subclass_list; ! struct _objc_class *sibling_class; ! #endif ! struct _objc_protocol_list *protocols; ! #ifdef __NEXT_RUNTIME__ void *sel_id; + #endif void *gc_object_type; }; */ *************** build_selector_template (void) *** 4090,4228 **** static void build_class_template (void) { ! tree decl_specs, field_decl, field_decl_chain; objc_class_template = start_struct (RECORD_TYPE, get_identifier (UTAG_CLASS)); ! /* struct objc_class *isa; */ ! ! decl_specs = build_tree_list (NULL_TREE, objc_class_template); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("isa")); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); field_decl_chain = field_decl; ! /* struct objc_class *super_class; */ ! ! decl_specs = build_tree_list (NULL_TREE, objc_class_template); ! field_decl ! = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("super_class")); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); /* char *name; */ ! ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_CHAR]); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("name")); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); /* long version; */ ! ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_LONG]); ! field_decl = get_identifier ("version"); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); /* long info; */ ! ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_LONG]); ! field_decl = get_identifier ("info"); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); /* long instance_size; */ ! ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_LONG]); ! field_decl = get_identifier ("instance_size"); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); ! /* struct objc_ivar_list *ivars; */ ! ! decl_specs = build_tree_list (NULL_TREE, ! xref_tag (RECORD_TYPE, ! get_identifier (UTAG_IVAR_LIST))); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("ivars")); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); ! /* struct objc_method_list *methods; */ ! ! decl_specs = build_tree_list (NULL_TREE, ! xref_tag (RECORD_TYPE, ! get_identifier (UTAG_METHOD_LIST))); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("methods")); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); if (flag_next_runtime) { /* struct objc_cache *cache; */ ! ! decl_specs = build_tree_list (NULL_TREE, ! xref_tag (RECORD_TYPE, ! get_identifier ("objc_cache"))); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("cache")); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); } else { /* struct sarray *dtable; */ ! ! decl_specs = build_tree_list (NULL_TREE, ! xref_tag (RECORD_TYPE, ! get_identifier ("sarray"))); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("dtable")); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); /* struct objc_class *subclass_list; */ ! ! decl_specs = build_tree_list (NULL_TREE, objc_class_template); ! field_decl ! = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("subclass_list")); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); /* struct objc_class *sibling_class; */ ! ! decl_specs = build_tree_list (NULL_TREE, objc_class_template); ! field_decl ! = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("sibling_class")); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); } ! /* struct objc_protocol **protocol_list; */ ! ! decl_specs = build_tree_list (NULL_TREE, ! xref_tag (RECORD_TYPE, ! get_identifier (UTAG_PROTOCOL))); ! field_decl ! = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("protocol_list")); ! field_decl ! = build1 (INDIRECT_REF, NULL_TREE, field_decl); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); if (flag_next_runtime) { /* void *sel_id; */ ! ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_VOID]); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("sel_id")); ! field_decl ! = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); } /* void *gc_object_type; */ ! ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_VOID]); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("gc_object_type")); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); finish_struct (objc_class_template, field_decl_chain, NULL_TREE); --- 4138,4243 ---- static void build_class_template (void) { ! tree field_decl, field_decl_chain; objc_class_template = start_struct (RECORD_TYPE, get_identifier (UTAG_CLASS)); ! /* struct _objc_class *isa; */ ! field_decl = create_field_decl (build_pointer_type (objc_class_template), ! "isa"); field_decl_chain = field_decl; ! /* struct _objc_class *super_class; */ ! field_decl = create_field_decl (build_pointer_type (objc_class_template), ! "super_class"); chainon (field_decl_chain, field_decl); /* char *name; */ ! field_decl = create_field_decl (string_type_node, "name"); chainon (field_decl_chain, field_decl); /* long version; */ ! field_decl = create_field_decl (long_integer_type_node, "version"); chainon (field_decl_chain, field_decl); /* long info; */ ! field_decl = create_field_decl (long_integer_type_node, "info"); chainon (field_decl_chain, field_decl); /* long instance_size; */ ! field_decl = create_field_decl (long_integer_type_node, "instance_size"); chainon (field_decl_chain, field_decl); ! /* struct _objc_ivar_list *ivars; */ ! field_decl = create_field_decl (build_pointer_type ! (xref_tag (RECORD_TYPE, ! get_identifier ! (UTAG_IVAR_LIST))), ! "ivars"); chainon (field_decl_chain, field_decl); ! /* struct _objc_method_list *methods; */ ! field_decl = create_field_decl (build_pointer_type ! (xref_tag (RECORD_TYPE, ! get_identifier ! (UTAG_METHOD_LIST))), ! "methods"); chainon (field_decl_chain, field_decl); if (flag_next_runtime) { /* struct objc_cache *cache; */ ! field_decl = create_field_decl (build_pointer_type ! (xref_tag (RECORD_TYPE, ! get_identifier ! ("objc_cache"))), ! "cache"); chainon (field_decl_chain, field_decl); } else { /* struct sarray *dtable; */ ! field_decl = create_field_decl (build_pointer_type ! (xref_tag (RECORD_TYPE, ! get_identifier ! ("sarray"))), ! "dtable"); chainon (field_decl_chain, field_decl); /* struct objc_class *subclass_list; */ ! field_decl = create_field_decl (build_pointer_type ! (objc_class_template), ! "subclass_list"); chainon (field_decl_chain, field_decl); /* struct objc_class *sibling_class; */ ! field_decl = create_field_decl (build_pointer_type ! (objc_class_template), ! "sibling_class"); chainon (field_decl_chain, field_decl); } ! /* struct _objc_protocol **protocol_list; */ ! field_decl = create_field_decl (build_pointer_type ! (build_pointer_type ! (xref_tag (RECORD_TYPE, ! get_identifier ! (UTAG_PROTOCOL)))), ! "protocol_list"); chainon (field_decl_chain, field_decl); if (flag_next_runtime) { /* void *sel_id; */ ! field_decl = create_field_decl (build_pointer_type (void_type_node), ! "sel_id"); chainon (field_decl_chain, field_decl); } /* void *gc_object_type; */ ! field_decl = create_field_decl (build_pointer_type (void_type_node), ! "gc_object_type"); chainon (field_decl_chain, field_decl); finish_struct (objc_class_template, field_decl_chain, NULL_TREE); *************** synth_forward_declarations (void) *** 4237,4243 **** /* static struct objc_class _OBJC_CLASS_; */ UOBJC_CLASS_decl = build_metadata_decl ("_OBJC_CLASS", ! objc_class_template); /* static struct objc_class _OBJC_METACLASS_; */ UOBJC_METACLASS_decl = build_metadata_decl ("_OBJC_METACLASS", --- 4252,4258 ---- /* static struct objc_class _OBJC_CLASS_; */ UOBJC_CLASS_decl = build_metadata_decl ("_OBJC_CLASS", ! objc_class_template); /* static struct objc_class _OBJC_METACLASS_; */ UOBJC_METACLASS_decl = build_metadata_decl ("_OBJC_METACLASS", *************** synth_forward_declarations (void) *** 4251,4270 **** } static void ! error_with_ivar (const char *message, tree decl, tree rawdecl) { ! error ("%J%s `%s'", decl, ! message, gen_declaration (rawdecl, errbuf)); } static void check_ivars (tree inter, tree imp) { ! tree intdecls = CLASS_IVARS (inter); ! tree impdecls = CLASS_IVARS (imp); ! tree rawintdecls = CLASS_RAW_IVARS (inter); ! tree rawimpdecls = CLASS_RAW_IVARS (imp); while (1) { --- 4266,4283 ---- } static void ! error_with_ivar (const char *message, tree decl) { ! error ("%J%s %qs", decl, ! message, gen_declaration (decl)); } static void check_ivars (tree inter, tree imp) { ! tree intdecls = CLASS_RAW_IVARS (inter); ! tree impdecls = CLASS_RAW_IVARS (imp); while (1) { *************** check_ivars (tree inter, tree imp) *** 4284,4299 **** t1 = TREE_TYPE (intdecls); t2 = TREE_TYPE (impdecls); ! if (!comptypes (t1, t2, false) ! || !tree_int_cst_equal (TREE_VALUE (TREE_VALUE (rawintdecls)), ! TREE_VALUE (TREE_VALUE (rawimpdecls)))) { if (DECL_NAME (intdecls) == DECL_NAME (impdecls)) { error_with_ivar ("conflicting instance variable type", ! impdecls, rawimpdecls); error_with_ivar ("previous declaration of", ! intdecls, rawintdecls); } else /* both the type and the name don't match */ { --- 4297,4312 ---- t1 = TREE_TYPE (intdecls); t2 = TREE_TYPE (impdecls); ! if (!comptypes (t1, t2) ! || !tree_int_cst_equal (DECL_INITIAL (intdecls), ! DECL_INITIAL (impdecls))) { if (DECL_NAME (intdecls) == DECL_NAME (impdecls)) { error_with_ivar ("conflicting instance variable type", ! impdecls); error_with_ivar ("previous declaration of", ! intdecls); } else /* both the type and the name don't match */ { *************** check_ivars (tree inter, tree imp) *** 4305,4364 **** else if (DECL_NAME (intdecls) != DECL_NAME (impdecls)) { error_with_ivar ("conflicting instance variable name", ! impdecls, rawimpdecls); error_with_ivar ("previous declaration of", ! intdecls, rawintdecls); } intdecls = TREE_CHAIN (intdecls); impdecls = TREE_CHAIN (impdecls); - rawintdecls = TREE_CHAIN (rawintdecls); - rawimpdecls = TREE_CHAIN (rawimpdecls); } } /* Set 'objc_super_template' to the data type node for 'struct _objc_super'. This needs to be done just once per compilation. */ static void build_super_template (void) { ! tree decl_specs, field_decl, field_decl_chain; ! ! /* Suppress outputting debug symbols, because ! dbxout_init hasn't been called yet. */ ! enum debug_info_type save_write_symbols = write_symbols; ! const struct gcc_debug_hooks *save_hooks = debug_hooks; ! ! write_symbols = NO_DEBUG; ! debug_hooks = &do_nothing_debug_hooks; objc_super_template = start_struct (RECORD_TYPE, get_identifier (UTAG_SUPER)); ! /* struct objc_object *self; */ ! ! decl_specs = build_tree_list (NULL_TREE, objc_object_reference); ! field_decl = get_identifier ("self"); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, field_decl); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); field_decl_chain = field_decl; ! /* struct objc_class *class; */ ! ! decl_specs = get_identifier (UTAG_CLASS); ! decl_specs = build_tree_list (NULL_TREE, xref_tag (RECORD_TYPE, decl_specs)); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("class")); ! ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); finish_struct (objc_super_template, field_decl_chain, NULL_TREE); - - write_symbols = save_write_symbols; - debug_hooks = save_hooks; } ! /* struct objc_ivar { char *ivar_name; char *ivar_type; int ivar_offset; --- 4318,4361 ---- else if (DECL_NAME (intdecls) != DECL_NAME (impdecls)) { error_with_ivar ("conflicting instance variable name", ! impdecls); error_with_ivar ("previous declaration of", ! intdecls); } intdecls = TREE_CHAIN (intdecls); impdecls = TREE_CHAIN (impdecls); } } /* Set 'objc_super_template' to the data type node for 'struct _objc_super'. This needs to be done just once per compilation. */ + /* struct _objc_super { + struct _objc_object *self; + struct _objc_class *super_class; + }; */ + static void build_super_template (void) { ! tree field_decl, field_decl_chain; objc_super_template = start_struct (RECORD_TYPE, get_identifier (UTAG_SUPER)); ! /* struct _objc_object *self; */ ! field_decl = create_field_decl (objc_object_type, "self"); field_decl_chain = field_decl; ! /* struct _objc_class *super_class; */ ! field_decl = create_field_decl (build_pointer_type (objc_class_template), ! "super_class"); chainon (field_decl_chain, field_decl); finish_struct (objc_super_template, field_decl_chain, NULL_TREE); } ! /* struct _objc_ivar { char *ivar_name; char *ivar_type; int ivar_offset; *************** static tree *** 4368,4400 **** build_ivar_template (void) { tree objc_ivar_id, objc_ivar_record; ! tree decl_specs, field_decl, field_decl_chain; objc_ivar_id = get_identifier (UTAG_IVAR); objc_ivar_record = start_struct (RECORD_TYPE, objc_ivar_id); /* char *ivar_name; */ ! ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_CHAR]); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("ivar_name")); ! ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); field_decl_chain = field_decl; /* char *ivar_type; */ ! ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_CHAR]); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("ivar_type")); ! ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); /* int ivar_offset; */ ! ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_INT]); ! field_decl = get_identifier ("ivar_offset"); ! ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); finish_struct (objc_ivar_record, field_decl_chain, NULL_TREE); --- 4365,4385 ---- build_ivar_template (void) { tree objc_ivar_id, objc_ivar_record; ! tree field_decl, field_decl_chain; objc_ivar_id = get_identifier (UTAG_IVAR); objc_ivar_record = start_struct (RECORD_TYPE, objc_ivar_id); /* char *ivar_name; */ ! field_decl = create_field_decl (string_type_node, "ivar_name"); field_decl_chain = field_decl; /* char *ivar_type; */ ! field_decl = create_field_decl (string_type_node, "ivar_type"); chainon (field_decl_chain, field_decl); /* int ivar_offset; */ ! field_decl = create_field_decl (integer_type_node, "ivar_offset"); chainon (field_decl_chain, field_decl); finish_struct (objc_ivar_record, field_decl_chain, NULL_TREE); *************** static tree *** 4411,4435 **** build_ivar_list_template (tree list_type, int size) { tree objc_ivar_list_record; ! tree decl_specs, field_decl, field_decl_chain; objc_ivar_list_record = start_struct (RECORD_TYPE, NULL_TREE); /* int ivar_count; */ ! ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_INT]); ! field_decl = get_identifier ("ivar_count"); ! ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); field_decl_chain = field_decl; /* struct objc_ivar ivar_list[]; */ ! ! decl_specs = build_tree_list (NULL_TREE, list_type); ! field_decl = build_nt (ARRAY_REF, get_identifier ("ivar_list"), ! build_int_2 (size, 0)); ! ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); finish_struct (objc_ivar_list_record, field_decl_chain, NULL_TREE); --- 4396,4415 ---- build_ivar_list_template (tree list_type, int size) { tree objc_ivar_list_record; ! tree field_decl, field_decl_chain; objc_ivar_list_record = start_struct (RECORD_TYPE, NULL_TREE); /* int ivar_count; */ ! field_decl = create_field_decl (integer_type_node, "ivar_count"); field_decl_chain = field_decl; /* struct objc_ivar ivar_list[]; */ ! field_decl = create_field_decl (build_array_type ! (list_type, ! build_index_type ! (build_int_cst (NULL_TREE, size - 1))), ! "ivar_list"); chainon (field_decl_chain, field_decl); finish_struct (objc_ivar_list_record, field_decl_chain, NULL_TREE); *************** build_ivar_list_template (tree list_type *** 4438,4444 **** } /* struct { ! int method_next; int method_count; struct objc_method method_list[method_count]; }; */ --- 4418,4424 ---- } /* struct { ! struct _objc__method_prototype_list *method_next; int method_count; struct objc_method method_list[method_count]; }; */ *************** static tree *** 4447,4483 **** build_method_list_template (tree list_type, int size) { tree objc_ivar_list_record; ! tree decl_specs, field_decl, field_decl_chain; objc_ivar_list_record = start_struct (RECORD_TYPE, NULL_TREE); ! /* int method_next; */ ! ! decl_specs ! = build_tree_list ! (NULL_TREE, ! xref_tag (RECORD_TYPE, ! get_identifier (UTAG_METHOD_PROTOTYPE_LIST))); ! field_decl ! = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("method_next")); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); field_decl_chain = field_decl; /* int method_count; */ ! ! decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_INT]); ! field_decl = get_identifier ("method_count"); ! ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); /* struct objc_method method_list[]; */ ! ! decl_specs = build_tree_list (NULL_TREE, list_type); ! field_decl = build_nt (ARRAY_REF, get_identifier ("method_list"), ! build_int_2 (size, 0)); ! ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); finish_struct (objc_ivar_list_record, field_decl_chain, NULL_TREE); --- 4427,4454 ---- build_method_list_template (tree list_type, int size) { tree objc_ivar_list_record; ! tree field_decl, field_decl_chain; objc_ivar_list_record = start_struct (RECORD_TYPE, NULL_TREE); ! /* struct _objc__method_prototype_list *method_next; */ ! field_decl = create_field_decl (build_pointer_type ! (xref_tag (RECORD_TYPE, ! get_identifier ! (UTAG_METHOD_PROTOTYPE_LIST))), ! "method_next"); field_decl_chain = field_decl; /* int method_count; */ ! field_decl = create_field_decl (integer_type_node, "method_count"); chainon (field_decl_chain, field_decl); /* struct objc_method method_list[]; */ ! field_decl = create_field_decl (build_array_type ! (list_type, ! build_index_type ! (build_int_cst (NULL_TREE, size - 1))), ! "method_list"); chainon (field_decl_chain, field_decl); finish_struct (objc_ivar_list_record, field_decl_chain, NULL_TREE); *************** build_ivar_list_initializer (tree type, *** 4502,4508 **** ivar); else /* Unnamed bit-field ivar (yuck). */ ! ivar = tree_cons (NULL_TREE, build_int_2 (0, 0), ivar); /* Set type. */ encode_field_decl (field_decl, --- 4473,4479 ---- ivar); else /* Unnamed bit-field ivar (yuck). */ ! ivar = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), ivar); /* Set type. */ encode_field_decl (field_decl, *************** build_ivar_list_initializer (tree type, *** 4537,4556 **** static tree generate_ivars_list (tree type, const char *name, int size, tree list) { ! tree sc_spec, decl_specs, decl, initlist; ! ! sc_spec = tree_cons (NULL_TREE, ridpointers[(int) RID_STATIC], NULL_TREE); ! decl_specs = tree_cons (NULL_TREE, type, sc_spec); ! decl = start_decl (synth_id_with_class_suffix (name, objc_implementation_context), ! decl_specs, 1, NULL_TREE); ! initlist = build_tree_list (NULL_TREE, build_int_2 (size, 0)); initlist = tree_cons (NULL_TREE, list, initlist); ! finish_decl (decl, ! objc_build_constructor (TREE_TYPE (decl), nreverse (initlist)), ! NULL_TREE); return decl; } --- 4508,4524 ---- static tree generate_ivars_list (tree type, const char *name, int size, tree list) { ! tree decl, initlist; ! decl = start_var_decl (type, synth_id_with_class_suffix ! (name, objc_implementation_context)); ! initlist = build_tree_list (NULL_TREE, build_int_cst (NULL_TREE, size)); initlist = tree_cons (NULL_TREE, list, initlist); ! finish_var_decl (decl, ! objc_build_constructor (TREE_TYPE (decl), ! nreverse (initlist))); return decl; } *************** static void *** 4572,4578 **** generate_ivar_lists (void) { tree initlist, ivar_list_template, chain; - tree cast, variable_length_type; int size; generating_instance_variables = 1; --- 4540,4545 ---- *************** generate_ivar_lists (void) *** 4580,4592 **** if (!objc_ivar_template) objc_ivar_template = build_ivar_template (); - cast - = build_tree_list - (build_tree_list (NULL_TREE, xref_tag (RECORD_TYPE, - get_identifier (UTAG_IVAR_LIST))), - NULL_TREE); - variable_length_type = groktypename (cast); - /* Only generate class variables for the root of the inheritance hierarchy since these will be the same for every class. */ --- 4547,4552 ---- *************** generate_ivar_lists (void) *** 4601,4607 **** UOBJC_CLASS_VARIABLES_decl = generate_ivars_list (ivar_list_template, "_OBJC_CLASS_VARIABLES", size, initlist); - TREE_TYPE (UOBJC_CLASS_VARIABLES_decl) = variable_length_type; } else UOBJC_CLASS_VARIABLES_decl = 0; --- 4561,4566 ---- *************** generate_ivar_lists (void) *** 4616,4622 **** UOBJC_INSTANCE_VARIABLES_decl = generate_ivars_list (ivar_list_template, "_OBJC_INSTANCE_VARIABLES", size, initlist); - TREE_TYPE (UOBJC_INSTANCE_VARIABLES_decl) = variable_length_type; } else UOBJC_INSTANCE_VARIABLES_decl = 0; --- 4575,4580 ---- *************** build_dispatch_table_initializer (tree t *** 4647,4656 **** meth_var_types), elemlist); ! elemlist = tree_cons (NULL_TREE, ! build_unary_op (ADDR_EXPR, ! METHOD_DEFINITION (entries), 1), ! elemlist); initlist = tree_cons (NULL_TREE, objc_build_constructor (type, nreverse (elemlist)), --- 4605,4616 ---- meth_var_types), elemlist); ! elemlist ! = tree_cons (NULL_TREE, ! convert (ptr_type_node, ! build_unary_op (ADDR_EXPR, ! METHOD_DEFINITION (entries), 1)), ! elemlist); initlist = tree_cons (NULL_TREE, objc_build_constructor (type, nreverse (elemlist)), *************** static tree *** 4676,4706 **** build_method_template (void) { tree _SLT_record; ! tree decl_specs, field_decl, field_decl_chain; _SLT_record = start_struct (RECORD_TYPE, get_identifier (UTAG_METHOD)); ! /* struct objc_selector *_cmd; */ ! decl_specs = tree_cons (NULL_TREE, ! xref_tag (RECORD_TYPE, ! get_identifier (TAG_SELECTOR)), ! NULL_TREE); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("_cmd")); ! ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); field_decl_chain = field_decl; ! decl_specs = tree_cons (NULL_TREE, ridpointers[(int) RID_CHAR], NULL_TREE); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, ! get_identifier ("method_types")); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); /* void *_imp; */ ! ! decl_specs = tree_cons (NULL_TREE, ridpointers[(int) RID_VOID], NULL_TREE); ! field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("_imp")); ! field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); finish_struct (_SLT_record, field_decl_chain, NULL_TREE); --- 4636,4656 ---- build_method_template (void) { tree _SLT_record; ! tree field_decl, field_decl_chain; _SLT_record = start_struct (RECORD_TYPE, get_identifier (UTAG_METHOD)); ! /* SEL _cmd; */ ! field_decl = create_field_decl (objc_selector_type, "_cmd"); field_decl_chain = field_decl; ! /* char *method_types; */ ! field_decl = create_field_decl (string_type_node, "method_types"); chainon (field_decl_chain, field_decl); /* void *_imp; */ ! field_decl = create_field_decl (build_pointer_type (void_type_node), ! "_imp"); chainon (field_decl_chain, field_decl); finish_struct (_SLT_record, field_decl_chain, NULL_TREE); *************** build_method_template (void) *** 4712,4732 **** static tree generate_dispatch_table (tree type, const char *name, int size, tree list) { ! tree sc_spec, decl_specs, decl, initlist; ! ! sc_spec = tree_cons (NULL_TREE, ridpointers[(int) RID_STATIC], NULL_TREE); ! decl_specs = tree_cons (NULL_TREE, type, sc_spec); ! decl = start_decl (synth_id_with_class_suffix (name, objc_implementation_context), ! decl_specs, 1, NULL_TREE); ! initlist = build_tree_list (NULL_TREE, build_int_2 (0, 0)); ! initlist = tree_cons (NULL_TREE, build_int_2 (size, 0), initlist); initlist = tree_cons (NULL_TREE, list, initlist); ! finish_decl (decl, ! objc_build_constructor (TREE_TYPE (decl), nreverse (initlist)), ! NULL_TREE); return decl; } --- 4662,4679 ---- static tree generate_dispatch_table (tree type, const char *name, int size, tree list) { ! tree decl, initlist; ! decl = start_var_decl (type, synth_id_with_class_suffix ! (name, objc_implementation_context)); ! initlist = build_tree_list (NULL_TREE, build_int_cst (NULL_TREE, 0)); ! initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, size), initlist); initlist = tree_cons (NULL_TREE, list, initlist); ! finish_var_decl (decl, ! objc_build_constructor (TREE_TYPE (decl), ! nreverse (initlist))); return decl; } *************** static void *** 4759,4779 **** generate_dispatch_tables (void) { tree initlist, chain, method_list_template; - tree cast, variable_length_type; int size; if (!objc_method_template) objc_method_template = build_method_template (); - cast - = build_tree_list - (build_tree_list (NULL_TREE, - xref_tag (RECORD_TYPE, - get_identifier (UTAG_METHOD_LIST))), - NULL_TREE); - - variable_length_type = groktypename (cast); - chain = CLASS_CLS_METHODS (objc_implementation_context); if (chain) { --- 4706,4716 ---- *************** generate_dispatch_tables (void) *** 4791,4797 **** ? "_OBJC_CLASS_METHODS" : "_OBJC_CATEGORY_CLASS_METHODS"), size, initlist); - TREE_TYPE (UOBJC_CLASS_METHODS_decl) = variable_length_type; } else UOBJC_CLASS_METHODS_decl = 0; --- 4728,4733 ---- *************** generate_dispatch_tables (void) *** 4817,4823 **** = generate_dispatch_table (method_list_template, "_OBJC_CATEGORY_INSTANCE_METHODS", size, initlist); - TREE_TYPE (UOBJC_INSTANCE_METHODS_decl) = variable_length_type; } else UOBJC_INSTANCE_METHODS_decl = 0; --- 4753,4758 ---- *************** generate_dispatch_tables (void) *** 4826,4835 **** static tree generate_protocol_list (tree i_or_p) { ! tree initlist, decl_specs, sc_spec; ! tree refs_decl, expr_decl, lproto, e, plist; ! tree cast_type; int size = 0; if (TREE_CODE (i_or_p) == CLASS_INTERFACE_TYPE || TREE_CODE (i_or_p) == CATEGORY_INTERFACE_TYPE) --- 4761,4770 ---- static tree generate_protocol_list (tree i_or_p) { ! tree initlist; ! tree refs_decl, lproto, e, plist; int size = 0; + const char *ref_name; if (TREE_CODE (i_or_p) == CLASS_INTERFACE_TYPE || TREE_CODE (i_or_p) == CATEGORY_INTERFACE_TYPE) *************** generate_protocol_list (tree i_or_p) *** 4839,4851 **** else abort (); - cast_type = groktypename - (build_tree_list - (build_tree_list (NULL_TREE, - xref_tag (RECORD_TYPE, - get_identifier (UTAG_PROTOCOL))), - build1 (INDIRECT_REF, NULL_TREE, NULL_TREE))); - /* Compute size. */ for (lproto = plist; lproto; lproto = TREE_CHAIN (lproto)) if (TREE_CODE (TREE_VALUE (lproto)) == PROTOCOL_INTERFACE_TYPE --- 4774,4779 ---- *************** generate_protocol_list (tree i_or_p) *** 4853,4862 **** size++; /* Build initializer. */ ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), NULL_TREE); ! ! e = build_int_2 (size, 0); ! TREE_TYPE (e) = cast_type; initlist = tree_cons (NULL_TREE, e, initlist); for (lproto = plist; lproto; lproto = TREE_CHAIN (lproto)) --- 4781,4788 ---- size++; /* Build initializer. */ ! initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), NULL_TREE); ! e = build_int_cst (build_pointer_type (objc_protocol_template), size); initlist = tree_cons (NULL_TREE, e, initlist); for (lproto = plist; lproto; lproto = TREE_CHAIN (lproto)) *************** generate_protocol_list (tree i_or_p) *** 4873,4910 **** /* static struct objc_protocol *refs[n]; */ - sc_spec = tree_cons (NULL_TREE, ridpointers[(int) RID_STATIC], NULL_TREE); - decl_specs = tree_cons (NULL_TREE, xref_tag (RECORD_TYPE, - get_identifier (UTAG_PROTOCOL)), - sc_spec); - if (TREE_CODE (i_or_p) == PROTOCOL_INTERFACE_TYPE) ! expr_decl = build_nt (ARRAY_REF, ! synth_id_with_class_suffix ("_OBJC_PROTOCOL_REFS", ! i_or_p), ! build_int_2 (size + 2, 0)); else if (TREE_CODE (i_or_p) == CLASS_INTERFACE_TYPE) ! expr_decl = build_nt (ARRAY_REF, ! synth_id_with_class_suffix ("_OBJC_CLASS_PROTOCOLS", ! i_or_p), ! build_int_2 (size + 2, 0)); else if (TREE_CODE (i_or_p) == CATEGORY_INTERFACE_TYPE) ! expr_decl ! = build_nt (ARRAY_REF, ! synth_id_with_class_suffix ("_OBJC_CATEGORY_PROTOCOLS", ! i_or_p), ! build_int_2 (size + 2, 0)); else abort (); ! expr_decl = build1 (INDIRECT_REF, NULL_TREE, expr_decl); ! ! refs_decl = start_decl (expr_decl, decl_specs, 1, NULL_TREE); ! DECL_CONTEXT (refs_decl) = NULL_TREE; ! finish_decl (refs_decl, objc_build_constructor (TREE_TYPE (refs_decl), ! nreverse (initlist)), ! NULL_TREE); return refs_decl; } --- 4799,4821 ---- /* static struct objc_protocol *refs[n]; */ if (TREE_CODE (i_or_p) == PROTOCOL_INTERFACE_TYPE) ! ref_name = synth_id_with_class_suffix ("_OBJC_PROTOCOL_REFS", i_or_p); else if (TREE_CODE (i_or_p) == CLASS_INTERFACE_TYPE) ! ref_name = synth_id_with_class_suffix ("_OBJC_CLASS_PROTOCOLS", i_or_p); else if (TREE_CODE (i_or_p) == CATEGORY_INTERFACE_TYPE) ! ref_name = synth_id_with_class_suffix ("_OBJC_CATEGORY_PROTOCOLS", i_or_p); else abort (); ! refs_decl = start_var_decl ! (build_array_type ! (build_pointer_type (objc_protocol_template), ! build_index_type (build_int_cst (NULL_TREE, size + 2))), ! ref_name); ! finish_var_decl (refs_decl, objc_build_constructor (TREE_TYPE (refs_decl), ! nreverse (initlist))); return refs_decl; } *************** build_category_initializer (tree type, t *** 4920,4933 **** initlist = tree_cons (NULL_TREE, class_name, initlist); if (!instance_methods) ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); else { expr = build_unary_op (ADDR_EXPR, instance_methods, 0); initlist = tree_cons (NULL_TREE, expr, initlist); } if (!class_methods) ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); else { expr = build_unary_op (ADDR_EXPR, class_methods, 0); --- 4831,4844 ---- initlist = tree_cons (NULL_TREE, class_name, initlist); if (!instance_methods) ! initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist); else { expr = build_unary_op (ADDR_EXPR, instance_methods, 0); initlist = tree_cons (NULL_TREE, expr, initlist); } if (!class_methods) ! initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist); else { expr = build_unary_op (ADDR_EXPR, class_methods, 0); *************** build_category_initializer (tree type, t *** 4936,4961 **** /* protocol_list = */ if (!protocol_list) ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); else ! { ! tree cast_type2 = groktypename ! (build_tree_list ! (build_tree_list (NULL_TREE, ! xref_tag (RECORD_TYPE, ! get_identifier (UTAG_PROTOCOL))), ! build1 (INDIRECT_REF, NULL_TREE, ! build1 (INDIRECT_REF, NULL_TREE, NULL_TREE)))); ! ! expr = build_unary_op (ADDR_EXPR, protocol_list, 0); ! TREE_TYPE (expr) = cast_type2; ! initlist = tree_cons (NULL_TREE, expr, initlist); ! } return objc_build_constructor (type, nreverse (initlist)); } ! /* struct objc_class { struct objc_class *isa; struct objc_class *super_class; char *name; --- 4847,4866 ---- /* protocol_list = */ if (!protocol_list) ! initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist); else ! { ! expr = convert (build_pointer_type ! (build_pointer_type ! (objc_protocol_template)), ! build_unary_op (ADDR_EXPR, protocol_list, 0)); ! initlist = tree_cons (NULL_TREE, expr, initlist); ! } return objc_build_constructor (type, nreverse (initlist)); } ! /* struct _objc_class { struct objc_class *isa; struct objc_class *super_class; char *name; *************** build_shared_structure_initializer (tree *** 4995,5011 **** initlist = tree_cons (NULL_TREE, default_conversion (name), initlist); /* version = */ ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); /* info = */ ! initlist = tree_cons (NULL_TREE, build_int_2 (status, 0), initlist); /* instance_size = */ ! initlist = tree_cons (NULL_TREE, size, initlist); /* objc_ivar_list = */ if (!ivar_list) ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); else { expr = build_unary_op (ADDR_EXPR, ivar_list, 0); --- 4900,4920 ---- initlist = tree_cons (NULL_TREE, default_conversion (name), initlist); /* version = */ ! initlist = tree_cons (NULL_TREE, build_int_cst (long_integer_type_node, 0), ! initlist); /* info = */ ! initlist = tree_cons (NULL_TREE, ! build_int_cst (long_integer_type_node, status), ! initlist); /* instance_size = */ ! initlist = tree_cons (NULL_TREE, convert (long_integer_type_node, size), ! initlist); /* objc_ivar_list = */ if (!ivar_list) ! initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist); else { expr = build_unary_op (ADDR_EXPR, ivar_list, 0); *************** build_shared_structure_initializer (tree *** 5014,5020 **** /* objc_method_list = */ if (!dispatch_table) ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); else { expr = build_unary_op (ADDR_EXPR, dispatch_table, 0); --- 4923,4929 ---- /* objc_method_list = */ if (!dispatch_table) ! initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist); else { expr = build_unary_op (ADDR_EXPR, dispatch_table, 0); *************** build_shared_structure_initializer (tree *** 5023,5066 **** if (flag_next_runtime) /* method_cache = */ ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); else { /* dtable = */ ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); /* subclass_list = */ ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); /* sibling_class = */ ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); } /* protocol_list = */ if (! protocol_list) ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); else ! { ! tree cast_type2 ! = groktypename ! (build_tree_list ! (build_tree_list (NULL_TREE, ! xref_tag (RECORD_TYPE, ! get_identifier (UTAG_PROTOCOL))), ! build1 (INDIRECT_REF, NULL_TREE, ! build1 (INDIRECT_REF, NULL_TREE, NULL_TREE)))); ! ! expr = build_unary_op (ADDR_EXPR, protocol_list, 0); ! TREE_TYPE (expr) = cast_type2; ! initlist = tree_cons (NULL_TREE, expr, initlist); ! } if (flag_next_runtime) /* sel_id = NULL */ ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); /* gc_object_type = NULL */ ! initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); return objc_build_constructor (type, nreverse (initlist)); } --- 4932,4968 ---- if (flag_next_runtime) /* method_cache = */ ! initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist); else { /* dtable = */ ! initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist); /* subclass_list = */ ! initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist); /* sibling_class = */ ! initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist); } /* protocol_list = */ if (! protocol_list) ! initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist); else ! { ! expr = convert (build_pointer_type ! (build_pointer_type ! (objc_protocol_template)), ! build_unary_op (ADDR_EXPR, protocol_list, 0)); ! initlist = tree_cons (NULL_TREE, expr, initlist); ! } if (flag_next_runtime) /* sel_id = NULL */ ! initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist); /* gc_object_type = NULL */ ! initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist); return objc_build_constructor (type, nreverse (initlist)); } *************** lookup_category (tree class, tree cat_na *** 5082,5088 **** static void generate_category (tree cat) { ! tree sc_spec, decl_specs, decl; tree initlist, cat_name_expr, class_name_expr; tree protocol_decl, category; --- 4984,4990 ---- static void generate_category (tree cat) { ! tree decl; tree initlist, cat_name_expr, class_name_expr; tree protocol_decl, category; *************** generate_category (tree cat) *** 5102,5113 **** else protocol_decl = 0; ! sc_spec = tree_cons (NULL_TREE, ridpointers[(int) RID_STATIC], NULL_TREE); ! decl_specs = tree_cons (NULL_TREE, objc_category_template, sc_spec); ! ! decl = start_decl (synth_id_with_class_suffix ("_OBJC_CATEGORY", ! objc_implementation_context), ! decl_specs, 1, NULL_TREE); initlist = build_category_initializer (TREE_TYPE (decl), cat_name_expr, class_name_expr, --- 5004,5012 ---- else protocol_decl = 0; ! decl = start_var_decl (objc_category_template, ! synth_id_with_class_suffix ! ("_OBJC_CATEGORY", objc_implementation_context)); initlist = build_category_initializer (TREE_TYPE (decl), cat_name_expr, class_name_expr, *************** generate_category (tree cat) *** 5115,5121 **** UOBJC_CLASS_METHODS_decl, protocol_decl); ! finish_decl (decl, initlist, NULL_TREE); } /* static struct objc_class _OBJC_METACLASS_Foo={ ... }; --- 5014,5020 ---- UOBJC_CLASS_METHODS_decl, protocol_decl); ! finish_var_decl (decl, initlist); } /* static struct objc_class _OBJC_METACLASS_Foo={ ... }; *************** generate_shared_structures (void) *** 5153,5164 **** /* No super class. */ my_root_id = CLASS_NAME (implementation_template); ! cast_type ! = groktypename (build_tree_list (build_tree_list (NULL_TREE, ! objc_class_template), ! build1 (INDIRECT_REF, ! NULL_TREE, NULL_TREE))); ! name_expr = add_objc_string (CLASS_NAME (implementation_template), class_names); --- 5052,5058 ---- /* No super class. */ my_root_id = CLASS_NAME (implementation_template); ! cast_type = build_pointer_type (objc_class_template); name_expr = add_objc_string (CLASS_NAME (implementation_template), class_names); *************** generate_shared_structures (void) *** 5169,5175 **** super_expr = build_c_cast (cast_type, super_expr); /* cast! */ } else ! super_expr = build_int_2 (0, 0); root_expr = add_objc_string (my_root_id, class_names); root_expr = build_c_cast (cast_type, root_expr); /* cast! */ --- 5063,5069 ---- super_expr = build_c_cast (cast_type, super_expr); /* cast! */ } else ! super_expr = build_int_cst (NULL_TREE, 0); root_expr = add_objc_string (my_root_id, class_names); root_expr = build_c_cast (cast_type, root_expr); /* cast! */ *************** generate_shared_structures (void) *** 5188,5195 **** sc_spec = build_tree_list (NULL_TREE, ridpointers[(int) RID_STATIC]); decl_specs = tree_cons (NULL_TREE, objc_class_template, sc_spec); ! decl = start_decl (DECL_NAME (UOBJC_METACLASS_decl), decl_specs, 1, ! NULL_TREE); initlist = build_shared_structure_initializer --- 5082,5090 ---- sc_spec = build_tree_list (NULL_TREE, ridpointers[(int) RID_STATIC]); decl_specs = tree_cons (NULL_TREE, objc_class_template, sc_spec); ! decl = start_var_decl (objc_class_template, ! IDENTIFIER_POINTER ! (DECL_NAME (UOBJC_METACLASS_decl))); initlist = build_shared_structure_initializer *************** generate_shared_structures (void) *** 5201,5212 **** UOBJC_CLASS_VARIABLES_decl, protocol_decl); ! finish_decl (decl, initlist, NULL_TREE); /* static struct objc_class _OBJC_CLASS_Foo={ ... }; */ ! decl = start_decl (DECL_NAME (UOBJC_CLASS_decl), decl_specs, 1, ! NULL_TREE); initlist = build_shared_structure_initializer --- 5096,5108 ---- UOBJC_CLASS_VARIABLES_decl, protocol_decl); ! finish_var_decl (decl, initlist); /* static struct objc_class _OBJC_CLASS_Foo={ ... }; */ ! decl = start_var_decl (objc_class_template, ! IDENTIFIER_POINTER ! (DECL_NAME (UOBJC_CLASS_decl))); initlist = build_shared_structure_initializer *************** generate_shared_structures (void) *** 5221,5239 **** UOBJC_INSTANCE_VARIABLES_decl, protocol_decl); ! finish_decl (decl, initlist, NULL_TREE); } ! static tree synth_id_with_class_suffix (const char *preamble, tree ctxt) { ! char *string; if (TREE_CODE (ctxt) == CLASS_IMPLEMENTATION_TYPE || TREE_CODE (ctxt) == CLASS_INTERFACE_TYPE) { - const char *const class_name - = IDENTIFIER_POINTER (CLASS_NAME (objc_implementation_context)); - string = (char *) alloca (strlen (preamble) + strlen (class_name) + 3); sprintf (string, "%s_%s", preamble, IDENTIFIER_POINTER (CLASS_NAME (ctxt))); } --- 5117,5134 ---- UOBJC_INSTANCE_VARIABLES_decl, protocol_decl); ! finish_var_decl (decl, initlist); } ! ! static const char * synth_id_with_class_suffix (const char *preamble, tree ctxt) { ! static char string[BUFSIZE]; ! if (TREE_CODE (ctxt) == CLASS_IMPLEMENTATION_TYPE || TREE_CODE (ctxt) == CLASS_INTERFACE_TYPE) { sprintf (string, "%s_%s", preamble, IDENTIFIER_POINTER (CLASS_NAME (ctxt))); } *************** synth_id_with_class_suffix (const char * *** 5245,5281 **** = IDENTIFIER_POINTER (CLASS_NAME (objc_implementation_context)); const char *const class_super_name = IDENTIFIER_POINTER (CLASS_SUPER_NAME (objc_implementation_context)); - string = (char *) alloca (strlen (preamble) - + strlen (class_name) - + strlen (class_super_name) - + 3); sprintf (string, "%s_%s_%s", preamble, class_name, class_super_name); } else if (TREE_CODE (ctxt) == PROTOCOL_INTERFACE_TYPE) { const char *protocol_name = IDENTIFIER_POINTER (PROTOCOL_NAME (ctxt)); - string - = (char *) alloca (strlen (preamble) + strlen (protocol_name) + 3); sprintf (string, "%s_%s", preamble, protocol_name); } else abort (); ! return get_identifier (string); ! } ! ! static int ! is_objc_type_qualifier (tree node) ! { ! return (TREE_CODE (node) == IDENTIFIER_NODE ! && (node == ridpointers [(int) RID_CONST] ! || node == ridpointers [(int) RID_VOLATILE] ! || node == ridpointers [(int) RID_IN] ! || node == ridpointers [(int) RID_OUT] ! || node == ridpointers [(int) RID_INOUT] ! || node == ridpointers [(int) RID_BYCOPY] ! || node == ridpointers [(int) RID_BYREF] ! || node == ridpointers [(int) RID_ONEWAY])); } /* If type is empty or only type qualifiers are present, add default --- 5140,5156 ---- = IDENTIFIER_POINTER (CLASS_NAME (objc_implementation_context)); const char *const class_super_name = IDENTIFIER_POINTER (CLASS_SUPER_NAME (objc_implementation_context)); sprintf (string, "%s_%s_%s", preamble, class_name, class_super_name); } else if (TREE_CODE (ctxt) == PROTOCOL_INTERFACE_TYPE) { const char *protocol_name = IDENTIFIER_POINTER (PROTOCOL_NAME (ctxt)); sprintf (string, "%s_%s", preamble, protocol_name); } else abort (); ! return string; } /* If type is empty or only type qualifiers are present, add default *************** is_objc_type_qualifier (tree node) *** 5284,5313 **** static tree adjust_type_for_id_default (tree type) { - tree declspecs, chain; - if (!type) ! return build_tree_list (build_tree_list (NULL_TREE, objc_object_reference), ! build1 (INDIRECT_REF, NULL_TREE, NULL_TREE)); ! ! declspecs = TREE_PURPOSE (type); ! /* Determine if a typespec is present. */ ! for (chain = declspecs; ! chain; ! chain = TREE_CHAIN (chain)) ! { ! if (TYPED_OBJECT (TREE_VALUE (chain)) ! && !(TREE_VALUE (type) ! && TREE_CODE (TREE_VALUE (type)) == INDIRECT_REF)) ! error ("can not use an object as parameter to a method\n"); ! if (!is_objc_type_qualifier (TREE_VALUE (chain))) ! return type; ! } ! return build_tree_list (tree_cons (NULL_TREE, objc_object_reference, ! declspecs), ! build1 (INDIRECT_REF, NULL_TREE, NULL_TREE)); } /* Usage: --- 5159,5174 ---- static tree adjust_type_for_id_default (tree type) { if (!type) ! type = make_node (TREE_LIST); ! if (!TREE_VALUE (type)) ! TREE_VALUE (type) = objc_object_type; ! else if (TREE_CODE (TREE_VALUE (type)) == RECORD_TYPE ! && TYPED_OBJECT (TREE_VALUE (type))) ! error ("can not use an object as parameter to a method"); ! return type; } /* Usage: *************** adjust_type_for_id_default (tree type) *** 5329,5335 **** Out: an instance of "keyword_decl". */ tree ! build_keyword_decl (tree key_name, tree arg_type, tree arg_name) { tree keyword_decl; --- 5190,5196 ---- Out: an instance of "keyword_decl". */ tree ! objc_build_keyword_decl (tree key_name, tree arg_type, tree arg_name) { tree keyword_decl; *************** build_keyword_selector (tree selector) *** 5400,5406 **** /* Used for declarations and definitions. */ ! tree build_method_decl (enum tree_code code, tree ret_type, tree selector, tree add_args) { --- 5261,5267 ---- /* Used for declarations and definitions. */ ! static tree build_method_decl (enum tree_code code, tree ret_type, tree selector, tree add_args) { *************** get_arg_type_list (tree meth, int contex *** 5448,5461 **** /* Receiver type. */ if (flag_next_runtime && superflag) ! arglist = build_tree_list (NULL_TREE, super_type); ! else if (context == METHOD_DEF) ! arglist = build_tree_list (NULL_TREE, TREE_TYPE (self_decl)); else ! arglist = build_tree_list (NULL_TREE, id_type); /* Selector type - will eventually change to `int'. */ ! chainon (arglist, build_tree_list (NULL_TREE, selector_type)); /* No actual method prototype given -- assume that remaining arguments are `...'. */ --- 5309,5322 ---- /* Receiver type. */ if (flag_next_runtime && superflag) ! arglist = build_tree_list (NULL_TREE, objc_super_type); ! else if (context == METHOD_DEF && TREE_CODE (meth) == INSTANCE_METHOD_DECL) ! arglist = build_tree_list (NULL_TREE, objc_instance_type); else ! arglist = build_tree_list (NULL_TREE, objc_object_type); /* Selector type - will eventually change to `int'. */ ! chainon (arglist, build_tree_list (NULL_TREE, objc_selector_type)); /* No actual method prototype given -- assume that remaining arguments are `...'. */ *************** get_arg_type_list (tree meth, int contex *** 5465,5487 **** /* Build a list of argument types. */ for (akey = METHOD_SEL_ARGS (meth); akey; akey = TREE_CHAIN (akey)) { ! tree arg_decl = groktypename_in_parm_context (TREE_TYPE (akey)); ! chainon (arglist, build_tree_list (NULL_TREE, TREE_TYPE (arg_decl))); } ! if (METHOD_ADD_ARGS (meth) == objc_ellipsis_node) ! /* We have a `, ...' immediately following the selector, ! finalize the arglist...simulate get_parm_info (0). */ ! ; ! else if (METHOD_ADD_ARGS (meth)) { ! /* we have a variable length selector */ ! tree add_arg_list = TREE_CHAIN (METHOD_ADD_ARGS (meth)); ! chainon (arglist, add_arg_list); } else ! /* finalize the arglist...simulate get_parm_info (1) */ ! chainon (arglist, OBJC_VOID_AT_END); return arglist; } --- 5326,5360 ---- /* Build a list of argument types. */ for (akey = METHOD_SEL_ARGS (meth); akey; akey = TREE_CHAIN (akey)) { ! tree arg_type = TREE_VALUE (TREE_TYPE (akey)); ! ! /* Decay arrays and functions into pointers. */ ! if (TREE_CODE (arg_type) == ARRAY_TYPE) ! arg_type = build_pointer_type (TREE_TYPE (arg_type)); ! else if (TREE_CODE (arg_type) == FUNCTION_TYPE) ! arg_type = build_pointer_type (arg_type); ! ! chainon (arglist, build_tree_list (NULL_TREE, arg_type)); } ! if (METHOD_ADD_ARGS (meth)) { ! for (akey = TREE_CHAIN (METHOD_ADD_ARGS (meth)); ! akey; akey = TREE_CHAIN (akey)) ! { ! tree arg_type = TREE_TYPE (TREE_VALUE (akey)); ! ! chainon (arglist, build_tree_list (NULL_TREE, arg_type)); ! } ! ! if (!TREE_OVERFLOW (METHOD_ADD_ARGS (meth))) ! goto lack_of_ellipsis; } else ! { ! lack_of_ellipsis: ! chainon (arglist, OBJC_VOID_AT_END); ! } return arglist; } *************** check_duplicates (hash hsh, int methods, *** 5501,5507 **** different types. */ attr loop; ! warning ("multiple %s named `%c%s' found", methods ? "methods" : "selectors", (is_class ? '+' : '-'), IDENTIFIER_POINTER (METHOD_SEL_NAME (meth))); --- 5374,5380 ---- different types. */ attr loop; ! warning ("multiple %s named %<%c%s%> found", methods ? "methods" : "selectors", (is_class ? '+' : '-'), IDENTIFIER_POINTER (METHOD_SEL_NAME (meth))); *************** check_duplicates (hash hsh, int methods, *** 5523,5529 **** } /* If RECEIVER is a class reference, return the identifier node for ! the referenced class. RECEIVER is created by get_class_reference, so we check the exact form created depending on which runtimes are used. */ --- 5396,5402 ---- } /* If RECEIVER is a class reference, return the identifier node for ! the referenced class. RECEIVER is created by objc_get_class_reference, so we check the exact form created depending on which runtimes are used. */ *************** receiver_is_class_object (tree receiver, *** 5544,5551 **** { /* The receiver is a variable created by build_class_reference_decl. */ ! if (TREE_CODE (receiver) == VAR_DECL ! && TREE_TYPE (TREE_TYPE (receiver)) == TREE_TYPE (objc_class_type)) /* Look up the identifier. */ for (chain = cls_ref_chain; chain; chain = TREE_CHAIN (chain)) if (TREE_PURPOSE (chain) == receiver) --- 5417,5423 ---- { /* The receiver is a variable created by build_class_reference_decl. */ ! if (TREE_CODE (receiver) == VAR_DECL && IS_CLASS (TREE_TYPE (receiver))) /* Look up the identifier. */ for (chain = cls_ref_chain; chain; chain = TREE_CHAIN (chain)) if (TREE_PURPOSE (chain) == receiver) *************** receiver_is_class_object (tree receiver, *** 5560,5566 **** && (exp = TREE_OPERAND (exp, 0)) && TREE_CODE (exp) == FUNCTION_DECL /* For some reason, we sometimes wind up with multiple FUNCTION_DECL ! prototypes for objc_get_class(). Thankfuly, they seem to share the same function type. */ && TREE_TYPE (exp) == TREE_TYPE (objc_get_class_decl) && !strcmp (IDENTIFIER_POINTER (DECL_NAME (exp)), TAG_GETCLASS) --- 5432,5438 ---- && (exp = TREE_OPERAND (exp, 0)) && TREE_CODE (exp) == FUNCTION_DECL /* For some reason, we sometimes wind up with multiple FUNCTION_DECL ! prototypes for objc_get_class(). Thankfully, they seem to share the same function type. */ && TREE_TYPE (exp) == TREE_TYPE (objc_get_class_decl) && !strcmp (IDENTIFIER_POINTER (DECL_NAME (exp)), TAG_GETCLASS) *************** objc_message_selector (void) *** 5599,5609 **** (*((*)())_msgSuper)(receiver, selTransTbl[n], ...); */ tree ! build_message_expr (tree mess) { tree receiver = TREE_PURPOSE (mess); tree sel_name; tree args = TREE_VALUE (mess); tree method_params = NULL_TREE; if (TREE_CODE (receiver) == ERROR_MARK) --- 5471,5485 ---- (*((*)())_msgSuper)(receiver, selTransTbl[n], ...); */ tree ! objc_build_message_expr (tree mess) { tree receiver = TREE_PURPOSE (mess); tree sel_name; + #ifdef OBJCPLUS + tree args = TREE_PURPOSE (TREE_VALUE (mess)); + #else tree args = TREE_VALUE (mess); + #endif tree method_params = NULL_TREE; if (TREE_CODE (receiver) == ERROR_MARK) *************** build_message_expr (tree mess) *** 5620,5625 **** --- 5496,5504 ---- /* Build the parameter list to give to the method. */ if (TREE_CODE (args) == TREE_LIST) + #ifdef OBJCPLUS + method_params = chainon (args, TREE_VALUE (TREE_VALUE (mess))); + #else { tree chain = args, prev = NULL_TREE; *************** build_message_expr (tree mess) *** 5641,5646 **** --- 5520,5526 ---- } method_params = args; } + #endif #ifdef OBJCPLUS if (processing_template_decl) *************** build_message_expr (tree mess) *** 5649,5655 **** method_params); #endif ! return finish_message_expr (receiver, sel_name, method_params); } /* Look up method SEL_NAME that would be suitable for receiver --- 5529,5535 ---- method_params); #endif ! return objc_finish_message_expr (receiver, sel_name, method_params); } /* Look up method SEL_NAME that would be suitable for receiver *************** lookup_method_in_hash_lists (tree sel_na *** 5675,5690 **** return check_duplicates (method_prototype, 1, is_class); } ! /* The 'finish_message_expr' routine is called from within ! 'build_message_expr' for non-template functions. In the case of C++ template functions, it is called from 'build_expr_from_tree' (in decl2.c) after RECEIVER and METHOD_PARAMS have been expanded. */ tree ! finish_message_expr (tree receiver, tree sel_name, tree method_params) { tree method_prototype = NULL_TREE, rprotos = NULL_TREE, rtype; ! tree selector, retval, is_class; int self, super, have_cast; /* Extract the receiver of the message, as well as its type --- 5555,5570 ---- return check_duplicates (method_prototype, 1, is_class); } ! /* The 'objc_finish_message_expr' routine is called from within ! 'objc_build_message_expr' for non-template functions. In the case of C++ template functions, it is called from 'build_expr_from_tree' (in decl2.c) after RECEIVER and METHOD_PARAMS have been expanded. */ tree ! objc_finish_message_expr (tree receiver, tree sel_name, tree method_params) { tree method_prototype = NULL_TREE, rprotos = NULL_TREE, rtype; ! tree selector, retval, class_tree; int self, super, have_cast; /* Extract the receiver of the message, as well as its type *************** finish_message_expr (tree receiver, tree *** 5694,5699 **** --- 5574,5580 ---- while (TREE_CODE (rtype) == COMPOUND_EXPR || TREE_CODE (rtype) == MODIFY_EXPR || TREE_CODE (rtype) == NOP_EXPR + || TREE_CODE (rtype) == CONVERT_EXPR || TREE_CODE (rtype) == COMPONENT_REF) rtype = TREE_OPERAND (rtype, 0); self = (rtype == self_decl); *************** finish_message_expr (tree receiver, tree *** 5705,5724 **** /* If the receiver is a class object, retrieve the corresponding @interface, if one exists. */ ! is_class = receiver_is_class_object (receiver, self, super); /* Now determine the receiver type (if an explicit cast has not been provided). */ if (!have_cast) { ! if (is_class) ! rtype = lookup_interface (is_class); /* Handle `self' and `super'. */ else if (super) { if (!CLASS_SUPER_NAME (implementation_template)) { ! error ("no super class declared in @interface for `%s'", IDENTIFIER_POINTER (CLASS_NAME (implementation_template))); return error_mark_node; } --- 5586,5605 ---- /* If the receiver is a class object, retrieve the corresponding @interface, if one exists. */ ! class_tree = receiver_is_class_object (receiver, self, super); /* Now determine the receiver type (if an explicit cast has not been provided). */ if (!have_cast) { ! if (class_tree) ! rtype = lookup_interface (class_tree); /* Handle `self' and `super'. */ else if (super) { if (!CLASS_SUPER_NAME (implementation_template)) { ! error ("no super class declared in @interface for %qs", IDENTIFIER_POINTER (CLASS_NAME (implementation_template))); return error_mark_node; } *************** finish_message_expr (tree receiver, tree *** 5731,5757 **** /* If receiver is of type `id' or `Class' (or if the @interface for a class is not visible), we shall be satisfied with the existence of any instance or class method. */ ! if (!rtype || IS_ID (rtype) ! || TREE_TYPE (rtype) == TREE_TYPE (objc_class_type)) { if (!rtype) ! rtype = xref_tag (RECORD_TYPE, is_class); ! else if (IS_ID (rtype)) { ! rprotos = TYPE_PROTOCOL_LIST (rtype); rtype = NULL_TREE; } - else - is_class = TYPE_NAME (rtype) = get_identifier ("Class"); if (rprotos) ! method_prototype ! = lookup_method_in_protocol_list (rprotos, sel_name, ! is_class != NULL_TREE); ! if (!method_prototype && !rprotos) ! method_prototype ! = lookup_method_in_hash_lists (sel_name, ! is_class != NULL_TREE); } else { --- 5612,5652 ---- /* If receiver is of type `id' or `Class' (or if the @interface for a class is not visible), we shall be satisfied with the existence of any instance or class method. */ ! if (!rtype || objc_is_id (rtype)) { if (!rtype) ! rtype = xref_tag (RECORD_TYPE, class_tree); ! else { ! class_tree = (IS_CLASS (rtype) ? objc_class_name : NULL_TREE); ! rprotos = (TYPE_HAS_OBJC_INFO (TREE_TYPE (rtype)) ! ? TYPE_OBJC_PROTOCOL_LIST (TREE_TYPE (rtype)) ! : NULL_TREE); rtype = NULL_TREE; } if (rprotos) ! { ! /* If messaging 'id ' or 'Class ', first search ! in protocols themselves for the method prototype. */ ! method_prototype ! = lookup_method_in_protocol_list (rprotos, sel_name, ! class_tree != NULL_TREE); ! ! /* If messaging 'Class ' but did not find a class method ! prototype, search for an instance method instead, and warn ! about having done so. */ ! if (!method_prototype && !rtype && class_tree != NULL_TREE) ! { ! method_prototype ! = lookup_method_in_protocol_list (rprotos, sel_name, 0); ! ! if (method_prototype) ! warning ("found %<-%s%> instead of %<+%s%> in protocol(s)", ! IDENTIFIER_POINTER (sel_name), ! IDENTIFIER_POINTER (sel_name)); ! } ! } } else { *************** finish_message_expr (tree receiver, tree *** 5760,5780 **** if (TREE_CODE (rtype) == POINTER_TYPE) rtype = TREE_TYPE (rtype); /* Traverse typedef aliases */ ! while (TREE_CODE (rtype) == RECORD_TYPE && TYPE_NAME (rtype) ! && TREE_CODE (TYPE_NAME (rtype)) == TYPE_DECL ! && DECL_ORIGINAL_TYPE (TYPE_NAME (rtype))) ! rtype = DECL_ORIGINAL_TYPE (TYPE_NAME (rtype)); saved_rtype = rtype; if (TYPED_OBJECT (rtype)) { ! rprotos = TYPE_PROTOCOL_LIST (rtype); ! rtype = lookup_interface (OBJC_TYPE_NAME (rtype)); } /* If we could not find an @interface declaration, we must have only seen a @class declaration; so, we cannot say anything more intelligent about which methods the receiver will understand. */ ! if (!rtype) rtype = saved_rtype; else if (TREE_CODE (rtype) == CLASS_INTERFACE_TYPE || TREE_CODE (rtype) == CLASS_IMPLEMENTATION_TYPE) --- 5655,5675 ---- if (TREE_CODE (rtype) == POINTER_TYPE) rtype = TREE_TYPE (rtype); /* Traverse typedef aliases */ ! while (TREE_CODE (rtype) == RECORD_TYPE && OBJC_TYPE_NAME (rtype) ! && TREE_CODE (OBJC_TYPE_NAME (rtype)) == TYPE_DECL ! && DECL_ORIGINAL_TYPE (OBJC_TYPE_NAME (rtype))) ! rtype = DECL_ORIGINAL_TYPE (OBJC_TYPE_NAME (rtype)); saved_rtype = rtype; if (TYPED_OBJECT (rtype)) { ! rprotos = TYPE_OBJC_PROTOCOL_LIST (rtype); ! rtype = TYPE_OBJC_INTERFACE (rtype); } /* If we could not find an @interface declaration, we must have only seen a @class declaration; so, we cannot say anything more intelligent about which methods the receiver will understand. */ ! if (!rtype || TREE_CODE (rtype) == IDENTIFIER_NODE) rtype = saved_rtype; else if (TREE_CODE (rtype) == CLASS_INTERFACE_TYPE || TREE_CODE (rtype) == CLASS_IMPLEMENTATION_TYPE) *************** finish_message_expr (tree receiver, tree *** 5783,5789 **** in the published @interface for the class (and its superclasses). */ method_prototype ! = lookup_method_static (rtype, sel_name, is_class != NULL_TREE); /* If the method was not found in the @interface, it may still exist locally as part of the @implementation. */ --- 5678,5684 ---- in the published @interface for the class (and its superclasses). */ method_prototype ! = lookup_method_static (rtype, sel_name, class_tree != NULL_TREE); /* If the method was not found in the @interface, it may still exist locally as part of the @implementation. */ *************** finish_message_expr (tree receiver, tree *** 5792,5798 **** == OBJC_TYPE_NAME (rtype)) method_prototype = lookup_method ! ((is_class ? CLASS_CLS_METHODS (objc_implementation_context) : CLASS_NST_METHODS (objc_implementation_context)), sel_name); --- 5687,5693 ---- == OBJC_TYPE_NAME (rtype)) method_prototype = lookup_method ! ((class_tree ? CLASS_CLS_METHODS (objc_implementation_context) : CLASS_NST_METHODS (objc_implementation_context)), sel_name); *************** finish_message_expr (tree receiver, tree *** 5802,5835 **** if (!method_prototype && rprotos) method_prototype = lookup_method_in_protocol_list (rprotos, sel_name, ! is_class != NULL_TREE); } else { ! warning ("invalid receiver type `%s'", ! gen_declaration (orig_rtype, errbuf)); rtype = rprotos = NULL_TREE; } } if (!method_prototype) { static bool warn_missing_methods = false; if (rtype) ! warning ("`%s' may not respond to `%c%s'", IDENTIFIER_POINTER (OBJC_TYPE_NAME (rtype)), ! (is_class ? '+' : '-'), IDENTIFIER_POINTER (sel_name)); ! if (rprotos) ! warning ("`%c%s' not implemented by protocol(s)", ! (is_class ? '+' : '-'), IDENTIFIER_POINTER (sel_name)); if (!warn_missing_methods) { warning ("(Messages without a matching method signature"); ! warning ("will be assumed to return `id' and accept"); ! warning ("`...' as arguments.)"); warn_missing_methods = true; } } --- 5697,5752 ---- if (!method_prototype && rprotos) method_prototype = lookup_method_in_protocol_list (rprotos, sel_name, ! class_tree != NULL_TREE); } else { ! warning ("invalid receiver type %qs", ! gen_type_name (orig_rtype)); ! /* After issuing the "invalid receiver" warning, perform method ! lookup as if we were messaging 'id'. */ rtype = rprotos = NULL_TREE; } } + + /* For 'id' or 'Class' receivers, search in the global hash table + as a last resort. For all receivers, warn if protocol searches + have failed. */ + if (!method_prototype) + { + if (rprotos) + warning ("%<%c%s%> not found in protocol(s)", + (class_tree ? '+' : '-'), + IDENTIFIER_POINTER (sel_name)); + + if (!rtype) + method_prototype + = lookup_method_in_hash_lists (sel_name, class_tree != NULL_TREE); + } + if (!method_prototype) { static bool warn_missing_methods = false; if (rtype) ! warning ("%qs may not respond to %<%c%s%>", IDENTIFIER_POINTER (OBJC_TYPE_NAME (rtype)), ! (class_tree ? '+' : '-'), IDENTIFIER_POINTER (sel_name)); ! /* If we are messaging an 'id' or 'Class' object and made it here, ! then we have failed to find _any_ instance or class method, ! respectively. */ ! else ! warning ("no %<%c%s%> method found", ! (class_tree ? '+' : '-'), IDENTIFIER_POINTER (sel_name)); + if (!warn_missing_methods) { warning ("(Messages without a matching method signature"); ! warning ("will be assumed to return % and accept"); ! warning ("%<...%> as arguments.)"); warn_missing_methods = true; } } *************** build_objc_method_call (int super_flag, *** 5870,5892 **** (!flag_next_runtime || flag_nil_receivers ? umsg_decl : umsg_nonnil_decl)); ! tree rcv_p = (super_flag ? super_type : id_type); /* If a prototype for the method to be called exists, then cast the sender's return type and arguments to match that of the method. Otherwise, leave sender as is. */ tree ret_type = (method_prototype ! ? groktypename (TREE_TYPE (method_prototype)) ! : id_type); tree sender_cast = build_pointer_type (build_function_type (ret_type, get_arg_type_list (method_prototype, METHOD_REF, super_flag))); lookup_object = build_c_cast (rcv_p, lookup_object); if (flag_next_runtime) { --- 5787,5813 ---- (!flag_next_runtime || flag_nil_receivers ? umsg_decl : umsg_nonnil_decl)); ! tree rcv_p = (super_flag ? objc_super_type : objc_object_type); /* If a prototype for the method to be called exists, then cast the sender's return type and arguments to match that of the method. Otherwise, leave sender as is. */ tree ret_type = (method_prototype ! ? TREE_VALUE (TREE_TYPE (method_prototype)) ! : objc_object_type); tree sender_cast = build_pointer_type (build_function_type (ret_type, get_arg_type_list (method_prototype, METHOD_REF, super_flag))); + tree method, t; lookup_object = build_c_cast (rcv_p, lookup_object); + + /* Use SAVE_EXPR to avoid evaluating the receiver twice. */ + lookup_object = save_expr (lookup_object); if (flag_next_runtime) { *************** build_objc_method_call (int super_flag, *** 5905,5970 **** method_params = tree_cons (NULL_TREE, lookup_object, tree_cons (NULL_TREE, selector, method_params)); ! TREE_USED (sender) = 1; ! assemble_external (sender); ! /* We want to cast the sender, not convert it. */ ! return build_function_call (build_c_cast (sender_cast, sender), ! method_params); } else { /* This is the portable (GNU) way. */ ! tree method, object; /* First, call the lookup function to get a pointer to the method, ! then cast the pointer, then call it with the method arguments. ! Use SAVE_EXPR to avoid evaluating the receiver twice. */ ! lookup_object = save_expr (lookup_object); object = (super_flag ? self_decl : lookup_object); ! TREE_USED (sender) = 1; ! assemble_external (sender); ! method ! = build_function_call (sender, ! tree_cons (NULL_TREE, lookup_object, ! tree_cons (NULL_TREE, selector, ! NULL_TREE))); /* Pass the object to the method. */ ! TREE_USED (method) = 1; ! assemble_external (method); ! return build_function_call ! (build_c_cast (sender_cast, method), ! tree_cons (NULL_TREE, object, ! tree_cons (NULL_TREE, selector, method_params))); } } static void build_protocol_reference (tree p) { ! tree decl, ident, ptype; ! ! /* static struct objc_protocol _OBJC_PROTOCOL_; */ ! ! ident = synth_id_with_class_suffix ("_OBJC_PROTOCOL", p); ! ptype ! = groktypename (build_tree_list (build_tree_list (NULL_TREE, ! objc_protocol_template), ! NULL_TREE)); ! if (identifier_global_value (ident)) ! decl = identifier_global_value (ident); /* Set by pushdecl. */ ! else ! { ! decl = build_decl (VAR_DECL, ident, ptype); ! DECL_EXTERNAL (decl) = 1; ! TREE_PUBLIC (decl) = 0; ! TREE_USED (decl) = 1; ! DECL_ARTIFICIAL (decl) = 1; ! make_decl_rtl (decl, 0); ! pushdecl_top_level (decl); ! } PROTOCOL_FORWARD_DECL (p) = decl; } --- 5826,5869 ---- method_params = tree_cons (NULL_TREE, lookup_object, tree_cons (NULL_TREE, selector, method_params)); ! method = build_fold_addr_expr (sender); } else { /* This is the portable (GNU) way. */ ! tree object; /* First, call the lookup function to get a pointer to the method, ! then cast the pointer, then call it with the method arguments. */ ! object = (super_flag ? self_decl : lookup_object); ! ! t = tree_cons (NULL_TREE, selector, NULL_TREE); ! t = tree_cons (NULL_TREE, lookup_object, t); ! method = build_function_call (sender, t); /* Pass the object to the method. */ ! method_params = tree_cons (NULL_TREE, object, ! tree_cons (NULL_TREE, selector, ! method_params)); } + + /* ??? Selector is not at this point something we can use inside + the compiler itself. Set it to garbage for the nonce. */ + t = build (OBJ_TYPE_REF, sender_cast, method, lookup_object, size_zero_node); + return build_function_call (t, method_params); } static void build_protocol_reference (tree p) { ! tree decl; ! const char *proto_name; ! /* static struct _objc_protocol _OBJC_PROTOCOL_; */ ! proto_name = synth_id_with_class_suffix ("_OBJC_PROTOCOL", p); ! decl = start_var_decl (objc_protocol_template, proto_name); PROTOCOL_FORWARD_DECL (p) = decl; } *************** build_protocol_reference (tree p) *** 5972,5985 **** /* This function is called by the parser when (and only when) a @protocol() expression is found, in order to compile it. */ tree ! build_protocol_expr (tree protoname) { tree expr; tree p = lookup_protocol (protoname); if (!p) { ! error ("cannot find protocol declaration for `%s'", IDENTIFIER_POINTER (protoname)); return error_mark_node; } --- 5871,5884 ---- /* This function is called by the parser when (and only when) a @protocol() expression is found, in order to compile it. */ tree ! objc_build_protocol_expr (tree protoname) { tree expr; tree p = lookup_protocol (protoname); if (!p) { ! error ("cannot find protocol declaration for %qs", IDENTIFIER_POINTER (protoname)); return error_mark_node; } *************** build_protocol_expr (tree protoname) *** 5989,5995 **** expr = build_unary_op (ADDR_EXPR, PROTOCOL_FORWARD_DECL (p), 0); ! TREE_TYPE (expr) = protocol_type; /* The @protocol() expression is being compiled into a pointer to a statically allocated instance of the Protocol class. To become --- 5888,5896 ---- expr = build_unary_op (ADDR_EXPR, PROTOCOL_FORWARD_DECL (p), 0); ! /* ??? Ideally we'd build the reference with objc_protocol_type directly, ! if we have it, rather than converting it here. */ ! expr = convert (objc_protocol_type, expr); /* The @protocol() expression is being compiled into a pointer to a statically allocated instance of the Protocol class. To become *************** build_protocol_expr (tree protoname) *** 6007,6013 **** if (! flag_next_runtime) { /* This type is a struct containing the fields of a Protocol ! object. (Cfr. protocol_type instead is the type of a pointer to such a struct). */ tree protocol_struct_type = xref_tag (RECORD_TYPE, get_identifier (PROTOCOL_OBJECT_CLASS_NAME)); --- 5908,5914 ---- if (! flag_next_runtime) { /* This type is a struct containing the fields of a Protocol ! object. (Cfr. objc_protocol_type instead is the type of a pointer to such a struct). */ tree protocol_struct_type = xref_tag (RECORD_TYPE, get_identifier (PROTOCOL_OBJECT_CLASS_NAME)); *************** build_protocol_expr (tree protoname) *** 6042,6048 **** is found, in order to compile it. It is only called by the parser and only to compile a @selector(). */ tree ! build_selector_expr (tree selnamelist) { tree selname; --- 5943,5949 ---- is found, in order to compile it. It is only called by the parser and only to compile a @selector(). */ tree ! objc_build_selector_expr (tree selnamelist) { tree selname; *************** build_selector_expr (tree selnamelist) *** 6076,6082 **** /* If still not found, print out a warning. */ if (!hsh) { ! warning ("undeclared selector `%s'", IDENTIFIER_POINTER (selname)); } } --- 5977,5983 ---- /* If still not found, print out a warning. */ if (!hsh) { ! warning ("undeclared selector %qs", IDENTIFIER_POINTER (selname)); } } *************** build_selector_expr (tree selnamelist) *** 6088,6094 **** } tree ! build_encode_expr (tree type) { tree result; const char *string; --- 5989,5995 ---- } tree ! objc_build_encode_expr (tree type) { tree result; const char *string; *************** build_encode_expr (tree type) *** 6104,6110 **** return result; } ! tree build_ivar_reference (tree id) { if (TREE_CODE (objc_method_context) == CLASS_METHOD_DECL) --- 6005,6011 ---- return result; } ! static tree build_ivar_reference (tree id) { if (TREE_CODE (objc_method_context) == CLASS_METHOD_DECL) *************** build_ivar_reference (tree id) *** 6118,6126 **** to an instance variable. It's better to catch the cases where this is done unknowingly than to support the above paradigm. */ ! warning ("instance variable `%s' accessed in class method", IDENTIFIER_POINTER (id)); ! TREE_TYPE (self_decl) = instance_type; /* cast */ } return build_component_ref (build_indirect_ref (self_decl, "->"), id); --- 6019,6027 ---- to an instance variable. It's better to catch the cases where this is done unknowingly than to support the above paradigm. */ ! warning ("instance variable %qs accessed in class method", IDENTIFIER_POINTER (id)); ! self_decl = convert (objc_instance_type, self_decl); /* cast */ } return build_component_ref (build_indirect_ref (self_decl, "->"), id); *************** hash_init (void) *** 6147,6152 **** --- 6048,6057 ---- = (hash *) ggc_alloc_cleared (SIZEHASHTABLE * sizeof (hash)); cls_method_hash_list = (hash *) ggc_alloc_cleared (SIZEHASHTABLE * sizeof (hash)); + + /* Initialize the hash table used to hold the constant string objects. */ + string_htab = htab_create_ggc (31, string_hash, + string_eq, NULL); } /* WARNING!!!! hash_enter is called with a method, and will peek *************** add_method_to_hash_list (hash *hash_list *** 6295,6306 **** } } ! tree objc_add_method (tree class, tree method, int is_class) { tree mth; ! if (!(mth = lookup_method (is_class ? CLASS_CLS_METHODS (class) : CLASS_NST_METHODS (class), method))) { /* put method on list in reverse order */ if (is_class) --- 6200,6213 ---- } } ! static tree objc_add_method (tree class, tree method, int is_class) { tree mth; ! if (!(mth = lookup_method (is_class ! ? CLASS_CLS_METHODS (class) ! : CLASS_NST_METHODS (class), method))) { /* put method on list in reverse order */ if (is_class) *************** objc_add_method (tree class, tree method *** 6324,6331 **** if ((TREE_CODE (class) == CLASS_INTERFACE_TYPE || TREE_CODE (class) == CATEGORY_INTERFACE_TYPE) && !comp_proto_with_proto (method, mth)) ! error ("duplicate declaration of method `%c%s'", ! is_class ? '+' : '-', IDENTIFIER_POINTER (METHOD_SEL_NAME (mth))); } if (is_class) --- 6231,6239 ---- if ((TREE_CODE (class) == CLASS_INTERFACE_TYPE || TREE_CODE (class) == CATEGORY_INTERFACE_TYPE) && !comp_proto_with_proto (method, mth)) ! error ("duplicate declaration of method %<%c%s%>", ! is_class ? '+' : '-', ! IDENTIFIER_POINTER (METHOD_SEL_NAME (mth))); } if (is_class) *************** objc_add_method (tree class, tree method *** 6335,6347 **** add_method_to_hash_list (nst_method_hash_list, method); /* Instance methods in root classes (and categories thereof) ! may acts as class methods as a last resort. */ if (TREE_CODE (class) == CATEGORY_INTERFACE_TYPE || TREE_CODE (class) == CATEGORY_IMPLEMENTATION_TYPE) class = lookup_interface (CLASS_NAME (class)); ! if (TREE_CODE (class) != PROTOCOL_INTERFACE_TYPE ! && !CLASS_SUPER_NAME (class)) add_method_to_hash_list (cls_method_hash_list, method); } --- 6243,6258 ---- add_method_to_hash_list (nst_method_hash_list, method); /* Instance methods in root classes (and categories thereof) ! may act as class methods as a last resort. We also add ! instance methods listed in @protocol declarations to ! the class hash table, on the assumption that @protocols ! may be adopted by root classes or categories. */ if (TREE_CODE (class) == CATEGORY_INTERFACE_TYPE || TREE_CODE (class) == CATEGORY_IMPLEMENTATION_TYPE) class = lookup_interface (CLASS_NAME (class)); ! if (TREE_CODE (class) == PROTOCOL_INTERFACE_TYPE ! || !CLASS_SUPER_NAME (class)) add_method_to_hash_list (cls_method_hash_list, method); } *************** add_category (tree class, tree category) *** 6365,6371 **** if (cat) { ! warning ("duplicate interface declaration for category `%s(%s)'", IDENTIFIER_POINTER (CLASS_NAME (class)), IDENTIFIER_POINTER (CLASS_SUPER_NAME (category))); } --- 6276,6282 ---- if (cat) { ! warning ("duplicate interface declaration for category %<%s(%s)%>", IDENTIFIER_POINTER (CLASS_NAME (class)), IDENTIFIER_POINTER (CLASS_SUPER_NAME (category))); } *************** add_category (tree class, tree category) *** 6381,6401 **** PUBLIC is 1 for public, 0 for protected, and 2 for private. */ ! tree ! add_instance_variable (tree class, int public, tree declarator, ! tree declspecs, tree width) { - tree field_decl = grokfield (declarator, declspecs, width); tree field_type = TREE_TYPE (field_decl); const char *ivar_name = DECL_NAME (field_decl) ? IDENTIFIER_POINTER (DECL_NAME (field_decl)) : ""; - tree raw_decl; #ifdef OBJCPLUS if (TREE_CODE (field_type) == REFERENCE_TYPE) { ! error ("illegal reference type specified for instance variable `%s'", ivar_name); /* Return class as is without adding this ivar. */ return class; --- 6292,6309 ---- PUBLIC is 1 for public, 0 for protected, and 2 for private. */ ! static tree ! add_instance_variable (tree class, int public, tree field_decl) { tree field_type = TREE_TYPE (field_decl); const char *ivar_name = DECL_NAME (field_decl) ? IDENTIFIER_POINTER (DECL_NAME (field_decl)) : ""; #ifdef OBJCPLUS if (TREE_CODE (field_type) == REFERENCE_TYPE) { ! error ("illegal reference type specified for instance variable %qs", ivar_name); /* Return class as is without adding this ivar. */ return class; *************** add_instance_variable (tree class, int p *** 6403,6417 **** #endif if (field_type == error_mark_node || !TYPE_SIZE (field_type) ! || TYPE_SIZE (field_type) == error_mark_node /* 'type[0]' is allowed, but 'type[]' is not! */ - #ifdef OBJCPLUS - || (TYPE_SIZE (field_type) == bitsize_zero_node - && !TREE_OPERAND (declarator, 1)) - #endif - ) { ! error ("instance variable `%s' has unknown size", ivar_name); /* Return class as is without adding this ivar. */ return class; } --- 6311,6320 ---- #endif if (field_type == error_mark_node || !TYPE_SIZE (field_type) ! || TYPE_SIZE (field_type) == error_mark_node) /* 'type[0]' is allowed, but 'type[]' is not! */ { ! error ("instance variable %qs has unknown size", ivar_name); /* Return class as is without adding this ivar. */ return class; } *************** add_instance_variable (tree class, int p *** 6425,6432 **** const char *type_name = IDENTIFIER_POINTER (OBJC_TYPE_NAME (field_type)); if(TYPE_POLYMORPHIC_P (field_type)) { /* vtable pointers are Real Bad(tm), since Obj-C cannot initialize them */ ! error ("type `%s' has virtual member functions", type_name); ! error ("illegal aggregate type `%s' specified for instance variable `%s'", type_name, ivar_name); /* Return class as is without adding this ivar. */ return class; --- 6328,6335 ---- const char *type_name = IDENTIFIER_POINTER (OBJC_TYPE_NAME (field_type)); if(TYPE_POLYMORPHIC_P (field_type)) { /* vtable pointers are Real Bad(tm), since Obj-C cannot initialize them */ ! error ("type %qs has virtual member functions", type_name); ! error ("illegal aggregate type %qs specified for instance variable %qs", type_name, ivar_name); /* Return class as is without adding this ivar. */ return class; *************** add_instance_variable (tree class, int p *** 6434,6442 **** /* user-defined constructors and destructors are not known to Obj-C and hence will not be called. This may or may not be a problem. */ if (TYPE_NEEDS_CONSTRUCTING (field_type)) ! warning ("type `%s' has a user-defined constructor", type_name); if (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (field_type)) ! warning ("type `%s' has a user-defined destructor", type_name); warning ("C++ constructors and destructors will not be invoked for Objective-C fields"); } #endif --- 6337,6345 ---- /* user-defined constructors and destructors are not known to Obj-C and hence will not be called. This may or may not be a problem. */ if (TYPE_NEEDS_CONSTRUCTING (field_type)) ! warning ("type %qs has a user-defined constructor", type_name); if (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (field_type)) ! warning ("type %qs has a user-defined destructor", type_name); warning ("C++ constructors and destructors will not be invoked for Objective-C fields"); } #endif *************** add_instance_variable (tree class, int p *** 6464,6476 **** } ! raw_decl = build_tree_list (declspecs, build_tree_list (declarator, width)); ! CLASS_RAW_IVARS (class) = chainon (CLASS_RAW_IVARS (class), raw_decl); ! CLASS_IVARS (class) = chainon (CLASS_IVARS (class), field_decl); return class; } ! tree is_ivar (tree decl_chain, tree ident) { for ( ; decl_chain; decl_chain = TREE_CHAIN (decl_chain)) --- 6367,6378 ---- } ! CLASS_RAW_IVARS (class) = chainon (CLASS_RAW_IVARS (class), field_decl); ! return class; } ! static tree is_ivar (tree decl_chain, tree ident) { for ( ; decl_chain; decl_chain = TREE_CHAIN (decl_chain)) *************** is_ivar (tree decl_chain, tree ident) *** 6481,6487 **** /* True if the ivar is private and we are not in its implementation. */ ! int is_private (tree decl) { return (TREE_PRIVATE (decl) --- 6383,6389 ---- /* True if the ivar is private and we are not in its implementation. */ ! static int is_private (tree decl) { return (TREE_PRIVATE (decl) *************** is_private (tree decl) *** 6492,6498 **** /* We have an instance variable reference;, check to see if it is public. */ int ! is_public (tree expr, tree identifier) { tree basetype = TREE_TYPE (expr); enum tree_code code = TREE_CODE (basetype); --- 6394,6400 ---- /* We have an instance variable reference;, check to see if it is public. */ int ! objc_is_public (tree expr, tree identifier) { tree basetype = TREE_TYPE (expr); enum tree_code code = TREE_CODE (basetype); *************** is_public (tree expr, tree identifier) *** 6500,6510 **** if (code == RECORD_TYPE) { ! if (TREE_STATIC_TEMPLATE (basetype)) { ! if (!lookup_interface (OBJC_TYPE_NAME (basetype))) { ! error ("cannot find interface declaration for `%s'", IDENTIFIER_POINTER (OBJC_TYPE_NAME (basetype))); return 0; } --- 6402,6412 ---- if (code == RECORD_TYPE) { ! if (TYPE_HAS_OBJC_INFO (basetype) && TYPE_OBJC_INTERFACE (basetype)) { ! if (TREE_CODE (TYPE_OBJC_INTERFACE (basetype)) == IDENTIFIER_NODE) { ! error ("cannot find interface declaration for %qs", IDENTIFIER_POINTER (OBJC_TYPE_NAME (basetype))); return 0; } *************** is_public (tree expr, tree identifier) *** 6528,6534 **** int private = is_private (decl); if (private) ! error ("instance variable `%s' is declared private", IDENTIFIER_POINTER (DECL_NAME (decl))); return !private; } --- 6430,6436 ---- int private = is_private (decl); if (private) ! error ("instance variable %qs is declared private", IDENTIFIER_POINTER (DECL_NAME (decl))); return !private; } *************** is_public (tree expr, tree identifier) *** 6537,6550 **** non-@public ivars. We will let this slide for now... */ if (!objc_method_context) { ! warning ("instance variable `%s' is %s; " "this will be a hard error in the future", IDENTIFIER_POINTER (identifier), TREE_PRIVATE (decl) ? "@private" : "@protected"); return 1; } ! error ("instance variable `%s' is declared %s", IDENTIFIER_POINTER (identifier), TREE_PRIVATE (decl) ? "private" : "protected"); return 0; --- 6439,6452 ---- non-@public ivars. We will let this slide for now... */ if (!objc_method_context) { ! warning ("instance variable %qs is %s; " "this will be a hard error in the future", IDENTIFIER_POINTER (identifier), TREE_PRIVATE (decl) ? "@private" : "@protected"); return 1; } ! error ("instance variable %qs is declared %s", IDENTIFIER_POINTER (identifier), TREE_PRIVATE (decl) ? "private" : "protected"); return 0; *************** is_public (tree expr, tree identifier) *** 6553,6560 **** else if (objc_implementation_context && (basetype == objc_object_reference)) { ! TREE_TYPE (expr) = uprivate_record; ! warning ("static access to object of type `id'"); } } --- 6455,6462 ---- else if (objc_implementation_context && (basetype == objc_object_reference)) { ! expr = convert (uprivate_record, expr); ! warning ("static access to object of type %"); } } *************** check_methods (tree chain, tree list, in *** 6576,6591 **** { if (TREE_CODE (objc_implementation_context) == CLASS_IMPLEMENTATION_TYPE) ! warning ("incomplete implementation of class `%s'", IDENTIFIER_POINTER (CLASS_NAME (objc_implementation_context))); else if (TREE_CODE (objc_implementation_context) == CATEGORY_IMPLEMENTATION_TYPE) ! warning ("incomplete implementation of category `%s'", IDENTIFIER_POINTER (CLASS_SUPER_NAME (objc_implementation_context))); first = 0; } ! warning ("method definition for `%c%s' not found", mtype, IDENTIFIER_POINTER (METHOD_SEL_NAME (chain))); } --- 6478,6493 ---- { if (TREE_CODE (objc_implementation_context) == CLASS_IMPLEMENTATION_TYPE) ! warning ("incomplete implementation of class %qs", IDENTIFIER_POINTER (CLASS_NAME (objc_implementation_context))); else if (TREE_CODE (objc_implementation_context) == CATEGORY_IMPLEMENTATION_TYPE) ! warning ("incomplete implementation of category %qs", IDENTIFIER_POINTER (CLASS_SUPER_NAME (objc_implementation_context))); first = 0; } ! warning ("method definition for %<%c%s%> not found", mtype, IDENTIFIER_POINTER (METHOD_SEL_NAME (chain))); } *************** check_methods_accessible (tree chain, tr *** 6664,6680 **** { if (TREE_CODE (objc_implementation_context) == CLASS_IMPLEMENTATION_TYPE) ! warning ("incomplete implementation of class `%s'", IDENTIFIER_POINTER (CLASS_NAME (objc_implementation_context))); else if (TREE_CODE (objc_implementation_context) == CATEGORY_IMPLEMENTATION_TYPE) ! warning ("incomplete implementation of category `%s'", IDENTIFIER_POINTER (CLASS_SUPER_NAME (objc_implementation_context))); first = 0; } ! warning ("method definition for `%c%s' not found", mtype, IDENTIFIER_POINTER (METHOD_SEL_NAME (chain))); } --- 6566,6582 ---- { if (TREE_CODE (objc_implementation_context) == CLASS_IMPLEMENTATION_TYPE) ! warning ("incomplete implementation of class %qs", IDENTIFIER_POINTER (CLASS_NAME (objc_implementation_context))); else if (TREE_CODE (objc_implementation_context) == CATEGORY_IMPLEMENTATION_TYPE) ! warning ("incomplete implementation of category %qs", IDENTIFIER_POINTER (CLASS_SUPER_NAME (objc_implementation_context))); first = 0; } ! warning ("method definition for %<%c%s%> not found", mtype, IDENTIFIER_POINTER (METHOD_SEL_NAME (chain))); } *************** check_protocol (tree p, const char *type *** 6715,6721 **** } if (!f1 || !f2) ! warning ("%s `%s' does not fully implement the `%s' protocol", type, name, IDENTIFIER_POINTER (PROTOCOL_NAME (p))); } --- 6617,6623 ---- } if (!f1 || !f2) ! warning ("%s %qs does not fully implement the %qs protocol", type, name, IDENTIFIER_POINTER (PROTOCOL_NAME (p))); } *************** check_protocols (tree proto_list, const *** 6759,6765 **** It can be CLASS_INTERFACE_TYPE, CLASS_IMPLEMENTATION_TYPE, CATEGORY_INTERFACE_TYPE, or CATEGORY_IMPLEMENTATION_TYPE. */ ! tree start_class (enum tree_code code, tree class_name, tree super_name, tree protocol_list) { --- 6661,6667 ---- It can be CLASS_INTERFACE_TYPE, CLASS_IMPLEMENTATION_TYPE, CATEGORY_INTERFACE_TYPE, or CATEGORY_IMPLEMENTATION_TYPE. */ ! static tree start_class (enum tree_code code, tree class_name, tree super_name, tree protocol_list) { *************** start_class (enum tree_code code, tree c *** 6773,6798 **** if (objc_implementation_context) { ! warning ("`@end' missing in implementation context"); finish_class (objc_implementation_context); objc_ivar_chain = NULL_TREE; objc_implementation_context = NULL_TREE; } class = make_node (code); ! TYPE_BINFO (class) = make_tree_vec (CLASS_BINFO_ELTS); CLASS_NAME (class) = class_name; CLASS_SUPER_NAME (class) = super_name; CLASS_CLS_METHODS (class) = NULL_TREE; ! if (! is_class_name (class_name) && (decl = lookup_name (class_name))) { ! error ("`%s' redeclared as different kind of symbol", IDENTIFIER_POINTER (class_name)); error ("%Jprevious declaration of '%D'", ! decl, decl); } if (code == CLASS_IMPLEMENTATION_TYPE) --- 6675,6710 ---- if (objc_implementation_context) { ! warning ("%<@end%> missing in implementation context"); finish_class (objc_implementation_context); objc_ivar_chain = NULL_TREE; objc_implementation_context = NULL_TREE; } class = make_node (code); ! TYPE_LANG_SLOT_1 (class) = make_tree_vec (CLASS_LANG_SLOT_ELTS); ! ! /* Check for existence of the super class, if one was specified. */ ! if ((code == CLASS_INTERFACE_TYPE || code == CLASS_IMPLEMENTATION_TYPE) ! && super_name && !objc_is_class_name (super_name)) ! { ! error ("cannot find interface declaration for %qs, superclass of %qs", ! IDENTIFIER_POINTER (super_name), ! IDENTIFIER_POINTER (class_name)); ! super_name = NULL_TREE; ! } CLASS_NAME (class) = class_name; CLASS_SUPER_NAME (class) = super_name; CLASS_CLS_METHODS (class) = NULL_TREE; ! if (! objc_is_class_name (class_name) && (decl = lookup_name (class_name))) { ! error ("%qs redeclared as different kind of symbol", IDENTIFIER_POINTER (class_name)); error ("%Jprevious declaration of '%D'", ! decl, decl); } if (code == CLASS_IMPLEMENTATION_TYPE) *************** start_class (enum tree_code code, tree c *** 6803,6809 **** for (chain = implemented_classes; chain; chain = TREE_CHAIN (chain)) if (TREE_VALUE (chain) == class_name) { ! error ("reimplementation of class `%s'", IDENTIFIER_POINTER (class_name)); return error_mark_node; } --- 6715,6721 ---- for (chain = implemented_classes; chain; chain = TREE_CHAIN (chain)) if (TREE_VALUE (chain) == class_name) { ! error ("reimplementation of class %qs", IDENTIFIER_POINTER (class_name)); return error_mark_node; } *************** start_class (enum tree_code code, tree c *** 6820,6826 **** if (!(implementation_template = lookup_interface (class_name))) { ! warning ("cannot find interface declaration for `%s'", IDENTIFIER_POINTER (class_name)); add_class (implementation_template = objc_implementation_context); } --- 6732,6738 ---- if (!(implementation_template = lookup_interface (class_name))) { ! warning ("cannot find interface declaration for %qs", IDENTIFIER_POINTER (class_name)); add_class (implementation_template = objc_implementation_context); } *************** start_class (enum tree_code code, tree c *** 6834,6842 **** tree previous_name = CLASS_SUPER_NAME (implementation_template); const char *const name = previous_name ? IDENTIFIER_POINTER (previous_name) : ""; ! error ("conflicting super class name `%s'", IDENTIFIER_POINTER (super_name)); ! error ("previous declaration of `%s'", name); } else if (! super_name) --- 6746,6754 ---- tree previous_name = CLASS_SUPER_NAME (implementation_template); const char *const name = previous_name ? IDENTIFIER_POINTER (previous_name) : ""; ! error ("conflicting super class name %qs", IDENTIFIER_POINTER (super_name)); ! error ("previous declaration of %qs", name); } else if (! super_name) *************** start_class (enum tree_code code, tree c *** 6850,6858 **** { if (lookup_interface (class_name)) #ifdef OBJCPLUS ! error ("duplicate interface declaration for class `%s'", #else ! warning ("duplicate interface declaration for class `%s'", #endif IDENTIFIER_POINTER (class_name)); else --- 6762,6770 ---- { if (lookup_interface (class_name)) #ifdef OBJCPLUS ! error ("duplicate interface declaration for class %qs", #else ! warning ("duplicate interface declaration for class %qs", #endif IDENTIFIER_POINTER (class_name)); else *************** start_class (enum tree_code code, tree c *** 6873,6879 **** if (!(class_category_is_assoc_with = lookup_interface (class_name))) { ! error ("cannot find interface declaration for `%s'", IDENTIFIER_POINTER (class_name)); exit (FATAL_EXIT_CODE); } --- 6785,6791 ---- if (!(class_category_is_assoc_with = lookup_interface (class_name))) { ! error ("cannot find interface declaration for %qs", IDENTIFIER_POINTER (class_name)); exit (FATAL_EXIT_CODE); } *************** start_class (enum tree_code code, tree c *** 6898,6904 **** if (!(implementation_template = lookup_interface (class_name))) { ! error ("cannot find interface declaration for `%s'", IDENTIFIER_POINTER (class_name)); exit (FATAL_EXIT_CODE); } --- 6810,6816 ---- if (!(implementation_template = lookup_interface (class_name))) { ! error ("cannot find interface declaration for %qs", IDENTIFIER_POINTER (class_name)); exit (FATAL_EXIT_CODE); } *************** start_class (enum tree_code code, tree c *** 6906,6912 **** return class; } ! tree continue_class (tree class) { if (TREE_CODE (class) == CLASS_IMPLEMENTATION_TYPE --- 6818,6824 ---- return class; } ! static tree continue_class (tree class) { if (TREE_CODE (class) == CLASS_IMPLEMENTATION_TYPE *************** continue_class (tree class) *** 6917,6931 **** /* Check consistency of the instance variables. */ ! if (CLASS_IVARS (class)) check_ivars (implementation_template, class); /* code generation */ ! ivar_context = build_private_template (implementation_template); ! if (!objc_class_template) ! build_class_template (); imp_entry = (struct imp_entry *) ggc_alloc (sizeof (struct imp_entry)); --- 6829,6847 ---- /* Check consistency of the instance variables. */ ! if (CLASS_RAW_IVARS (class)) check_ivars (implementation_template, class); /* code generation */ ! #ifdef OBJCPLUS ! push_lang_context (lang_name_c); ! #endif ! build_private_template (implementation_template); ! uprivate_record = CLASS_STATIC_TEMPLATE (implementation_template); ! ivar_context = TYPE_FIELDS (uprivate_record); ! objc_instance_type = build_pointer_type (uprivate_record); imp_entry = (struct imp_entry *) ggc_alloc (sizeof (struct imp_entry)); *************** continue_class (tree class) *** 6944,6963 **** else cat_count++; return ivar_context; } else if (TREE_CODE (class) == CLASS_INTERFACE_TYPE) { ! if (!CLASS_STATIC_TEMPLATE (class)) ! { ! tree record = start_struct (RECORD_TYPE, CLASS_NAME (class)); ! finish_struct (record, get_class_ivars (class, 0), NULL_TREE); ! CLASS_STATIC_TEMPLATE (class) = record; ! /* Mark this record as a class template for static typing. */ ! TREE_STATIC_TEMPLATE (record) = 1; ! } return NULL_TREE; } --- 6860,6883 ---- else cat_count++; + #ifdef OBJCPLUS + pop_lang_context (); + #endif /* OBJCPLUS */ + return ivar_context; } else if (TREE_CODE (class) == CLASS_INTERFACE_TYPE) { ! #ifdef OBJCPLUS ! push_lang_context (lang_name_c); ! #endif /* OBJCPLUS */ ! build_private_template (class); ! ! #ifdef OBJCPLUS ! pop_lang_context (); ! #endif /* OBJCPLUS */ return NULL_TREE; } *************** continue_class (tree class) *** 6968,6974 **** /* This is called once we see the "@end" in an interface/implementation. */ ! void finish_class (tree class) { if (TREE_CODE (class) == CLASS_IMPLEMENTATION_TYPE) --- 6888,6894 ---- /* This is called once we see the "@end" in an interface/implementation. */ ! static void finish_class (tree class) { if (TREE_CODE (class) == CLASS_IMPLEMENTATION_TYPE) *************** finish_class (tree class) *** 7008,7029 **** IDENTIFIER_POINTER (CLASS_SUPER_NAME (objc_implementation_context))); } } - - else if (TREE_CODE (class) == CLASS_INTERFACE_TYPE) - { - tree decl_specs; - const char *class_name = IDENTIFIER_POINTER (CLASS_NAME (class)); - char *string = (char *) alloca (strlen (class_name) + 3); - - /* extern struct objc_object *_; */ - - sprintf (string, "_%s", class_name); - - decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_EXTERN]); - decl_specs = tree_cons (NULL_TREE, objc_object_reference, decl_specs); - define_decl (build1 (INDIRECT_REF, NULL_TREE, get_identifier (string)), - decl_specs); - } } static tree --- 6928,6933 ---- *************** objc_declare_protocols (tree names) *** 7069,7075 **** { tree protocol = make_node (PROTOCOL_INTERFACE_TYPE); ! TYPE_BINFO (protocol) = make_tree_vec (2); PROTOCOL_NAME (protocol) = name; PROTOCOL_LIST (protocol) = NULL_TREE; add_protocol (protocol); --- 6973,6980 ---- { tree protocol = make_node (PROTOCOL_INTERFACE_TYPE); ! TYPE_LANG_SLOT_1 (protocol) ! = make_tree_vec (PROTOCOL_LANG_SLOT_ELTS); PROTOCOL_NAME (protocol) = name; PROTOCOL_LIST (protocol) = NULL_TREE; add_protocol (protocol); *************** objc_declare_protocols (tree names) *** 7079,7085 **** } } ! tree start_protocol (enum tree_code code, tree name, tree list) { tree protocol; --- 6984,6990 ---- } } ! static tree start_protocol (enum tree_code code, tree name, tree list) { tree protocol; *************** start_protocol (enum tree_code code, tre *** 7090,7106 **** } #endif /* OBJCPLUS */ - /* This is as good a place as any. Need to invoke - push_tag_toplevel. */ - if (!objc_protocol_template) - objc_protocol_template = build_protocol_template (); - protocol = lookup_protocol (name); if (!protocol) { protocol = make_node (code); ! TYPE_BINFO (protocol) = make_tree_vec (2); PROTOCOL_NAME (protocol) = name; PROTOCOL_LIST (protocol) = lookup_and_install_protocols (list); --- 6995,7006 ---- } #endif /* OBJCPLUS */ protocol = lookup_protocol (name); if (!protocol) { protocol = make_node (code); ! TYPE_LANG_SLOT_1 (protocol) = make_tree_vec (PROTOCOL_LANG_SLOT_ELTS); PROTOCOL_NAME (protocol) = name; PROTOCOL_LIST (protocol) = lookup_and_install_protocols (list); *************** start_protocol (enum tree_code code, tre *** 7119,7135 **** } else { ! warning ("duplicate declaration for protocol `%s'", IDENTIFIER_POINTER (name)); } return protocol; } - void - finish_protocol (tree protocol ATTRIBUTE_UNUSED) - { - } - /* "Encode" a data type into a string, which grows in util_obstack. ??? What is the FORMAT? Someone please document this! */ --- 7019,7030 ---- } else { ! warning ("duplicate declaration for protocol %qs", IDENTIFIER_POINTER (name)); } return protocol; } /* "Encode" a data type into a string, which grows in util_obstack. ??? What is the FORMAT? Someone please document this! */ *************** encode_type_qualifiers (tree declspecs) *** 7141,7149 **** for (spec = declspecs; spec; spec = TREE_CHAIN (spec)) { ! if (ridpointers[(int) RID_CONST] == TREE_VALUE (spec)) ! obstack_1grow (&util_obstack, 'r'); ! else if (ridpointers[(int) RID_IN] == TREE_VALUE (spec)) obstack_1grow (&util_obstack, 'n'); else if (ridpointers[(int) RID_INOUT] == TREE_VALUE (spec)) obstack_1grow (&util_obstack, 'N'); --- 7036,7042 ---- for (spec = declspecs; spec; spec = TREE_CHAIN (spec)) { ! if (ridpointers[(int) RID_IN] == TREE_VALUE (spec)) obstack_1grow (&util_obstack, 'n'); else if (ridpointers[(int) RID_INOUT] == TREE_VALUE (spec)) obstack_1grow (&util_obstack, 'N'); *************** encode_pointer (tree type, int curtype, *** 7177,7183 **** obstack_1grow (&util_obstack, '@'); return; } ! else if (TREE_STATIC_TEMPLATE (pointer_to)) { if (generating_instance_variables) { --- 7070,7077 ---- obstack_1grow (&util_obstack, '@'); return; } ! else if (TYPE_HAS_OBJC_INFO (pointer_to) ! && TYPE_OBJC_INTERFACE (pointer_to)) { if (generating_instance_variables) { *************** encode_pointer (tree type, int curtype, *** 7214,7219 **** --- 7108,7118 ---- if (!flag_next_runtime || strcmp (IDENTIFIER_POINTER (pname), "BOOL")) { + /* It appears that "r*" means "const char *" rather than + "char *const". */ + if (TYPE_READONLY (pointer_to)) + obstack_1grow (&util_obstack, 'r'); + obstack_1grow (&util_obstack, '*'); return; } *************** encode_array (tree type, int curtype, in *** 7240,7248 **** return; } ! sprintf (buffer, "[%ld", ! (long) (TREE_INT_CST_LOW (an_int_cst) ! / TREE_INT_CST_LOW (TYPE_SIZE (array_of)))); obstack_grow (&util_obstack, buffer, strlen (buffer)); encode_type (array_of, curtype, format); --- 7139,7147 ---- return; } ! sprintf (buffer, "[" HOST_WIDE_INT_PRINT_DEC, ! (TREE_INT_CST_LOW (an_int_cst) ! / TREE_INT_CST_LOW (TYPE_SIZE (array_of)))); obstack_grow (&util_obstack, buffer, strlen (buffer)); encode_type (array_of, curtype, format); *************** encode_type (tree type, int curtype, int *** 7363,7382 **** enum tree_code code = TREE_CODE (type); char c; if (code == INTEGER_TYPE) { switch (GET_MODE_BITSIZE (TYPE_MODE (type))) { ! case 8: c = TREE_UNSIGNED (type) ? 'C' : 'c'; break; ! case 16: c = TREE_UNSIGNED (type) ? 'S' : 's'; break; case 32: if (type == long_unsigned_type_node || type == long_integer_type_node) ! c = TREE_UNSIGNED (type) ? 'L' : 'l'; else ! c = TREE_UNSIGNED (type) ? 'I' : 'i'; break; ! case 64: c = TREE_UNSIGNED (type) ? 'Q' : 'q'; break; default: abort (); } obstack_1grow (&util_obstack, c); --- 7262,7284 ---- enum tree_code code = TREE_CODE (type); char c; + if (TYPE_READONLY (type)) + obstack_1grow (&util_obstack, 'r'); + if (code == INTEGER_TYPE) { switch (GET_MODE_BITSIZE (TYPE_MODE (type))) { ! case 8: c = TYPE_UNSIGNED (type) ? 'C' : 'c'; break; ! case 16: c = TYPE_UNSIGNED (type) ? 'S' : 's'; break; case 32: if (type == long_unsigned_type_node || type == long_integer_type_node) ! c = TYPE_UNSIGNED (type) ? 'L' : 'l'; else ! c = TYPE_UNSIGNED (type) ? 'I' : 'i'; break; ! case 64: c = TYPE_UNSIGNED (type) ? 'Q' : 'q'; break; default: abort (); } obstack_1grow (&util_obstack, c); *************** encode_type (tree type, int curtype, int *** 7389,7394 **** --- 7291,7297 ---- { case 32: c = 'f'; break; case 64: + case 96: case 128: c = 'd'; break; default: abort (); } *************** encode_field_decl (tree field_decl, int *** 7500,7650 **** encode_type (TREE_TYPE (field_decl), curtype, format); } static tree ! objc_expr_last (tree complex_expr) { ! tree next; ! if (complex_expr) ! while ((next = TREE_OPERAND (complex_expr, 0))) ! complex_expr = next; ! return complex_expr; } static void synth_self_and_ucmd_args (void) { ! tree decl_specs; if (objc_method_context && TREE_CODE (objc_method_context) == INSTANCE_METHOD_DECL) ! decl_specs = build_tree_list (NULL_TREE, uprivate_record); else /* Really a `struct objc_class *'. However, we allow people to assign to self, which changes its type midstream. */ ! decl_specs = build_tree_list (NULL_TREE, objc_object_reference); ! push_parm_decl (build_tree_list ! (build_tree_list (decl_specs, ! build1 (INDIRECT_REF, NULL_TREE, self_id)), ! unused_list)); ! decl_specs = build_tree_list (NULL_TREE, ! xref_tag (RECORD_TYPE, ! get_identifier (TAG_SELECTOR))); ! push_parm_decl (build_tree_list ! (build_tree_list (decl_specs, ! build1 (INDIRECT_REF, NULL_TREE, ucmd_id)), ! unused_list)); } ! /* Transform a method definition into a function definition as follows: ! - synthesize the first two arguments, "self" and "_cmd". */ ! void start_method_def (tree method) { /* Required to implement _msgSuper. */ objc_method_context = method; UOBJC_SUPER_decl = NULL_TREE; - /* Must be called BEFORE start_function. */ - pushlevel (0); - /* Generate prototype declarations for arguments..."new-style". */ synth_self_and_ucmd_args (); /* Generate argument declarations if a keyword_decl. */ ! if (METHOD_SEL_ARGS (method)) { ! tree arglist = METHOD_SEL_ARGS (method); ! do ! { ! tree arg_spec = TREE_PURPOSE (TREE_TYPE (arglist)); ! tree arg_decl = TREE_VALUE (TREE_TYPE (arglist)); ! ! if (arg_decl) ! { ! tree last_expr = objc_expr_last (arg_decl); ! ! /* Unite the abstract decl with its name. */ ! TREE_OPERAND (last_expr, 0) = KEYWORD_ARG_NAME (arglist); ! push_parm_decl (build_tree_list ! (build_tree_list (arg_spec, arg_decl), ! NULL_TREE)); ! ! #ifndef OBJCPLUS ! /* Unhook: restore the abstract declarator. */ ! TREE_OPERAND (last_expr, 0) = NULL_TREE; ! #endif ! } ! ! else ! push_parm_decl (build_tree_list ! (build_tree_list (arg_spec, ! KEYWORD_ARG_NAME (arglist)), ! NULL_TREE)); ! arglist = TREE_CHAIN (arglist); ! } ! while (arglist); } ! if (METHOD_ADD_ARGS (method) != NULL_TREE ! && METHOD_ADD_ARGS (method) != objc_ellipsis_node) { ! /* We have a variable length selector - in "prototype" format. */ ! tree akey = TREE_PURPOSE (METHOD_ADD_ARGS (method)); ! while (akey) { ! /* This must be done prior to calling pushdecl. pushdecl is ! going to change our chain on us. */ ! tree nextkey = TREE_CHAIN (akey); ! pushdecl (akey); ! akey = nextkey; } } } static void warn_with_method (const char *message, int mtype, tree method) { /* Add a readable method name to the warning. */ ! warning ("%J%s `%c%s'", method, ! message, mtype, gen_method_decl (method, errbuf)); ! } ! ! /* Return 1 if METHOD is consistent with PROTO. */ ! ! static int ! comp_method_with_proto (tree method, tree proto) ! { ! /* Create a function template node at most once. */ ! if (!function1_template) ! function1_template = make_node (FUNCTION_TYPE); ! ! /* Install argument types - normally set by build_function_type. */ ! TYPE_ARG_TYPES (function1_template) = get_arg_type_list (proto, METHOD_DEF, 0); ! ! /* install return type */ ! TREE_TYPE (function1_template) = groktypename (TREE_TYPE (proto)); ! ! return comptypes (TREE_TYPE (METHOD_DEFINITION (method)), function1_template, ! false); } ! /* Return 1 if TYPE1 is equivalent to TYPE2. */ static int objc_types_are_equivalent (tree type1, tree type2) { if (type1 == type2) return 1; if (TYPE_MAIN_VARIANT (type1) != TYPE_MAIN_VARIANT (type2)) return 0; ! type1 = TYPE_PROTOCOL_LIST (type1); ! type2 = TYPE_PROTOCOL_LIST (type2); if (list_length (type1) == list_length (type2)) { for (; type2; type2 = TREE_CHAIN (type2)) --- 7403,7581 ---- encode_type (TREE_TYPE (field_decl), curtype, format); } + static GTY(()) tree objc_parmlist = NULL_TREE; + + /* Append PARM to a list of formal parameters of a method, making a necessary + array-to-pointer adjustment along the way. */ + + static void + objc_push_parm (tree parm) + { + /* Decay arrays and functions into pointers. */ + if (TREE_CODE (TREE_TYPE (parm)) == ARRAY_TYPE) + TREE_TYPE (parm) = build_pointer_type (TREE_TYPE (TREE_TYPE (parm))); + else if (TREE_CODE (TREE_TYPE (parm)) == FUNCTION_TYPE) + TREE_TYPE (parm) = build_pointer_type (TREE_TYPE (parm)); + + DECL_ARG_TYPE_AS_WRITTEN (parm) = TREE_TYPE (parm); + DECL_ARG_TYPE (parm) + = lang_hooks.types.type_promotes_to (TREE_TYPE (parm)); + + /* Record constancy and volatility. */ + c_apply_type_quals_to_decl + ((TYPE_READONLY (TREE_TYPE (parm)) ? TYPE_QUAL_CONST : 0) + | (TYPE_RESTRICT (TREE_TYPE (parm)) ? TYPE_QUAL_RESTRICT : 0) + | (TYPE_VOLATILE (TREE_TYPE (parm)) ? TYPE_QUAL_VOLATILE : 0), parm); + + objc_parmlist = chainon (objc_parmlist, parm); + } + + /* Retrieve the formal parameter list constructed via preceding calls to + objc_push_parm(). */ + + #ifdef OBJCPLUS static tree ! objc_get_parm_info (int have_ellipsis ATTRIBUTE_UNUSED) ! #else ! static struct c_arg_info * ! objc_get_parm_info (int have_ellipsis) ! #endif { ! #ifdef OBJCPLUS ! tree parm_info = objc_parmlist; ! objc_parmlist = NULL_TREE; ! return parm_info; ! #else ! tree parm_info = objc_parmlist; ! struct c_arg_info *arg_info; ! /* The C front-end requires an elaborate song and dance at ! this point. */ ! push_scope (); ! declare_parm_level (); ! while (parm_info) ! { ! tree next = TREE_CHAIN (parm_info); ! TREE_CHAIN (parm_info) = NULL_TREE; ! parm_info = pushdecl (parm_info); ! finish_decl (parm_info, NULL_TREE, NULL_TREE); ! parm_info = next; ! } ! arg_info = get_parm_info (have_ellipsis); ! pop_scope (); ! objc_parmlist = NULL_TREE; ! return arg_info; ! #endif } + /* Synthesize the formal parameters 'id self' and 'SEL _cmd' needed for ObjC + method definitions. In the case of instance methods, we can be more + specific as to the type of 'self'. */ + static void synth_self_and_ucmd_args (void) { ! tree self_type; if (objc_method_context && TREE_CODE (objc_method_context) == INSTANCE_METHOD_DECL) ! self_type = objc_instance_type; else /* Really a `struct objc_class *'. However, we allow people to assign to self, which changes its type midstream. */ ! self_type = objc_object_type; ! /* id self; */ ! objc_push_parm (build_decl (PARM_DECL, self_id, self_type)); ! /* SEL _cmd; */ ! objc_push_parm (build_decl (PARM_DECL, ucmd_id, objc_selector_type)); } ! /* Transform an Objective-C method definition into a static C function ! definition, synthesizing the first two arguments, "self" and "_cmd", ! in the process. */ ! static void start_method_def (tree method) { + tree parmlist; + #ifdef OBJCPLUS + tree parm_info; + #else + struct c_arg_info *parm_info; + #endif + int have_ellipsis = 0; + /* Required to implement _msgSuper. */ objc_method_context = method; UOBJC_SUPER_decl = NULL_TREE; /* Generate prototype declarations for arguments..."new-style". */ synth_self_and_ucmd_args (); /* Generate argument declarations if a keyword_decl. */ ! parmlist = METHOD_SEL_ARGS (method); ! while (parmlist) { ! tree type = TREE_VALUE (TREE_TYPE (parmlist)), parm; ! parm = build_decl (PARM_DECL, KEYWORD_ARG_NAME (parmlist), type); ! objc_push_parm (parm); ! parmlist = TREE_CHAIN (parmlist); } ! if (METHOD_ADD_ARGS (method)) { ! tree akey; ! ! for (akey = TREE_CHAIN (METHOD_ADD_ARGS (method)); ! akey; akey = TREE_CHAIN (akey)) { ! objc_push_parm (TREE_VALUE (akey)); } + + if (TREE_OVERFLOW (METHOD_ADD_ARGS (method))) + have_ellipsis = 1; } + + parm_info = objc_get_parm_info (have_ellipsis); + + really_start_method (objc_method_context, parm_info); } static void warn_with_method (const char *message, int mtype, tree method) { /* Add a readable method name to the warning. */ ! warning ("%J%s %<%c%s%>", method, ! message, mtype, gen_method_decl (method)); } ! /* Return 1 if TYPE1 is equivalent to TYPE2 ! for purposes of method overloading. */ static int objc_types_are_equivalent (tree type1, tree type2) { if (type1 == type2) return 1; + + /* Strip away indirections. */ + while ((TREE_CODE (type1) == ARRAY_TYPE || TREE_CODE (type1) == POINTER_TYPE) + && (TREE_CODE (type1) == TREE_CODE (type2))) + type1 = TREE_TYPE (type1), type2 = TREE_TYPE (type2); if (TYPE_MAIN_VARIANT (type1) != TYPE_MAIN_VARIANT (type2)) return 0; ! ! type1 = (TYPE_HAS_OBJC_INFO (type1) ! ? TYPE_OBJC_PROTOCOL_LIST (type1) ! : NULL_TREE); ! type2 = (TYPE_HAS_OBJC_INFO (type2) ! ? TYPE_OBJC_PROTOCOL_LIST (type2) ! : NULL_TREE); ! if (list_length (type1) == list_length (type2)) { for (; type2; type2 = TREE_CHAIN (type2)) *************** objc_types_are_equivalent (tree type1, t *** 7655,7661 **** return 0; } ! /* Return 1 if PROTO1 is equivalent to PROTO2. */ static int comp_proto_with_proto (tree proto1, tree proto2) --- 7586,7593 ---- return 0; } ! /* Return 1 if PROTO1 is equivalent to PROTO2 ! for purposes of method overloading. */ static int comp_proto_with_proto (tree proto1, tree proto2) *************** comp_proto_with_proto (tree proto1, tree *** 7668,7675 **** return 0; /* Compare return types. */ ! type1 = groktypename (TREE_TYPE (proto1)); ! type2 = groktypename (TREE_TYPE (proto2)); if (!objc_types_are_equivalent (type1, type2)) return 0; --- 7600,7607 ---- return 0; /* Compare return types. */ ! type1 = TREE_VALUE (TREE_TYPE (proto1)); ! type2 = TREE_VALUE (TREE_TYPE (proto2)); if (!objc_types_are_equivalent (type1, type2)) return 0; *************** comp_proto_with_proto (tree proto1, tree *** 7687,7692 **** --- 7619,7697 ---- return (!type1 && !type2); } + /* Fold an OBJ_TYPE_REF expression for ObjC method dispatches, where + this occurs. ObjC method dispatches are _not_ like C++ virtual + member function dispatches, and we account for the difference here. */ + tree + #ifdef OBJCPLUS + objc_fold_obj_type_ref (tree ref, tree known_type) + #else + objc_fold_obj_type_ref (tree ref ATTRIBUTE_UNUSED, + tree known_type ATTRIBUTE_UNUSED) + #endif + { + #ifdef OBJCPLUS + tree v = BINFO_VIRTUALS (TYPE_BINFO (known_type)); + + /* If the receiver does not have virtual member functions, there + is nothing we can (or need to) do here. */ + if (!v) + return NULL_TREE; + + /* Let C++ handle C++ virtual functions. */ + return cp_fold_obj_type_ref (ref, known_type); + #else + /* For plain ObjC, we currently do not need to do anything. */ + return NULL_TREE; + #endif + } + + static void + objc_start_function (tree name, tree type, tree attrs, + #ifdef OBJCPLUS + tree params + #else + struct c_arg_info *params + #endif + ) + { + tree fndecl = build_decl (FUNCTION_DECL, name, type); + + #ifdef OBJCPLUS + DECL_ARGUMENTS (fndecl) = params; + DECL_INITIAL (fndecl) = error_mark_node; + DECL_EXTERNAL (fndecl) = 0; + TREE_STATIC (fndecl) = 1; + retrofit_lang_decl (fndecl); + cplus_decl_attributes (&fndecl, attrs, 0); + start_preparsed_function (fndecl, attrs, /*flags=*/SF_DEFAULT); + #else + struct c_label_context *nstack; + nstack = XOBNEW (&parser_obstack, struct c_label_context); + nstack->labels_def = NULL; + nstack->labels_used = NULL; + nstack->next = label_context_stack; + label_context_stack = nstack; + decl_attributes (&fndecl, attrs, 0); + announce_function (fndecl); + DECL_INITIAL (fndecl) = error_mark_node; + DECL_EXTERNAL (fndecl) = 0; + TREE_STATIC (fndecl) = 1; + current_function_decl = pushdecl (fndecl); + push_scope (); + declare_parm_level (); + DECL_RESULT (current_function_decl) + = build_decl (RESULT_DECL, NULL_TREE, + TREE_TYPE (TREE_TYPE (current_function_decl))); + DECL_ARTIFICIAL (DECL_RESULT (current_function_decl)) = 1; + DECL_IGNORED_P (DECL_RESULT (current_function_decl)) = 1; + start_fname_decls (); + store_parm_decls_from (params); + #endif + + TREE_USED (current_function_decl) = 1; + } + /* - Generate an identifier for the function. the format is "_n_cls", where 1 <= n <= nMethods, and cls is the name the implementation we are processing. *************** comp_proto_with_proto (tree proto1, tree *** 7694,7710 **** - If we have a prototype, check for type consistency. */ static void ! really_start_method (tree method, tree parmlist) { ! tree sc_spec, ret_spec, ret_decl, decl_specs; ! tree method_decl, method_id; const char *sel_name, *class_name, *cat_name; char *buf; /* Synth the storage class & assemble the return type. */ ! sc_spec = tree_cons (NULL_TREE, ridpointers[(int) RID_STATIC], NULL_TREE); ! ret_spec = TREE_PURPOSE (TREE_TYPE (method)); ! decl_specs = chainon (sc_spec, ret_spec); sel_name = IDENTIFIER_POINTER (METHOD_SEL_NAME (method)); class_name = IDENTIFIER_POINTER (CLASS_NAME (objc_implementation_context)); --- 7699,7719 ---- - If we have a prototype, check for type consistency. */ static void ! really_start_method (tree method, ! #ifdef OBJCPLUS ! tree parmlist ! #else ! struct c_arg_info *parmlist ! #endif ! ) { ! tree ret_type, meth_type; ! tree method_id; const char *sel_name, *class_name, *cat_name; char *buf; /* Synth the storage class & assemble the return type. */ ! ret_type = TREE_VALUE (TREE_TYPE (method)); sel_name = IDENTIFIER_POINTER (METHOD_SEL_NAME (method)); class_name = IDENTIFIER_POINTER (CLASS_NAME (objc_implementation_context)); *************** really_start_method (tree method, tree p *** 7729,7777 **** push_lang_context (lang_name_c); #endif ! method_decl = build_nt (CALL_EXPR, method_id, parmlist, NULL_TREE); ! ! /* Check the declarator portion of the return type for the method. */ ! if ((ret_decl = TREE_VALUE (TREE_TYPE (method)))) ! { ! /* Unite the complex decl (specified in the abstract decl) with the ! function decl just synthesized..(int *), (int (*)()), (int (*)[]). */ ! tree save_expr = objc_expr_last (ret_decl); ! ! TREE_OPERAND (save_expr, 0) = method_decl; ! method_decl = ret_decl; ! ! /* Fool the parser into thinking it is starting a function. */ ! start_function (decl_specs, method_decl, NULL_TREE); ! ! /* Unhook: this has the effect of restoring the abstract declarator. */ ! TREE_OPERAND (save_expr, 0) = NULL_TREE; ! } ! ! else ! { ! TREE_VALUE (TREE_TYPE (method)) = method_decl; ! ! /* Fool the parser into thinking it is starting a function. */ ! start_function (decl_specs, method_decl, NULL_TREE); ! ! /* Unhook: this has the effect of restoring the abstract declarator. */ ! TREE_VALUE (TREE_TYPE (method)) = NULL_TREE; ! } ! #ifdef OBJCPLUS ! /* set self_decl from the first argument...this global is used by ! * build_ivar_reference().build_indirect_ref(). ! */ self_decl = DECL_ARGUMENTS (current_function_decl); ! /* snaroff (3/28/96): when compiling with -Wall, this suppresses ! * the following: warning:unused parameter `struct objc_selector * _cmd' ! */ TREE_USED (self_decl) = 1; TREE_USED (TREE_CHAIN (self_decl)) = 1; ! /* Ditto for the underlying (static) C function. */ ! TREE_USED (current_function_decl) = 1; pop_lang_context (); #endif --- 7738,7755 ---- push_lang_context (lang_name_c); #endif ! meth_type ! = build_function_type (ret_type, ! get_arg_type_list (method, METHOD_DEF, 0)); ! objc_start_function (method_id, meth_type, NULL_TREE, parmlist); ! /* Set self_decl from the first argument. */ self_decl = DECL_ARGUMENTS (current_function_decl); ! /* Suppress unused warnings. */ TREE_USED (self_decl) = 1; TREE_USED (TREE_CHAIN (self_decl)) = 1; ! #ifdef OBJCPLUS pop_lang_context (); #endif *************** really_start_method (tree method, tree p *** 7788,7794 **** if (proto) { ! if (!comp_method_with_proto (method, proto)) { char type = (TREE_CODE (method) == INSTANCE_METHOD_DECL ? '-' : '+'); --- 7766,7772 ---- if (proto) { ! if (!comp_proto_with_proto (method, proto)) { char type = (TREE_CODE (method) == INSTANCE_METHOD_DECL ? '-' : '+'); *************** really_start_method (tree method, tree p *** 7818,7850 **** } } - /* The following routine is always called...this "architecture" is to - accommodate "old-style" variable length selectors. - - - a:a b:b // prototype ; id c; id d; // old-style. */ - - void - continue_method_def (void) - { - tree parmlist; - - if (METHOD_ADD_ARGS (objc_method_context) == objc_ellipsis_node) - /* We have a `, ...' immediately following the selector. */ - parmlist = get_parm_info (0); - else - parmlist = get_parm_info (1); /* place a `void_at_end' */ - - #ifndef OBJCPLUS - /* Set self_decl from the first argument...this global is used by - build_ivar_reference calling build_indirect_ref. */ - self_decl = TREE_PURPOSE (parmlist); - #endif /* !OBJCPLUS */ - - poplevel (0, 0, 0); - really_start_method (objc_method_context, parmlist); - store_parm_decls (); - } - static void *UOBJC_SUPER_scope = 0; /* _n_Method (id self, SEL sel, ...) --- 7796,7801 ---- *************** static void *UOBJC_SUPER_scope = 0; *** 7853,7859 **** _msgSuper ((_S.self = self, _S.class = _cls, &_S), ...); } */ ! tree get_super_receiver (void) { if (objc_method_context) --- 7804,7810 ---- _msgSuper ((_S.self = self, _S.class = _cls, &_S), ...); } */ ! static tree get_super_receiver (void) { if (objc_method_context) *************** get_super_receiver (void) *** 7862,7889 **** if (!UOBJC_SUPER_decl) { ! UOBJC_SUPER_decl = start_decl (get_identifier (TAG_SUPER), ! build_tree_list (NULL_TREE, ! objc_super_template), ! 0, NULL_TREE); ! ! finish_decl (UOBJC_SUPER_decl, NULL_TREE, NULL_TREE); ! /* This prevents `unused variable' warnings when compiling with -Wall. */ TREE_USED (UOBJC_SUPER_decl) = 1; ! DECL_ARTIFICIAL (UOBJC_SUPER_decl) = 1; ! ! UOBJC_SUPER_scope = get_current_scope (); } /* Set receiver to self. */ super_expr = build_component_ref (UOBJC_SUPER_decl, self_id); super_expr = build_modify_expr (super_expr, NOP_EXPR, self_decl); ! super_expr_list = build_tree_list (NULL_TREE, super_expr); /* Set class to begin searching. */ super_expr = build_component_ref (UOBJC_SUPER_decl, ! get_identifier ("class")); if (TREE_CODE (objc_implementation_context) == CLASS_IMPLEMENTATION_TYPE) { --- 7813,7835 ---- if (!UOBJC_SUPER_decl) { ! UOBJC_SUPER_decl = build_decl (VAR_DECL, get_identifier (TAG_SUPER), ! objc_super_template); /* This prevents `unused variable' warnings when compiling with -Wall. */ TREE_USED (UOBJC_SUPER_decl) = 1; ! lang_hooks.decls.pushdecl (UOBJC_SUPER_decl); ! finish_decl (UOBJC_SUPER_decl, NULL_TREE, NULL_TREE); ! UOBJC_SUPER_scope = objc_get_current_scope (); } /* Set receiver to self. */ super_expr = build_component_ref (UOBJC_SUPER_decl, self_id); super_expr = build_modify_expr (super_expr, NOP_EXPR, self_decl); ! super_expr_list = super_expr; /* Set class to begin searching. */ super_expr = build_component_ref (UOBJC_SUPER_decl, ! get_identifier ("super_class")); if (TREE_CODE (objc_implementation_context) == CLASS_IMPLEMENTATION_TYPE) { *************** get_super_receiver (void) *** 7906,7919 **** /* Barf if super used in a category of Object. */ if (!super_name) { ! error ("no super class declared in interface for `%s'", IDENTIFIER_POINTER (CLASS_NAME (implementation_template))); return error_mark_node; } if (flag_next_runtime && !flag_zero_link) { ! super_class = get_class_reference (super_name); if (TREE_CODE (objc_method_context) == CLASS_METHOD_DECL) /* If we are in a class method, we must retrieve the _metaclass_ for the current class, pointed at by --- 7852,7865 ---- /* Barf if super used in a category of Object. */ if (!super_name) { ! error ("no super class declared in interface for %qs", IDENTIFIER_POINTER (CLASS_NAME (implementation_template))); return error_mark_node; } if (flag_next_runtime && !flag_zero_link) { ! super_class = objc_get_class_reference (super_name); if (TREE_CODE (objc_method_context) == CLASS_METHOD_DECL) /* If we are in a class method, we must retrieve the _metaclass_ for the current class, pointed at by *************** get_super_receiver (void) *** 7945,7956 **** super_class)); } ! chainon (super_expr_list, build_tree_list (NULL_TREE, super_expr)); super_expr = build_unary_op (ADDR_EXPR, UOBJC_SUPER_decl, 0); ! chainon (super_expr_list, build_tree_list (NULL_TREE, super_expr)); ! return build_compound_expr (super_expr_list); } else { --- 7891,7902 ---- super_class)); } ! super_expr_list = build_compound_expr (super_expr_list, super_expr); super_expr = build_unary_op (ADDR_EXPR, UOBJC_SUPER_decl, 0); ! super_expr_list = build_compound_expr (super_expr_list, super_expr); ! return super_expr_list; } else { *************** void *** 7966,8004 **** objc_clear_super_receiver (void) { if (objc_method_context ! && UOBJC_SUPER_scope == get_current_scope ()) { UOBJC_SUPER_decl = 0; UOBJC_SUPER_scope = 0; } } - static void - objc_expand_function_end (void) - { - /* This routine may also get called for C functions, including those - nested within ObjC methods. In such cases, method encoding is - meaningless. */ - if (objc_method_context == NULL_TREE - || DECL_INITIAL (objc_method_context) != current_function_decl) - return; - - METHOD_ENCODING (objc_method_context) - = encode_method_prototype (objc_method_context); - } - void ! finish_method_def (void) { - lang_expand_function_end = objc_expand_function_end; /* We cannot validly inline ObjC methods, at least not without a language extension to declare that a method need not be dynamically dispatched, so suppress all thoughts of doing so. */ ! DECL_INLINE (current_function_decl) = 0; ! DECL_UNINLINABLE (current_function_decl) = 1; ! current_function_cannot_inline = "methods cannot be inlined"; finish_function (); ! lang_expand_function_end = NULL; /* Required to implement _msgSuper. This must be done AFTER finish_function, since the optimizer may find "may be used before set" errors. */ --- 7912,7939 ---- objc_clear_super_receiver (void) { if (objc_method_context ! && UOBJC_SUPER_scope == objc_get_current_scope ()) { UOBJC_SUPER_decl = 0; UOBJC_SUPER_scope = 0; } } void ! objc_finish_method_definition (tree fndecl) { /* We cannot validly inline ObjC methods, at least not without a language extension to declare that a method need not be dynamically dispatched, so suppress all thoughts of doing so. */ ! DECL_INLINE (fndecl) = 0; ! DECL_UNINLINABLE (fndecl) = 1; + #ifndef OBJCPLUS + /* The C++ front-end will have called finish_function() for us. */ finish_function (); ! #endif ! ! METHOD_ENCODING (objc_method_context) ! = encode_method_prototype (objc_method_context); /* Required to implement _msgSuper. This must be done AFTER finish_function, since the optimizer may find "may be used before set" errors. */ *************** lang_report_error_function (tree decl) *** 8011,8017 **** { if (objc_method_context) { ! fprintf (stderr, "In method `%s'\n", IDENTIFIER_POINTER (METHOD_SEL_NAME (objc_method_context))); return 1; } --- 7946,7952 ---- { if (objc_method_context) { ! fprintf (stderr, "In method %qs\n", IDENTIFIER_POINTER (METHOD_SEL_NAME (objc_method_context))); return 1; } *************** lang_report_error_function (tree decl) *** 8021,8649 **** } #endif ! static int ! is_complex_decl (tree type) ! { ! return (TREE_CODE (type) == ARRAY_TYPE ! || TREE_CODE (type) == FUNCTION_TYPE ! || (TREE_CODE (type) == POINTER_TYPE && ! IS_ID (type))); ! } ! ! ! /* Code to convert a decl node into text for a declaration in C. */ ! ! static char tmpbuf[256]; ! static void ! adorn_decl (tree decl, char *str) { ! enum tree_code code = TREE_CODE (decl); ! ! if (code == ARRAY_REF) ! { ! tree an_int_cst = TREE_OPERAND (decl, 1); ! ! if (an_int_cst && TREE_CODE (an_int_cst) == INTEGER_CST) ! sprintf (str + strlen (str), "[%ld]", ! (long) TREE_INT_CST_LOW (an_int_cst)); ! else ! strcat (str, "[]"); ! } ! ! else if (code == ARRAY_TYPE) ! { ! tree an_int_cst = TYPE_SIZE (decl); ! tree array_of = TREE_TYPE (decl); ! ! if (an_int_cst && TREE_CODE (an_int_cst) == INTEGER_TYPE) ! sprintf (str + strlen (str), "[%ld]", ! (long) (TREE_INT_CST_LOW (an_int_cst) ! / TREE_INT_CST_LOW (TYPE_SIZE (array_of)))); ! else ! strcat (str, "[]"); ! } ! ! else if (code == CALL_EXPR) ! { ! tree chain = TREE_PURPOSE (TREE_OPERAND (decl, 1)); ! ! strcat (str, "("); ! while (chain) ! { ! gen_declaration_1 (chain, str); ! chain = TREE_CHAIN (chain); ! if (chain) ! strcat (str, ", "); ! } ! strcat (str, ")"); ! } ! else if (code == FUNCTION_TYPE) { ! tree chain = TYPE_ARG_TYPES (decl); ! ! strcat (str, "("); ! while (chain && TREE_VALUE (chain) != void_type_node) ! { ! gen_declaration_1 (TREE_VALUE (chain), str); ! chain = TREE_CHAIN (chain); ! if (chain && TREE_VALUE (chain) != void_type_node) ! strcat (str, ", "); ! } ! strcat (str, ")"); ! } ! else if (code == INDIRECT_REF) ! { ! strcpy (tmpbuf, "*"); ! if (TREE_TYPE (decl) && TREE_CODE (TREE_TYPE (decl)) == TREE_LIST) { ! tree chain; ! for (chain = nreverse (copy_list (TREE_TYPE (decl))); ! chain; ! chain = TREE_CHAIN (chain)) ! { ! if (TREE_CODE (TREE_VALUE (chain)) == IDENTIFIER_NODE) ! { ! strcat (tmpbuf, " "); ! strcat (tmpbuf, IDENTIFIER_POINTER (TREE_VALUE (chain))); ! } ! } ! if (str[0]) ! strcat (tmpbuf, " "); } - strcat (tmpbuf, str); - strcpy (str, tmpbuf); - } ! else if (code == POINTER_TYPE) ! { ! strcpy (tmpbuf, "*"); ! if (TREE_READONLY (decl) || TYPE_VOLATILE (decl)) ! { ! if (TREE_READONLY (decl)) ! strcat (tmpbuf, " const"); ! if (TYPE_VOLATILE (decl)) ! strcat (tmpbuf, " volatile"); ! if (str[0]) ! strcat (tmpbuf, " "); ! } ! strcat (tmpbuf, str); ! strcpy (str, tmpbuf); } } ! static char * ! gen_declarator (tree decl, char *buf, const char *name) ! { ! if (decl) ! { ! enum tree_code code = TREE_CODE (decl); ! char *str; ! tree op; ! int wrap = 0; ! ! switch (code) ! { ! case ARRAY_REF: ! case INDIRECT_REF: ! case CALL_EXPR: ! op = TREE_OPERAND (decl, 0); ! ! /* We have a pointer to a function or array...(*)(), (*)[] */ ! if ((code == ARRAY_REF || code == CALL_EXPR) ! && op && TREE_CODE (op) == INDIRECT_REF) ! wrap = 1; ! ! str = gen_declarator (op, buf, name); ! ! if (wrap) ! { ! strcpy (tmpbuf, "("); ! strcat (tmpbuf, str); ! strcat (tmpbuf, ")"); ! strcpy (str, tmpbuf); ! } ! ! adorn_decl (decl, str); ! break; ! ! case ARRAY_TYPE: ! case FUNCTION_TYPE: ! case POINTER_TYPE: ! strcpy (buf, name); ! str = buf; ! ! /* This clause is done iteratively rather than recursively. */ ! do ! { ! op = (is_complex_decl (TREE_TYPE (decl)) ! ? TREE_TYPE (decl) : NULL_TREE); ! ! adorn_decl (decl, str); ! ! /* We have a pointer to a function or array...(*)(), (*)[] */ ! if (code == POINTER_TYPE ! && op && (TREE_CODE (op) == FUNCTION_TYPE ! || TREE_CODE (op) == ARRAY_TYPE)) ! { ! strcpy (tmpbuf, "("); ! strcat (tmpbuf, str); ! strcat (tmpbuf, ")"); ! strcpy (str, tmpbuf); ! } ! ! decl = (is_complex_decl (TREE_TYPE (decl)) ! ? TREE_TYPE (decl) : NULL_TREE); ! } ! ! while (decl && (code = TREE_CODE (decl))) ! ; ! ! break; ! ! case IDENTIFIER_NODE: ! /* Will only happen if we are processing a "raw" expr-decl. */ ! strcpy (buf, IDENTIFIER_POINTER (decl)); ! return buf; ! ! default: ! abort (); ! } ! ! return str; ! } ! ! else ! /* We have an abstract declarator or a _DECL node. */ ! { ! strcpy (buf, name); ! return buf; ! } ! } ! static void ! gen_declspecs (tree declspecs, char *buf, int raw) { ! if (raw) ! { ! tree chain; ! ! for (chain = nreverse (copy_list (declspecs)); ! chain; chain = TREE_CHAIN (chain)) ! { ! tree aspec = TREE_VALUE (chain); ! ! if (TREE_CODE (aspec) == IDENTIFIER_NODE) ! strcat (buf, IDENTIFIER_POINTER (aspec)); ! else if (TREE_CODE (aspec) == RECORD_TYPE) ! { ! if (OBJC_TYPE_NAME (aspec)) ! { ! tree protocol_list = TYPE_PROTOCOL_LIST (aspec); ! ! if (! TREE_STATIC_TEMPLATE (aspec)) ! strcat (buf, "struct "); ! strcat (buf, IDENTIFIER_POINTER (OBJC_TYPE_NAME (aspec))); ! ! /* NEW!!! */ ! if (protocol_list) ! { ! tree chain = protocol_list; ! ! strcat (buf, " <"); ! while (chain) ! { ! strcat (buf, ! IDENTIFIER_POINTER ! (PROTOCOL_NAME (TREE_VALUE (chain)))); ! chain = TREE_CHAIN (chain); ! if (chain) ! strcat (buf, ", "); ! } ! strcat (buf, ">"); ! } ! } ! ! else ! strcat (buf, "untagged struct"); ! } ! ! else if (TREE_CODE (aspec) == UNION_TYPE) ! { ! if (OBJC_TYPE_NAME (aspec)) ! { ! if (! TREE_STATIC_TEMPLATE (aspec)) ! strcat (buf, "union "); ! strcat (buf, IDENTIFIER_POINTER (OBJC_TYPE_NAME (aspec))); ! } ! else ! strcat (buf, "untagged union"); ! } ! ! else if (TREE_CODE (aspec) == ENUMERAL_TYPE) ! { ! if (OBJC_TYPE_NAME (aspec)) ! { ! if (! TREE_STATIC_TEMPLATE (aspec)) ! strcat (buf, "enum "); ! strcat (buf, IDENTIFIER_POINTER (OBJC_TYPE_NAME (aspec))); ! } ! else ! strcat (buf, "untagged enum"); ! } ! ! else if (TREE_CODE (aspec) == TYPE_DECL && DECL_NAME (aspec)) ! strcat (buf, IDENTIFIER_POINTER (DECL_NAME (aspec))); ! ! else if (IS_ID (aspec)) ! { ! tree protocol_list = TYPE_PROTOCOL_LIST (aspec); ! ! strcat (buf, "id"); ! if (protocol_list) ! { ! tree chain = protocol_list; ! strcat (buf, " <"); ! while (chain) ! { ! strcat (buf, ! IDENTIFIER_POINTER ! (PROTOCOL_NAME (TREE_VALUE (chain)))); ! chain = TREE_CHAIN (chain); ! if (chain) ! strcat (buf, ", "); ! } ! strcat (buf, ">"); ! } ! } ! if (TREE_CHAIN (chain)) ! strcat (buf, " "); ! } ! } ! else { ! /* Type qualifiers. */ ! if (TREE_READONLY (declspecs)) ! strcat (buf, "const "); ! if (TYPE_VOLATILE (declspecs)) ! strcat (buf, "volatile "); ! ! switch (TREE_CODE (declspecs)) ! { ! /* Type specifiers. */ ! ! case INTEGER_TYPE: ! declspecs = TYPE_MAIN_VARIANT (declspecs); ! ! /* Signed integer types. */ ! ! if (declspecs == short_integer_type_node) ! strcat (buf, "short int "); ! else if (declspecs == integer_type_node) ! strcat (buf, "int "); ! else if (declspecs == long_integer_type_node) ! strcat (buf, "long int "); ! else if (declspecs == long_long_integer_type_node) ! strcat (buf, "long long int "); ! else if (declspecs == signed_char_type_node ! || declspecs == char_type_node) ! strcat (buf, "char "); ! ! /* Unsigned integer types. */ ! ! else if (declspecs == short_unsigned_type_node) ! strcat (buf, "unsigned short "); ! else if (declspecs == unsigned_type_node) ! strcat (buf, "unsigned int "); ! else if (declspecs == long_unsigned_type_node) ! strcat (buf, "unsigned long "); ! else if (declspecs == long_long_unsigned_type_node) ! strcat (buf, "unsigned long long "); ! else if (declspecs == unsigned_char_type_node) ! strcat (buf, "unsigned char "); ! break; ! ! case REAL_TYPE: ! declspecs = TYPE_MAIN_VARIANT (declspecs); ! ! if (declspecs == float_type_node) ! strcat (buf, "float "); ! else if (declspecs == double_type_node) ! strcat (buf, "double "); ! else if (declspecs == long_double_type_node) ! strcat (buf, "long double "); ! break; ! ! case RECORD_TYPE: ! if (OBJC_TYPE_NAME (declspecs) ! && TREE_CODE (OBJC_TYPE_NAME (declspecs)) == IDENTIFIER_NODE) ! { ! tree protocol_list = TYPE_PROTOCOL_LIST (declspecs); ! ! if (! TREE_STATIC_TEMPLATE (declspecs)) ! strcat (buf, "struct "); ! strcat (buf, IDENTIFIER_POINTER (OBJC_TYPE_NAME (declspecs))); ! ! if (protocol_list) ! { ! tree chain = protocol_list; ! ! strcat (buf, " <"); ! while (chain) ! { ! strcat (buf, ! IDENTIFIER_POINTER ! (PROTOCOL_NAME (TREE_VALUE (chain)))); ! chain = TREE_CHAIN (chain); ! if (chain) ! strcat (buf, ", "); ! } ! strcat (buf, ">"); ! } ! } ! ! else ! strcat (buf, "untagged struct"); ! ! strcat (buf, " "); ! break; ! ! case UNION_TYPE: ! if (OBJC_TYPE_NAME (declspecs) ! && TREE_CODE (OBJC_TYPE_NAME (declspecs)) == IDENTIFIER_NODE) ! { ! strcat (buf, "union "); ! strcat (buf, IDENTIFIER_POINTER (OBJC_TYPE_NAME (declspecs))); ! strcat (buf, " "); ! } ! ! else ! strcat (buf, "untagged union "); ! break; ! ! case ENUMERAL_TYPE: ! if (OBJC_TYPE_NAME (declspecs) ! && TREE_CODE (OBJC_TYPE_NAME (declspecs)) == IDENTIFIER_NODE) ! { ! strcat (buf, "enum "); ! strcat (buf, IDENTIFIER_POINTER (OBJC_TYPE_NAME (declspecs))); ! strcat (buf, " "); ! } ! else ! strcat (buf, "untagged enum "); ! break; ! case VOID_TYPE: ! strcat (buf, "void "); ! break; ! case POINTER_TYPE: { ! tree protocol_list = TYPE_PROTOCOL_LIST (declspecs); ! strcat (buf, "id"); ! if (protocol_list) { ! tree chain = protocol_list; ! ! strcat (buf, " <"); ! while (chain) ! { ! strcat (buf, ! IDENTIFIER_POINTER ! (PROTOCOL_NAME (TREE_VALUE (chain)))); ! chain = TREE_CHAIN (chain); ! if (chain) ! strcat (buf, ", "); ! } ! strcat (buf, ">"); } } - break; ! default: ! break; ! } } - } - - /* Given a tree node, produce a printable description of it in the given - buffer, overwriting the buffer. */ ! static char * ! gen_declaration (tree atype_or_adecl, char *buf) ! { ! buf[0] = '\0'; ! gen_declaration_1 (atype_or_adecl, buf); ! return buf; ! } ! /* Given a tree node, append a printable description to the end of the ! given buffer. */ ! static void ! gen_declaration_1 (tree atype_or_adecl, char *buf) ! { ! char declbuf[256]; ! if (TREE_CODE (atype_or_adecl) == TREE_LIST) { ! tree declspecs; /* "identifier_node", "record_type" */ ! tree declarator; /* "array_ref", "indirect_ref", "call_expr"... */ ! tree width = NULL_TREE; /* for bitfields */ ! ! /* We have a "raw", abstract declarator (typename). */ ! declarator = TREE_VALUE (atype_or_adecl); ! /* In the case of raw ivars, the declarator itself is a list, ! and contains bitfield widths. */ ! if (declarator && TREE_CODE (declarator) == TREE_LIST) ! { ! width = TREE_VALUE (declarator); ! declarator = TREE_PURPOSE (declarator); ! } ! declspecs = TREE_PURPOSE (atype_or_adecl); ! gen_declspecs (declspecs, buf, 1); ! if (declarator) ! { ! strcat (buf, " "); ! strcat (buf, gen_declarator (declarator, declbuf, "")); ! } ! if (width) ! sprintf (buf + strlen (buf), ": " HOST_WIDE_INT_PRINT_UNSIGNED, ! TREE_INT_CST_LOW (width)); } ! else ! { ! tree atype; ! tree declspecs; /* "integer_type", "real_type", "record_type"... */ ! tree declarator; /* "array_type", "function_type", "pointer_type". */ ! ! if (TREE_CODE (atype_or_adecl) == FIELD_DECL ! || TREE_CODE (atype_or_adecl) == PARM_DECL ! || TREE_CODE (atype_or_adecl) == FUNCTION_DECL) ! atype = TREE_TYPE (atype_or_adecl); ! else ! /* Assume we have a *_type node. */ ! atype = atype_or_adecl; ! ! if (is_complex_decl (atype)) ! { ! tree chain; ! ! /* Get the declaration specifier; it is at the end of the list. */ ! declarator = chain = atype; ! do ! chain = TREE_TYPE (chain); /* not TREE_CHAIN (chain); */ ! while (is_complex_decl (chain)); ! declspecs = chain; ! } ! ! else ! { ! declspecs = atype; ! declarator = NULL_TREE; ! } ! ! gen_declspecs (declspecs, buf, 0); ! ! if (TREE_CODE (atype_or_adecl) == FIELD_DECL ! || TREE_CODE (atype_or_adecl) == PARM_DECL ! || TREE_CODE (atype_or_adecl) == FUNCTION_DECL) ! { ! const char *const decl_name = ! (DECL_NAME (atype_or_adecl) ! ? IDENTIFIER_POINTER (DECL_NAME (atype_or_adecl)) : ""); ! if (declarator) ! { ! strcat (buf, " "); ! strcat (buf, gen_declarator (declarator, declbuf, decl_name)); ! } ! else if (decl_name[0]) ! { ! strcat (buf, " "); ! strcat (buf, decl_name); ! } ! } ! else if (declarator) ! { ! strcat (buf, " "); ! strcat (buf, gen_declarator (declarator, declbuf, "")); ! } ! } } - #define RAW_TYPESPEC(meth) (TREE_VALUE (TREE_PURPOSE (TREE_TYPE (meth)))) - /* Given a method tree, put a printable description into the given buffer (overwriting) and return a pointer to the buffer. */ static char * ! gen_method_decl (tree method, char *buf) { tree chain; ! buf[0] = '\0'; ! if (RAW_TYPESPEC (method) != objc_object_reference) ! { ! strcat (buf, "("); ! gen_declaration_1 (TREE_TYPE (method), buf); ! strcat (buf, ")"); ! } ! chain = METHOD_SEL_ARGS (method); if (chain) { /* We have a chain of keyword_decls. */ do { if (KEYWORD_KEY_NAME (chain)) ! strcat (buf, IDENTIFIER_POINTER (KEYWORD_KEY_NAME (chain))); ! strcat (buf, ":"); ! if (RAW_TYPESPEC (chain) != objc_object_reference) ! { ! strcat (buf, "("); ! gen_declaration_1 (TREE_TYPE (chain), buf); ! strcat (buf, ")"); ! } ! strcat (buf, IDENTIFIER_POINTER (KEYWORD_ARG_NAME (chain))); if ((chain = TREE_CHAIN (chain))) ! strcat (buf, " "); } while (chain); ! if (METHOD_ADD_ARGS (method) == objc_ellipsis_node) ! strcat (buf, ", ..."); ! else if (METHOD_ADD_ARGS (method)) ! { ! /* We have a tree list node as generate by get_parm_info. */ ! chain = TREE_PURPOSE (METHOD_ADD_ARGS (method)); ! /* Know we have a chain of parm_decls. */ ! while (chain) ! { ! strcat (buf, ", "); ! gen_declaration_1 (chain, buf); chain = TREE_CHAIN (chain); ! } } } else /* We have a unary selector. */ ! strcat (buf, IDENTIFIER_POINTER (METHOD_SEL_NAME (method))); ! return buf; } /* Debug info. */ --- 7956,8124 ---- } #endif ! /* Given a tree DECL node, produce a printable description of it in the given ! buffer, overwriting the buffer. */ ! static char * ! gen_declaration (tree decl) { ! errbuf[0] = '\0'; ! if (DECL_P (decl)) { ! gen_type_name_0 (TREE_TYPE (decl)); ! if (DECL_NAME (decl)) { ! if (!POINTER_TYPE_P (TREE_TYPE (decl))) ! strcat (errbuf, " "); ! strcat (errbuf, IDENTIFIER_POINTER (DECL_NAME (decl))); } ! if (DECL_INITIAL (decl) ! && TREE_CODE (DECL_INITIAL (decl)) == INTEGER_CST) ! sprintf (errbuf + strlen (errbuf), ": " HOST_WIDE_INT_PRINT_DEC, ! TREE_INT_CST_LOW (DECL_INITIAL (decl))); } + + return errbuf; } ! /* Given a tree TYPE node, produce a printable description of it in the given ! buffer, overwriting the buffer. */ ! static char * ! gen_type_name_0 (tree type) { ! tree orig = type, proto; ! if (TYPE_P (type) && TYPE_NAME (type)) ! type = TYPE_NAME (type); ! else if (POINTER_TYPE_P (type) || TREE_CODE (type) == ARRAY_TYPE) { ! tree inner = TREE_TYPE (type); ! while (TREE_CODE (inner) == ARRAY_TYPE) ! inner = TREE_TYPE (inner); ! gen_type_name_0 (inner); ! ! if (!POINTER_TYPE_P (inner)) ! strcat (errbuf, " "); ! if (POINTER_TYPE_P (type)) ! strcat (errbuf, "*"); ! else ! while (type != inner) { ! strcat (errbuf, "["); ! if (TYPE_DOMAIN (type)) { ! char sz[20]; ! sprintf (sz, HOST_WIDE_INT_PRINT_DEC, ! (TREE_INT_CST_LOW ! (TYPE_MAX_VALUE (TYPE_DOMAIN (type))) + 1)); ! strcat (errbuf, sz); } + + strcat (errbuf, "]"); + type = TREE_TYPE (type); } ! goto exit_function; } ! if (TREE_CODE (type) == TYPE_DECL && DECL_NAME (type)) ! type = DECL_NAME (type); ! strcat (errbuf, IDENTIFIER_POINTER (type)); ! /* For 'id' and 'Class', adopted protocols are stored in the pointee. */ ! if (objc_is_id (orig)) ! orig = TREE_TYPE (orig); ! ! proto = TYPE_HAS_OBJC_INFO (orig) ? TYPE_OBJC_PROTOCOL_LIST (orig) : NULL_TREE; ! if (proto) { ! strcat (errbuf, " <"); ! while (proto) { ! strcat (errbuf, ! IDENTIFIER_POINTER (PROTOCOL_NAME (TREE_VALUE (proto)))); ! proto = TREE_CHAIN (proto); ! strcat (errbuf, proto ? ", " : ">"); ! } } ! exit_function: ! return errbuf; ! } ! static char * ! gen_type_name (tree type) ! { ! errbuf[0] = '\0'; ! return gen_type_name_0 (type); } /* Given a method tree, put a printable description into the given buffer (overwriting) and return a pointer to the buffer. */ static char * ! gen_method_decl (tree method) { tree chain; ! strcpy (errbuf, "("); /* NB: Do _not_ call strcat() here. */ ! gen_type_name_0 (TREE_VALUE (TREE_TYPE (method))); ! strcat (errbuf, ")"); chain = METHOD_SEL_ARGS (method); + if (chain) { /* We have a chain of keyword_decls. */ do { if (KEYWORD_KEY_NAME (chain)) ! strcat (errbuf, IDENTIFIER_POINTER (KEYWORD_KEY_NAME (chain))); ! strcat (errbuf, ":("); ! gen_type_name_0 (TREE_VALUE (TREE_TYPE (chain))); ! strcat (errbuf, ")"); ! strcat (errbuf, IDENTIFIER_POINTER (KEYWORD_ARG_NAME (chain))); if ((chain = TREE_CHAIN (chain))) ! strcat (errbuf, " "); } while (chain); ! if (METHOD_ADD_ARGS (method)) ! { ! chain = TREE_CHAIN (METHOD_ADD_ARGS (method)); ! /* Know we have a chain of parm_decls. */ ! while (chain) ! { ! strcat (errbuf, ", "); ! gen_type_name_0 (TREE_TYPE (TREE_VALUE (chain))); chain = TREE_CHAIN (chain); ! } ! ! if (TREE_OVERFLOW (METHOD_ADD_ARGS (method))) ! strcat (errbuf, ", ..."); } } else /* We have a unary selector. */ ! strcat (errbuf, IDENTIFIER_POINTER (METHOD_SEL_NAME (method))); ! return errbuf; } /* Debug info. */ *************** dump_interface (FILE *fp, tree chain) *** 8660,8666 **** declaration is so long that it doesn't fit in the buffer. The code and all the related functions should be rewritten to avoid using fixed size buffers. */ - char *buf = (char *) xmalloc (1024 * 10); const char *my_name = IDENTIFIER_POINTER (CLASS_NAME (chain)); tree ivar_decls = CLASS_RAW_IVARS (chain); tree nst_methods = CLASS_NST_METHODS (chain); --- 8135,8140 ---- *************** dump_interface (FILE *fp, tree chain) *** 8693,8699 **** fprintf (fp, "{\n"); do { ! fprintf (fp, "\t%s;\n", gen_declaration (ivar_decls, buf)); ivar_decls = TREE_CHAIN (ivar_decls); } while (ivar_decls); --- 8167,8173 ---- fprintf (fp, "{\n"); do { ! fprintf (fp, "\t%s;\n", gen_declaration (ivar_decls)); ivar_decls = TREE_CHAIN (ivar_decls); } while (ivar_decls); *************** dump_interface (FILE *fp, tree chain) *** 8702,8714 **** while (nst_methods) { ! fprintf (fp, "- %s;\n", gen_method_decl (nst_methods, buf)); nst_methods = TREE_CHAIN (nst_methods); } while (cls_methods) { ! fprintf (fp, "+ %s;\n", gen_method_decl (cls_methods, buf)); cls_methods = TREE_CHAIN (cls_methods); } --- 8176,8188 ---- while (nst_methods) { ! fprintf (fp, "- %s;\n", gen_method_decl (nst_methods)); nst_methods = TREE_CHAIN (nst_methods); } while (cls_methods) { ! fprintf (fp, "+ %s;\n", gen_method_decl (cls_methods)); cls_methods = TREE_CHAIN (cls_methods); } *************** init_objc (void) *** 8783,8789 **** gcc_obstack_init (&util_obstack); util_firstobj = (char *) obstack_finish (&util_obstack); ! errbuf = (char *) xmalloc (BUFSIZE); hash_init (); synth_module_prologue (); } --- 8257,8263 ---- gcc_obstack_init (&util_obstack); util_firstobj = (char *) obstack_finish (&util_obstack); ! errbuf = (char *) xmalloc (1024 * 10); hash_init (); synth_module_prologue (); } *************** finish_objc (void) *** 8801,8814 **** /* A missing @end may not be detected by the parser. */ if (objc_implementation_context) { ! warning ("`@end' missing in implementation context"); finish_class (objc_implementation_context); objc_ivar_chain = NULL_TREE; objc_implementation_context = NULL_TREE; } - generate_forward_declaration_to_string_table (); - /* Process the static instances here because initialization of objc_symtab depends on them. */ if (objc_static_instances) --- 8275,8286 ---- /* A missing @end may not be detected by the parser. */ if (objc_implementation_context) { ! warning ("%<@end%> missing in implementation context"); finish_class (objc_implementation_context); objc_ivar_chain = NULL_TREE; objc_implementation_context = NULL_TREE; } /* Process the static instances here because initialization of objc_symtab depends on them. */ if (objc_static_instances) *************** finish_objc (void) *** 8860,8872 **** if (flag_replace_objc_classes && imp_list) generate_objc_image_info (); if (objc_implementation_context || class_names_chain || objc_static_instances || meth_var_names_chain || meth_var_types_chain || sel_ref_chain) { ! /* Arrange for ObjC data structures to be initialized at run time. */ ! rtx init_sym = build_module_descriptor (); ! if (init_sym && targetm.have_ctors_dtors) ! (* targetm.asm_out.constructor) (init_sym, DEFAULT_INIT_PRIORITY); } /* Dump the class references. This forces the appropriate classes --- 8332,8345 ---- if (flag_replace_objc_classes && imp_list) generate_objc_image_info (); + /* Arrange for ObjC data structures to be initialized at run time. */ if (objc_implementation_context || class_names_chain || objc_static_instances || meth_var_names_chain || meth_var_types_chain || sel_ref_chain) { ! build_module_descriptor (); ! ! if (!flag_next_runtime) ! build_module_initializer_routine (); } /* Dump the class references. This forces the appropriate classes *************** finish_objc (void) *** 8913,8938 **** static void generate_classref_translation_entry (tree chain) { ! tree expr, name, decl_specs, decl, sc_spec; ! tree type; ! type = TREE_TYPE (TREE_PURPOSE (chain)); expr = add_objc_string (TREE_VALUE (chain), class_names); ! expr = build_c_cast (type, expr); /* cast! */ ! ! name = DECL_NAME (TREE_PURPOSE (chain)); ! ! sc_spec = build_tree_list (NULL_TREE, ridpointers[(int) RID_STATIC]); ! ! /* static struct objc_class * _OBJC_CLASS_REFERENCES_n = ...; */ ! decl_specs = tree_cons (NULL_TREE, type, sc_spec); ! /* The decl that is returned from start_decl is the one that we forward declared in build_class_reference. */ ! decl = start_decl (name, decl_specs, 1, NULL_TREE); ! DECL_CONTEXT (decl) = NULL_TREE; ! finish_decl (decl, expr, NULL_TREE); return; } --- 8386,8402 ---- static void generate_classref_translation_entry (tree chain) { ! tree expr, decl, type; ! decl = TREE_PURPOSE (chain); ! type = TREE_TYPE (decl); expr = add_objc_string (TREE_VALUE (chain), class_names); ! expr = convert (type, expr); /* cast! */ ! /* The decl that is the one that we forward declared in build_class_reference. */ ! finish_var_decl (decl, expr); return; } *************** handle_class_ref (tree chain) *** 8961,8967 **** TREE_PUBLIC (decl) = 1; pushdecl (decl); ! rest_of_decl_compilation (decl, 0, 0, 0); /* Make a decl for the address. */ sprintf (string, "%sobjc_class_ref_%s", --- 8425,8431 ---- TREE_PUBLIC (decl) = 1; pushdecl (decl); ! rest_of_decl_compilation (decl, 0, 0); /* Make a decl for the address. */ sprintf (string, "%sobjc_class_ref_%s", *************** handle_class_ref (tree chain) *** 8973,8979 **** TREE_USED (decl) = 1; pushdecl (decl); ! rest_of_decl_compilation (decl, 0, 0, 0); } static void --- 8437,8443 ---- TREE_USED (decl) = 1; pushdecl (decl); ! rest_of_decl_compilation (decl, 0, 0); } static void *************** handle_impent (struct imp_entry *impent) *** 9024,9031 **** { tree decl, init; ! init = build_int_2 (0, 0); ! TREE_TYPE (init) = c_common_type_for_size (BITS_PER_WORD, 1); decl = build_decl (VAR_DECL, get_identifier (string), TREE_TYPE (init)); TREE_PUBLIC (decl) = 1; TREE_READONLY (decl) = 1; --- 8488,8494 ---- { tree decl, init; ! init = build_int_cst (c_common_type_for_size (BITS_PER_WORD, 1), 0); decl = build_decl (VAR_DECL, get_identifier (string), TREE_TYPE (init)); TREE_PUBLIC (decl) = 1; TREE_READONLY (decl) = 1; *************** handle_impent (struct imp_entry *impent) *** 9038,9044 **** } } ! /* The Fix-and-Countinue functionality available in Mac OS X 10.3 and later requires that ObjC translation units participating in F&C be specially marked. The following routine accomplishes this. */ --- 8501,8507 ---- } } ! /* The Fix-and-Continue functionality available in Mac OS X 10.3 and later requires that ObjC translation units participating in F&C be specially marked. The following routine accomplishes this. */ *************** handle_impent (struct imp_entry *impent) *** 9047,9094 **** static void generate_objc_image_info (void) { ! tree sc_spec, decl, initlist; ! sc_spec = build_tree_list (NULL_TREE, ridpointers[(int) RID_STATIC]); ! decl ! = start_decl (get_identifier ("_OBJC_IMAGE_INFO"), ! tree_cons (NULL_TREE, ! build_array_type ! (integer_type_node, ! build_index_type (build_int_2 (1, 0))), ! sc_spec), ! 1, ! NULL_TREE); ! initlist = build_tree_list (NULL_TREE, build_int_2 (0, 0)); ! initlist = tree_cons (NULL_TREE, build_int_2 (1, 0), initlist); ! initlist = build_constructor (TREE_TYPE (decl), nreverse (initlist)); ! TREE_USED (decl) = DECL_IGNORED_P (decl) = DECL_ARTIFICIAL (decl) = 1; ! TREE_CONSTANT (initlist) = TREE_STATIC (initlist) = 1; ! finish_decl (decl, initlist, NULL_TREE); } ! /* Look up ID as an instance variable. */ tree ! lookup_objc_ivar (tree id) { ! tree decl; ! if (objc_method_context && !strcmp (IDENTIFIER_POINTER (id), "super")) /* We have a message to super. */ return get_super_receiver (); ! else if (objc_method_context && (decl = is_ivar (objc_ivar_chain, id))) { ! if (is_private (decl)) ! return 0; ! else ! return build_ivar_reference (id); } ! else ! return 0; } #include "gt-objc-objc-act.h" - #include "gtype-objc.h" --- 8510,8572 ---- static void generate_objc_image_info (void) { ! tree decl, initlist; ! decl = start_var_decl (build_array_type ! (integer_type_node, ! build_index_type (build_int_cst (NULL_TREE, 2 - 1))), ! "_OBJC_IMAGE_INFO"); ! initlist = build_tree_list (NULL_TREE, build_int_cst (NULL_TREE, 0)); ! initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 1), initlist); ! initlist = objc_build_constructor (TREE_TYPE (decl), nreverse (initlist)); ! finish_var_decl (decl, initlist); } ! /* Look up ID as an instance variable. OTHER contains the result of ! the C or C++ lookup, which we may want to use instead. */ tree ! objc_lookup_ivar (tree other, tree id) { ! tree ivar; ! /* If we are not inside of an ObjC method, ivar lookup makes no sense. */ ! if (!objc_method_context) ! return other; ! ! if (!strcmp (IDENTIFIER_POINTER (id), "super")) /* We have a message to super. */ return get_super_receiver (); ! ! /* In a class method, look up an instance variable only as a last ! resort. */ ! if (TREE_CODE (objc_method_context) == CLASS_METHOD_DECL ! && other && other != error_mark_node) ! return other; ! ! /* Look up the ivar, but do not use it if it is not accessible. */ ! ivar = is_ivar (objc_ivar_chain, id); ! ! if (!ivar || is_private (ivar)) ! return other; ! ! /* In an instance method, a local variable (or parameter) may hide the ! instance variable. */ ! if (TREE_CODE (objc_method_context) == INSTANCE_METHOD_DECL ! && other && other != error_mark_node && !DECL_FILE_SCOPE_P (other)) { ! warning ("local declaration of %qs hides instance variable", ! IDENTIFIER_POINTER (id)); ! ! return other; } ! ! /* At this point, we are either in an instance method with no obscuring ! local definitions, or in a class method with no alternate definitions ! at all. */ ! return build_ivar_reference (id); } #include "gt-objc-objc-act.h" diff -Nrcpad gcc-3.4.3/gcc/objc/objc-act.h gcc-4.0.0/gcc/objc/objc-act.h *** gcc-3.4.3/gcc/objc/objc-act.h Wed Oct 15 00:10:27 2003 --- gcc-4.0.0/gcc/objc/objc-act.h Sat Jan 29 12:16:36 2005 *************** *** 1,5 **** /* Declarations for objc-act.c. ! Copyright (C) 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GCC. --- 1,5 ---- /* Declarations for objc-act.c. ! Copyright (C) 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GCC. *************** Boston, MA 02111-1307, USA. */ *** 22,92 **** #ifndef GCC_OBJC_ACT_H #define GCC_OBJC_ACT_H ! /*** Public Interface (procedures) ***/ bool objc_init (void); const char *objc_printable_name (tree, int); ! /* used by yyparse */ ! ! void finish_file (void); ! tree start_class (enum tree_code, tree, tree, tree); ! tree continue_class (tree); ! void finish_class (tree); ! void start_method_def (tree); ! void continue_method_def (void); ! void finish_method_def (void); ! tree start_protocol (enum tree_code, tree, tree); ! void finish_protocol (tree); ! ! tree objc_build_throw_stmt (tree); ! tree objc_build_try_catch_finally_stmt (int, int); ! void objc_build_synchronized_prologue (tree); ! tree objc_build_synchronized_epilogue (void); ! tree objc_build_try_prologue (void); ! void objc_build_try_epilogue (int); ! void objc_build_catch_stmt (tree); ! void objc_build_catch_epilogue (void); ! tree objc_build_finally_prologue (void); ! tree objc_build_finally_epilogue (void); ! ! tree is_ivar (tree, tree); ! int is_private (tree); ! int is_public (tree, tree); ! tree add_instance_variable (tree, int, tree, tree, tree); ! tree objc_add_method (tree, tree, int); ! tree get_super_receiver (void); ! void objc_clear_super_receiver (void); ! tree get_class_ivars_from_name (tree); ! tree get_class_reference (tree); ! tree get_static_reference (tree, tree); ! tree get_object_reference (tree); ! tree build_message_expr (tree); ! tree finish_message_expr (tree, tree, tree); ! tree build_selector_expr (tree); ! tree build_ivar_reference (tree); ! tree build_keyword_decl (tree, tree, tree); ! tree build_method_decl (enum tree_code, tree, tree, tree); ! tree build_protocol_expr (tree); ! tree build_objc_string_object (tree); ! ! void objc_declare_alias (tree, tree); ! void objc_declare_class (tree); ! void objc_declare_protocols (tree); ! ! /* the following routines are used to implement statically typed objects */ ! ! int objc_comptypes (tree, tree, int); ! void objc_check_decl (tree); ! ! /* NeXT extensions */ ! ! tree build_encode_expr (tree); /* Objective-C structures */ ! #define CLASS_BINFO_ELTS 6 ! #define PROTOCOL_BINFO_ELTS 2 /* KEYWORD_DECL */ #define KEYWORD_KEY_NAME(DECL) ((DECL)->decl.name) --- 22,43 ---- #ifndef GCC_OBJC_ACT_H #define GCC_OBJC_ACT_H ! /*** Language hooks ***/ bool objc_init (void); const char *objc_printable_name (tree, int); + void objc_finish_file (void); + tree objc_fold_obj_type_ref (tree, tree); + int objc_types_compatible_p (tree, tree); ! /* NB: The remaining public functions are prototyped in c-common.h, for the ! benefit of stub-objc.c and objc-act.c. */ /* Objective-C structures */ ! #define CLASS_LANG_SLOT_ELTS 5 ! #define PROTOCOL_LANG_SLOT_ELTS 2 ! #define OBJC_INFO_SLOT_ELTS 2 /* KEYWORD_DECL */ #define KEYWORD_KEY_NAME(DECL) ((DECL)->decl.name) *************** tree build_encode_expr (tree); *** 104,137 **** PROTOCOL_INTERFACE_TYPE */ #define CLASS_NAME(CLASS) ((CLASS)->type.name) #define CLASS_SUPER_NAME(CLASS) (TYPE_CHECK (CLASS)->type.context) ! #define CLASS_IVARS(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 0) ! #define CLASS_RAW_IVARS(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 1) #define CLASS_NST_METHODS(CLASS) ((CLASS)->type.minval) #define CLASS_CLS_METHODS(CLASS) ((CLASS)->type.maxval) ! #define CLASS_STATIC_TEMPLATE(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 2) ! #define CLASS_CATEGORY_LIST(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 3) ! #define CLASS_PROTOCOL_LIST(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 4) ! #define CLASS_OWN_IVARS(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 5) #define PROTOCOL_NAME(CLASS) ((CLASS)->type.name) ! #define PROTOCOL_LIST(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 0) #define PROTOCOL_NST_METHODS(CLASS) ((CLASS)->type.minval) #define PROTOCOL_CLS_METHODS(CLASS) ((CLASS)->type.maxval) ! #define PROTOCOL_FORWARD_DECL(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 1) #define PROTOCOL_DEFINED(CLASS) TREE_USED (CLASS) - /* We need to distinguish TYPE_PROTOCOL_LISTs from TYPE_CONTEXTs, both of which - are stored in the same accessor slot. */ - #define TYPE_PROTOCOL_LIST(TYPE) \ - ((TYPE_CHECK (TYPE)->type.context \ - && TREE_CODE ((TYPE)->type.context) == TREE_LIST) \ - ? (TYPE)->type.context : NULL_TREE) - #define SET_TYPE_PROTOCOL_LIST(TYPE, P) (TYPE_CHECK (TYPE)->type.context = (P)) ! /* Set by `continue_class' and checked by `is_public'. */ ! #define TREE_STATIC_TEMPLATE(record_type) (TREE_PUBLIC (record_type)) ! #define TYPED_OBJECT(type) \ ! (TREE_CODE (type) == RECORD_TYPE && TREE_STATIC_TEMPLATE (type)) ! #define OBJC_TYPE_NAME(type) TYPE_NAME(type) /* Define the Objective-C or Objective-C++ language-specific tree codes. */ --- 55,119 ---- PROTOCOL_INTERFACE_TYPE */ #define CLASS_NAME(CLASS) ((CLASS)->type.name) #define CLASS_SUPER_NAME(CLASS) (TYPE_CHECK (CLASS)->type.context) ! #define CLASS_IVARS(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 0) ! #define CLASS_RAW_IVARS(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 1) #define CLASS_NST_METHODS(CLASS) ((CLASS)->type.minval) #define CLASS_CLS_METHODS(CLASS) ((CLASS)->type.maxval) ! #define CLASS_STATIC_TEMPLATE(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 2) ! #define CLASS_CATEGORY_LIST(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 3) ! #define CLASS_PROTOCOL_LIST(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 4) #define PROTOCOL_NAME(CLASS) ((CLASS)->type.name) ! #define PROTOCOL_LIST(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 0) #define PROTOCOL_NST_METHODS(CLASS) ((CLASS)->type.minval) #define PROTOCOL_CLS_METHODS(CLASS) ((CLASS)->type.maxval) ! #define PROTOCOL_FORWARD_DECL(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 1) #define PROTOCOL_DEFINED(CLASS) TREE_USED (CLASS) ! /* ObjC-specific information pertaining to RECORD_TYPEs are stored in ! the LANG_SPECIFIC structures, which may itself need allocating first. */ ! #define TYPE_OBJC_INFO(TYPE) TYPE_LANG_SPECIFIC (TYPE)->objc_info ! #define TYPE_HAS_OBJC_INFO(TYPE) \ ! (TYPE_LANG_SPECIFIC (TYPE) \ ! && TYPE_LANG_SPECIFIC (TYPE)->objc_info) ! #define TYPE_OBJC_INTERFACE(TYPE) TREE_VEC_ELT (TYPE_OBJC_INFO (TYPE), 0) ! #define TYPE_OBJC_PROTOCOL_LIST(TYPE) TREE_VEC_ELT (TYPE_OBJC_INFO (TYPE), 1) ! #define INIT_TYPE_OBJC_INFO(TYPE) \ ! do \ ! { \ ! if (!TYPE_LANG_SPECIFIC (TYPE)) \ ! TYPE_LANG_SPECIFIC (TYPE) \ ! = ALLOC_OBJC_TYPE_LANG_SPECIFIC; \ ! if (!TYPE_LANG_SPECIFIC (TYPE)->objc_info) \ ! TYPE_LANG_SPECIFIC (TYPE)->objc_info \ ! = make_tree_vec (OBJC_INFO_SLOT_ELTS); \ ! } \ ! while (0) ! #define DUP_TYPE_OBJC_INFO(DST, SRC) \ ! do \ ! { \ ! TYPE_LANG_SPECIFIC (DST) \ ! = ALLOC_OBJC_TYPE_LANG_SPECIFIC; \ ! if (TYPE_LANG_SPECIFIC (SRC)) \ ! memcpy (TYPE_LANG_SPECIFIC (DST), \ ! TYPE_LANG_SPECIFIC (SRC), \ ! SIZEOF_OBJC_TYPE_LANG_SPECIFIC); \ ! TYPE_LANG_SPECIFIC (DST)->objc_info \ ! = make_tree_vec (OBJC_INFO_SLOT_ELTS); \ ! } \ ! while (0) ! ! /* The following two macros must be overridden (in objcp/objcp-decl.h) ! for Objective-C++. */ ! #define ALLOC_OBJC_TYPE_LANG_SPECIFIC GGC_CNEW (struct lang_type) ! #define SIZEOF_OBJC_TYPE_LANG_SPECIFIC sizeof (struct lang_type) ! ! #define TYPED_OBJECT(TYPE) \ ! (TREE_CODE (TYPE) == RECORD_TYPE \ ! && TYPE_HAS_OBJC_INFO (TYPE) \ ! && TYPE_OBJC_INTERFACE (TYPE)) ! #define OBJC_TYPE_NAME(TYPE) TYPE_NAME(TYPE) ! #define OBJC_SET_TYPE_NAME(TYPE, NAME) (TYPE_NAME (TYPE) = NAME) /* Define the Objective-C or Objective-C++ language-specific tree codes. */ *************** struct imp_entry GTY(()) *** 185,192 **** }; extern GTY(()) struct imp_entry *imp_list; ! extern int imp_count; /* `@implementation' */ ! extern int cat_count; /* `@category' */ /* Objective-C/Objective-C++ global tree enumeration. */ --- 167,177 ---- }; extern GTY(()) struct imp_entry *imp_list; ! extern GTY(()) int imp_count; /* `@implementation' */ ! extern GTY(()) int cat_count; /* `@category' */ ! ! extern GTY(()) enum tree_code objc_inherit_code; ! extern GTY(()) int objc_public_flag; /* Objective-C/Objective-C++ global tree enumeration. */ *************** enum objc_tree_index *** 197,203 **** OCTI_SELF_ID, OCTI_UCMD_ID, OCTI_UNUSED_LIST, - OCTI_ELLIPSIS_NODE, OCTI_SELF_DECL, OCTI_UMSG_DECL, --- 182,187 ---- *************** enum objc_tree_index *** 234,240 **** OCTI_MCLS_DECL, OCTI_SEL_TABLE_DECL, OCTI_MODULES_DECL, ! OCTI_STRG_DECL, OCTI_INTF_CTX, OCTI_IMPL_CTX, --- 218,224 ---- OCTI_MCLS_DECL, OCTI_SEL_TABLE_DECL, OCTI_MODULES_DECL, ! OCTI_GNU_INIT_DECL, OCTI_INTF_CTX, OCTI_IMPL_CTX, *************** enum objc_tree_index *** 255,267 **** OCTI_MODULE_TEMPL, OCTI_SUPER_TEMPL, OCTI_OBJ_REF, OCTI_METH_PROTO_TEMPL, OCTI_FUNCTION1_TEMPL, OCTI_FUNCTION2_TEMPL, OCTI_OBJ_ID, OCTI_CLS_ID, ! OCTI_ID_ID, OCTI_CNST_STR_ID, OCTI_CNST_STR_TYPE, OCTI_CNST_STR_GLOB_ID, --- 239,253 ---- OCTI_MODULE_TEMPL, OCTI_SUPER_TEMPL, OCTI_OBJ_REF, + OCTI_CLS_REF, OCTI_METH_PROTO_TEMPL, OCTI_FUNCTION1_TEMPL, OCTI_FUNCTION2_TEMPL, OCTI_OBJ_ID, OCTI_CLS_ID, ! OCTI_ID_NAME, ! OCTI_CLASS_NAME, OCTI_CNST_STR_ID, OCTI_CNST_STR_TYPE, OCTI_CNST_STR_GLOB_ID, *************** enum objc_tree_index *** 283,290 **** OCTI_LOCAL_EXCEPTION_DECL, OCTI_RETHROW_EXCEPTION_DECL, OCTI_EVAL_ONCE_DECL, - OCTI_EXCEPTION_BLK_STACK, OCTI_CATCH_TYPE, OCTI_MAX }; --- 269,276 ---- OCTI_LOCAL_EXCEPTION_DECL, OCTI_RETHROW_EXCEPTION_DECL, OCTI_EVAL_ONCE_DECL, OCTI_CATCH_TYPE, + OCTI_EXECCLASS_DECL, OCTI_MAX }; *************** extern GTY(()) tree objc_global_trees[OC *** 302,308 **** #define self_id objc_global_trees[OCTI_SELF_ID] #define ucmd_id objc_global_trees[OCTI_UCMD_ID] #define unused_list objc_global_trees[OCTI_UNUSED_LIST] - #define objc_ellipsis_node objc_global_trees[OCTI_ELLIPSIS_NODE] #define self_decl objc_global_trees[OCTI_SELF_DECL] #define umsg_decl objc_global_trees[OCTI_UMSG_DECL] --- 288,293 ---- *************** extern GTY(()) tree objc_global_trees[OC *** 313,333 **** #define objc_get_meta_class_decl \ objc_global_trees[OCTI_GET_MCLASS_DECL] ! #define super_type objc_global_trees[OCTI_SUPER_TYPE] ! #define selector_type objc_global_trees[OCTI_SEL_TYPE] ! #define id_type objc_global_trees[OCTI_ID_TYPE] #define objc_class_type objc_global_trees[OCTI_CLS_TYPE] ! #define instance_type objc_global_trees[OCTI_NST_TYPE] ! #define protocol_type objc_global_trees[OCTI_PROTO_TYPE] /* Type checking macros. */ ! #define IS_ID(TYPE) \ ! (TYPE_MAIN_VARIANT (TYPE) == TYPE_MAIN_VARIANT (id_type)) ! #define IS_PROTOCOL_QUALIFIED_ID(TYPE) \ ! (IS_ID (TYPE) && TYPE_PROTOCOL_LIST (TYPE)) ! #define IS_SUPER(TYPE) \ ! (TREE_CODE (TYPE) == POINTER_TYPE && TREE_TYPE (TYPE) == objc_super_template) #define class_chain objc_global_trees[OCTI_CLS_CHAIN] #define alias_chain objc_global_trees[OCTI_ALIAS_CHAIN] --- 298,327 ---- #define objc_get_meta_class_decl \ objc_global_trees[OCTI_GET_MCLASS_DECL] ! #define objc_super_type objc_global_trees[OCTI_SUPER_TYPE] ! #define objc_selector_type objc_global_trees[OCTI_SEL_TYPE] ! #define objc_object_type objc_global_trees[OCTI_ID_TYPE] #define objc_class_type objc_global_trees[OCTI_CLS_TYPE] ! #define objc_instance_type objc_global_trees[OCTI_NST_TYPE] ! #define objc_protocol_type objc_global_trees[OCTI_PROTO_TYPE] /* Type checking macros. */ ! #define IS_ID(TYPE) \ ! (TREE_CODE (TYPE) == POINTER_TYPE \ ! && (TYPE_MAIN_VARIANT (TREE_TYPE (TYPE)) \ ! == TREE_TYPE (objc_object_type))) ! #define IS_CLASS(TYPE) \ ! (TREE_CODE (TYPE) == POINTER_TYPE \ ! && (TYPE_MAIN_VARIANT (TREE_TYPE (TYPE)) \ ! == TREE_TYPE (objc_class_type))) ! #define IS_PROTOCOL_QUALIFIED_UNTYPED(TYPE) \ ! ((IS_ID (TYPE) || IS_CLASS (TYPE)) \ ! && TYPE_HAS_OBJC_INFO (TREE_TYPE (TYPE)) \ ! && TYPE_OBJC_PROTOCOL_LIST (TREE_TYPE (TYPE))) ! #define IS_SUPER(TYPE) \ ! (TREE_CODE (TYPE) == POINTER_TYPE \ ! && TREE_TYPE (TYPE) == objc_super_template) #define class_chain objc_global_trees[OCTI_CLS_CHAIN] #define alias_chain objc_global_trees[OCTI_ALIAS_CHAIN] *************** extern GTY(()) tree objc_global_trees[OC *** 360,366 **** #define UOBJC_METACLASS_decl objc_global_trees[OCTI_MCLS_DECL] #define UOBJC_SELECTOR_TABLE_decl objc_global_trees[OCTI_SEL_TABLE_DECL] #define UOBJC_MODULES_decl objc_global_trees[OCTI_MODULES_DECL] ! #define UOBJC_STRINGS_decl objc_global_trees[OCTI_STRG_DECL] /* The following are used when compiling a class implementation. implementation_template will normally be an interface, however if --- 354,360 ---- #define UOBJC_METACLASS_decl objc_global_trees[OCTI_MCLS_DECL] #define UOBJC_SELECTOR_TABLE_decl objc_global_trees[OCTI_SEL_TABLE_DECL] #define UOBJC_MODULES_decl objc_global_trees[OCTI_MODULES_DECL] ! #define GNU_INIT_decl objc_global_trees[OCTI_GNU_INIT_DECL] /* The following are used when compiling a class implementation. implementation_template will normally be an interface, however if *************** extern GTY(()) tree objc_global_trees[OC *** 404,419 **** #define objc_caught_exception objc_global_trees[OCTI_LOCAL_EXCEPTION_DECL] #define objc_rethrow_exception objc_global_trees[OCTI_RETHROW_EXCEPTION_DECL] #define objc_eval_once objc_global_trees[OCTI_EVAL_ONCE_DECL] - #define objc_exception_block_stack \ - objc_global_trees[OCTI_EXCEPTION_BLK_STACK] #define objc_catch_type objc_global_trees[OCTI_CATCH_TYPE] #define objc_method_template objc_global_trees[OCTI_METH_TEMPL] #define objc_ivar_template objc_global_trees[OCTI_IVAR_TEMPL] #define objc_symtab_template objc_global_trees[OCTI_SYMTAB_TEMPL] #define objc_module_template objc_global_trees[OCTI_MODULE_TEMPL] #define objc_super_template objc_global_trees[OCTI_SUPER_TEMPL] #define objc_object_reference objc_global_trees[OCTI_OBJ_REF] #define objc_method_prototype_template \ objc_global_trees[OCTI_METH_PROTO_TEMPL] #define function1_template objc_global_trees[OCTI_FUNCTION1_TEMPL] --- 398,414 ---- #define objc_caught_exception objc_global_trees[OCTI_LOCAL_EXCEPTION_DECL] #define objc_rethrow_exception objc_global_trees[OCTI_RETHROW_EXCEPTION_DECL] #define objc_eval_once objc_global_trees[OCTI_EVAL_ONCE_DECL] #define objc_catch_type objc_global_trees[OCTI_CATCH_TYPE] + #define execclass_decl objc_global_trees[OCTI_EXECCLASS_DECL] + #define objc_method_template objc_global_trees[OCTI_METH_TEMPL] #define objc_ivar_template objc_global_trees[OCTI_IVAR_TEMPL] #define objc_symtab_template objc_global_trees[OCTI_SYMTAB_TEMPL] #define objc_module_template objc_global_trees[OCTI_MODULE_TEMPL] #define objc_super_template objc_global_trees[OCTI_SUPER_TEMPL] #define objc_object_reference objc_global_trees[OCTI_OBJ_REF] + #define objc_class_reference objc_global_trees[OCTI_CLS_REF] #define objc_method_prototype_template \ objc_global_trees[OCTI_METH_PROTO_TEMPL] #define function1_template objc_global_trees[OCTI_FUNCTION1_TEMPL] *************** extern GTY(()) tree objc_global_trees[OC *** 421,427 **** #define objc_object_id objc_global_trees[OCTI_OBJ_ID] #define objc_class_id objc_global_trees[OCTI_CLS_ID] ! #define objc_id_id objc_global_trees[OCTI_ID_ID] #define constant_string_id objc_global_trees[OCTI_CNST_STR_ID] #define constant_string_type objc_global_trees[OCTI_CNST_STR_TYPE] #define constant_string_global_id \ --- 416,423 ---- #define objc_object_id objc_global_trees[OCTI_OBJ_ID] #define objc_class_id objc_global_trees[OCTI_CLS_ID] ! #define objc_object_name objc_global_trees[OCTI_ID_NAME] ! #define objc_class_name objc_global_trees[OCTI_CLASS_NAME] #define constant_string_id objc_global_trees[OCTI_CNST_STR_ID] #define constant_string_type objc_global_trees[OCTI_CNST_STR_TYPE] #define constant_string_global_id \ diff -Nrcpad gcc-3.4.3/gcc/objc/objc-lang.c gcc-4.0.0/gcc/objc/objc-lang.c *** gcc-3.4.3/gcc/objc/objc-lang.c Fri Aug 29 23:21:13 2003 --- gcc-4.0.0/gcc/objc/objc-lang.c Sat Jan 29 12:16:36 2005 *************** *** 1,5 **** /* Language-dependent hooks for Objective-C. ! Copyright 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Ziemowit Laski This file is part of GCC. --- 1,5 ---- /* Language-dependent hooks for Objective-C. ! Copyright 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Contributed by Ziemowit Laski This file is part of GCC. *************** Boston, MA 02111-1307, USA. */ *** 26,153 **** #include "tree.h" #include "c-tree.h" #include "c-common.h" ! #include "toplev.h" #include "objc-act.h" #include "langhooks.h" #include "langhooks-def.h" enum c_language_kind c_language = clk_objc; #undef LANG_HOOKS_NAME #define LANG_HOOKS_NAME "GNU Objective-C" #undef LANG_HOOKS_INIT #define LANG_HOOKS_INIT objc_init - #undef LANG_HOOKS_FINISH - #define LANG_HOOKS_FINISH c_common_finish - #undef LANG_HOOKS_INIT_OPTIONS - #define LANG_HOOKS_INIT_OPTIONS c_common_init_options - #undef LANG_HOOKS_HANDLE_OPTION - #define LANG_HOOKS_HANDLE_OPTION c_common_handle_option - #undef LANG_HOOKS_HANDLE_FILENAME - #define LANG_HOOKS_HANDLE_FILENAME c_common_handle_filename - #undef LANG_HOOKS_MISSING_ARGUMENT - #define LANG_HOOKS_MISSING_ARGUMENT c_common_missing_argument - #undef LANG_HOOKS_POST_OPTIONS - #define LANG_HOOKS_POST_OPTIONS c_common_post_options - #undef LANG_HOOKS_GET_ALIAS_SET - #define LANG_HOOKS_GET_ALIAS_SET c_common_get_alias_set - #undef LANG_HOOKS_SAFE_FROM_P - #define LANG_HOOKS_SAFE_FROM_P c_safe_from_p - #undef LANG_HOOKS_PARSE_FILE - #define LANG_HOOKS_PARSE_FILE c_common_parse_file - #undef LANG_HOOKS_EXPAND_EXPR - #define LANG_HOOKS_EXPAND_EXPR c_expand_expr - #undef LANG_HOOKS_MARK_ADDRESSABLE - #define LANG_HOOKS_MARK_ADDRESSABLE c_mark_addressable - #undef LANG_HOOKS_TRUTHVALUE_CONVERSION - #define LANG_HOOKS_TRUTHVALUE_CONVERSION c_common_truthvalue_conversion - #undef LANG_HOOKS_FINISH_INCOMPLETE_DECL - #define LANG_HOOKS_FINISH_INCOMPLETE_DECL c_finish_incomplete_decl - #undef LANG_HOOKS_UNSAFE_FOR_REEVAL - #define LANG_HOOKS_UNSAFE_FOR_REEVAL c_common_unsafe_for_reeval - #undef LANG_HOOKS_STATICP - #define LANG_HOOKS_STATICP c_staticp - #undef LANG_HOOKS_SET_DECL_ASSEMBLER_NAME - #define LANG_HOOKS_SET_DECL_ASSEMBLER_NAME c_static_assembler_name - #undef LANG_HOOKS_NO_BODY_BLOCKS - #define LANG_HOOKS_NO_BODY_BLOCKS true - #undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL - #define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL c_dup_lang_specific_decl - #undef LANG_HOOKS_PRINT_IDENTIFIER - #define LANG_HOOKS_PRINT_IDENTIFIER c_print_identifier #undef LANG_HOOKS_DECL_PRINTABLE_NAME #define LANG_HOOKS_DECL_PRINTABLE_NAME objc_printable_name ! #undef LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL ! #define LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL c_warn_unused_global_decl ! #undef LANG_HOOKS_DECL_UNINIT ! #define LANG_HOOKS_DECL_UNINIT c_decl_uninit ! ! #undef LANG_HOOKS_FUNCTION_ENTER_NESTED ! #define LANG_HOOKS_FUNCTION_ENTER_NESTED c_push_function_context ! #undef LANG_HOOKS_FUNCTION_LEAVE_NESTED ! #define LANG_HOOKS_FUNCTION_LEAVE_NESTED c_pop_function_context ! ! #undef LANG_HOOKS_RTL_EXPAND_STMT ! #define LANG_HOOKS_RTL_EXPAND_STMT expand_stmt ! ! /* Attribute hooks. */ ! #undef LANG_HOOKS_COMMON_ATTRIBUTE_TABLE ! #define LANG_HOOKS_COMMON_ATTRIBUTE_TABLE c_common_attribute_table ! #undef LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE ! #define LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE c_common_format_attribute_table ! ! /* Inlining hooks same as the C front end. */ ! #undef LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN ! #define LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN \ ! c_cannot_inline_tree_fn ! #undef LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS ! #define LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS \ ! c_disregard_inline_limits ! #undef LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P ! #define LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P \ ! anon_aggr_type_p ! #undef LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING ! #define LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING \ ! c_convert_parm_for_inlining ! #undef LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS ! #define LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS c_estimate_num_insns ! ! #undef LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION ! #define LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION c_expand_body ! ! #undef LANG_HOOKS_TYPE_FOR_MODE ! #define LANG_HOOKS_TYPE_FOR_MODE c_common_type_for_mode ! #undef LANG_HOOKS_TYPE_FOR_SIZE ! #define LANG_HOOKS_TYPE_FOR_SIZE c_common_type_for_size ! #undef LANG_HOOKS_SIGNED_TYPE ! #define LANG_HOOKS_SIGNED_TYPE c_common_signed_type ! #undef LANG_HOOKS_UNSIGNED_TYPE ! #define LANG_HOOKS_UNSIGNED_TYPE c_common_unsigned_type ! #undef LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE ! #define LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE c_common_signed_or_unsigned_type ! #undef LANG_HOOKS_INCOMPLETE_TYPE_ERROR ! #define LANG_HOOKS_INCOMPLETE_TYPE_ERROR c_incomplete_type_error ! #undef LANG_HOOKS_TYPE_PROMOTES_TO ! #define LANG_HOOKS_TYPE_PROMOTES_TO c_type_promotes_to ! ! #undef LANG_HOOKS_WRITE_GLOBALS ! #define LANG_HOOKS_WRITE_GLOBALS c_write_global_declarations ! /* Each front end provides its own hooks, for toplev.c. */ const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; - /* Define the special tree codes that we use. */ - /* Table indexed by tree code giving a string containing a character classifying the tree code. */ #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE, ! const char tree_code_type[] = { #include "tree.def" ! 'x', #include "c-common.def" ! 'x', #include "objc-tree.def" }; #undef DEFTREECODE --- 26,66 ---- #include "tree.h" #include "c-tree.h" #include "c-common.h" ! #include "ggc.h" #include "objc-act.h" #include "langhooks.h" #include "langhooks-def.h" + #include "diagnostic.h" + #include "c-pretty-print.h" + #include "c-objc-common.h" enum c_language_kind c_language = clk_objc; + /* Lang hooks common to C and ObjC are declared in c-objc-common.h; + consequently, there should be very few hooks below. */ + #undef LANG_HOOKS_NAME #define LANG_HOOKS_NAME "GNU Objective-C" #undef LANG_HOOKS_INIT #define LANG_HOOKS_INIT objc_init #undef LANG_HOOKS_DECL_PRINTABLE_NAME #define LANG_HOOKS_DECL_PRINTABLE_NAME objc_printable_name ! #undef LANG_HOOKS_TYPES_COMPATIBLE_P ! #define LANG_HOOKS_TYPES_COMPATIBLE_P objc_types_compatible_p ! /* Each front end provides its own lang hook initializer. */ const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; /* Table indexed by tree code giving a string containing a character classifying the tree code. */ #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE, ! const enum tree_code_class tree_code_type[] = { #include "tree.def" ! tcc_exceptional, #include "c-common.def" ! tcc_exceptional, #include "objc-tree.def" }; #undef DEFTREECODE *************** const char * const tree_code_name[] = { *** 179,181 **** --- 92,105 ---- #include "objc-tree.def" }; #undef DEFTREECODE + + /* Lang hook routines common to C and ObjC appear in c-objc-common.c; + there should be very few (if any) routines below. */ + + void + finish_file (void) + { + objc_finish_file (); + } + + #include "gtype-objc.h" diff -Nrcpad gcc-3.4.3/gcc/objc/objc-parse.c gcc-4.0.0/gcc/objc/objc-parse.c *** gcc-3.4.3/gcc/objc/objc-parse.c Fri Nov 5 04:18:06 2004 --- gcc-4.0.0/gcc/objc/objc-parse.c Thu Apr 21 07:09:45 2005 *************** *** 9,80 **** # define STATIC 260 # define TYPESPEC 261 # define TYPE_QUAL 262 ! # define CONSTANT 263 ! # define STRING 264 ! # define ELLIPSIS 265 ! # define SIZEOF 266 ! # define ENUM 267 ! # define STRUCT 268 ! # define UNION 269 ! # define IF 270 ! # define ELSE 271 ! # define WHILE 272 ! # define DO 273 ! # define FOR 274 ! # define SWITCH 275 ! # define CASE 276 ! # define DEFAULT 277 ! # define BREAK 278 ! # define CONTINUE 279 ! # define RETURN 280 ! # define GOTO 281 ! # define ASM_KEYWORD 282 ! # define TYPEOF 283 ! # define ALIGNOF 284 ! # define ATTRIBUTE 285 ! # define EXTENSION 286 ! # define LABEL 287 ! # define REALPART 288 ! # define IMAGPART 289 ! # define VA_ARG 290 ! # define CHOOSE_EXPR 291 ! # define TYPES_COMPATIBLE_P 292 ! # define PTR_VALUE 293 ! # define PTR_BASE 294 ! # define PTR_EXTENT 295 ! # define FUNC_NAME 296 ! # define ASSIGN 297 ! # define OROR 298 ! # define ANDAND 299 ! # define EQCOMPARE 300 ! # define ARITHCOMPARE 301 ! # define LSHIFT 302 ! # define RSHIFT 303 ! # define UNARY 304 ! # define PLUSPLUS 305 ! # define MINUSMINUS 306 ! # define HYPERUNARY 307 ! # define POINTSAT 308 ! # define INTERFACE 309 ! # define IMPLEMENTATION 310 ! # define END 311 ! # define SELECTOR 312 ! # define DEFS 313 ! # define ENCODE 314 ! # define CLASSNAME 315 ! # define PUBLIC 316 ! # define PRIVATE 317 ! # define PROTECTED 318 ! # define PROTOCOL 319 ! # define OBJECTNAME 320 ! # define CLASS 321 ! # define ALIAS 322 ! # define AT_THROW 323 ! # define AT_TRY 324 ! # define AT_CATCH 325 ! # define AT_FINALLY 326 ! # define AT_SYNCHRONIZED 327 ! # define OBJC_STRING 328 #line 33 "objc/objc-parse.y" --- 9,78 ---- # define STATIC 260 # define TYPESPEC 261 # define TYPE_QUAL 262 ! # define OBJC_TYPE_QUAL 263 ! # define CONSTANT 264 ! # define STRING 265 ! # define ELLIPSIS 266 ! # define SIZEOF 267 ! # define ENUM 268 ! # define STRUCT 269 ! # define UNION 270 ! # define IF 271 ! # define ELSE 272 ! # define WHILE 273 ! # define DO 274 ! # define FOR 275 ! # define SWITCH 276 ! # define CASE 277 ! # define DEFAULT 278 ! # define BREAK 279 ! # define CONTINUE 280 ! # define RETURN 281 ! # define GOTO 282 ! # define ASM_KEYWORD 283 ! # define TYPEOF 284 ! # define ALIGNOF 285 ! # define ATTRIBUTE 286 ! # define EXTENSION 287 ! # define LABEL 288 ! # define REALPART 289 ! # define IMAGPART 290 ! # define VA_ARG 291 ! # define CHOOSE_EXPR 292 ! # define TYPES_COMPATIBLE_P 293 ! # define FUNC_NAME 294 ! # define OFFSETOF 295 ! # define ASSIGN 296 ! # define OROR 297 ! # define ANDAND 298 ! # define EQCOMPARE 299 ! # define ARITHCOMPARE 300 ! # define LSHIFT 301 ! # define RSHIFT 302 ! # define UNARY 303 ! # define PLUSPLUS 304 ! # define MINUSMINUS 305 ! # define HYPERUNARY 306 ! # define POINTSAT 307 ! # define AT_INTERFACE 308 ! # define AT_IMPLEMENTATION 309 ! # define AT_END 310 ! # define AT_SELECTOR 311 ! # define AT_DEFS 312 ! # define AT_ENCODE 313 ! # define CLASSNAME 314 ! # define AT_PUBLIC 315 ! # define AT_PRIVATE 316 ! # define AT_PROTECTED 317 ! # define AT_PROTOCOL 318 ! # define AT_CLASS 319 ! # define AT_ALIAS 320 ! # define AT_THROW 321 ! # define AT_TRY 322 ! # define AT_CATCH 323 ! # define AT_FINALLY 324 ! # define AT_SYNCHRONIZED 325 ! # define OBJC_STRING 326 #line 33 "objc/objc-parse.y" *************** *** 83,88 **** --- 81,87 ---- #include "coretypes.h" #include "tm.h" #include "tree.h" + #include "langhooks.h" #include "input.h" #include "cpplib.h" #include "intl.h" *************** *** 94,103 **** #include "output.h" #include "toplev.h" #include "ggc.h" - #include "objc-act.h" - - /* Like YYERROR but do call yyerror. */ #define YYERROR1 { yyerror ("syntax error"); YYERROR; } /* Like the default stack expander, except (1) use realloc when possible, --- 93,100 ---- #include "output.h" #include "toplev.h" #include "ggc.h" + #include "c-common.h" #define YYERROR1 { yyerror ("syntax error"); YYERROR; } /* Like the default stack expander, except (1) use realloc when possible, *************** do { \ *** 141,167 **** malloced_yyvs = (void *) newvs; \ } while (0) ! #line 100 "objc/objc-parse.y" #ifndef YYSTYPE ! typedef union {long itype; tree ttype; enum tree_code code; ! location_t location; } yystype; # define YYSTYPE yystype # define YYSTYPE_IS_TRIVIAL 1 #endif ! #line 248 "objc/objc-parse.y" ! ! /* Number of statements (loosely speaking) and compound statements ! seen so far. */ ! static int stmt_count; ! static int compstmt_count; ! ! /* Input location of the end of the body of last simple_if; ! used by the stmt-rule immediately after simple_if returns. */ ! static location_t if_stmt_locus; ! ! /* List of types and structure classes of the current declaration. */ ! static GTY(()) tree current_declspecs; static GTY(()) tree prefix_attributes; /* List of all the attributes applying to the identifier currently being --- 138,157 ---- malloced_yyvs = (void *) newvs; \ } while (0) ! #line 99 "objc/objc-parse.y" #ifndef YYSTYPE ! typedef union {long itype; tree ttype; void *otype; struct c_expr exprtype; ! struct c_arg_info *arginfotype; struct c_declarator *dtrtype; ! struct c_type_name *typenametype; struct c_parm *parmtype; ! struct c_declspecs *dsptype; struct c_typespec tstype; ! enum tree_code code; location_t location; } yystype; # define YYSTYPE yystype # define YYSTYPE_IS_TRIVIAL 1 #endif ! #line 264 "objc/objc-parse.y" ! /* Declaration specifiers of the current declaration. */ ! static struct c_declspecs *current_declspecs; static GTY(()) tree prefix_attributes; /* List of all the attributes applying to the identifier currently being *************** static GTY(()) tree prefix_attributes; *** 169,194 **** just after a comma. */ static GTY(()) tree all_prefix_attributes; /* Stack of saved values of current_declspecs, prefix_attributes and all_prefix_attributes. */ ! static GTY(()) tree declspec_stack; /* PUSH_DECLSPEC_STACK is called from setspecs; POP_DECLSPEC_STACK should be called from the productions making use of setspecs. */ ! #define PUSH_DECLSPEC_STACK \ ! do { \ ! declspec_stack = tree_cons (build_tree_list (prefix_attributes, \ ! all_prefix_attributes), \ ! current_declspecs, \ ! declspec_stack); \ } while (0) #define POP_DECLSPEC_STACK \ do { \ ! current_declspecs = TREE_VALUE (declspec_stack); \ ! prefix_attributes = TREE_PURPOSE (TREE_PURPOSE (declspec_stack)); \ ! all_prefix_attributes = TREE_VALUE (TREE_PURPOSE (declspec_stack)); \ ! declspec_stack = TREE_CHAIN (declspec_stack); \ } while (0) /* For __extension__, save/restore the warning flags which are --- 159,202 ---- just after a comma. */ static GTY(()) tree all_prefix_attributes; + /* Structure to save declaration specifiers. */ + struct c_declspec_stack { + /* Saved value of current_declspecs. */ + struct c_declspecs *current_declspecs; + /* Saved value of prefix_attributes. */ + tree prefix_attributes; + /* Saved value of all_prefix_attributes. */ + tree all_prefix_attributes; + /* Next level of stack. */ + struct c_declspec_stack *next; + }; + /* Stack of saved values of current_declspecs, prefix_attributes and all_prefix_attributes. */ ! static struct c_declspec_stack *declspec_stack; ! ! /* INDIRECT_REF with a TREE_TYPE of the type being queried for offsetof. */ ! static tree offsetof_base; /* PUSH_DECLSPEC_STACK is called from setspecs; POP_DECLSPEC_STACK should be called from the productions making use of setspecs. */ ! #define PUSH_DECLSPEC_STACK \ ! do { \ ! struct c_declspec_stack *t = XOBNEW (&parser_obstack, \ ! struct c_declspec_stack); \ ! t->current_declspecs = current_declspecs; \ ! t->prefix_attributes = prefix_attributes; \ ! t->all_prefix_attributes = all_prefix_attributes; \ ! t->next = declspec_stack; \ ! declspec_stack = t; \ } while (0) #define POP_DECLSPEC_STACK \ do { \ ! current_declspecs = declspec_stack->current_declspecs; \ ! prefix_attributes = declspec_stack->prefix_attributes; \ ! all_prefix_attributes = declspec_stack->all_prefix_attributes; \ ! declspec_stack = declspec_stack->next; \ } while (0) /* For __extension__, save/restore the warning flags which are *************** static GTY(()) tree declspec_stack; *** 209,216 **** /* Objective-C specific parser/lexer information */ ! static enum tree_code objc_inherit_code; ! static int objc_pq_context = 0, objc_public_flag = 0; /* The following flag is needed to contextualize ObjC lexical analysis. In some cases (e.g., 'int NSObject;'), it is undesirable to bind --- 217,223 ---- /* Objective-C specific parser/lexer information */ ! static int objc_pq_context = 0; /* The following flag is needed to contextualize ObjC lexical analysis. In some cases (e.g., 'int NSObject;'), it is undesirable to bind *************** static int objc_need_raw_identifier; *** 220,227 **** #define OBJC_NEED_RAW_IDENTIFIER(VAL) objc_need_raw_identifier = VAL - static bool parsing_iso_function_signature; - /* Tell yyparse how to print a token's value, if yydebug is set. */ #define YYPRINT(FILE,YYCHAR,YYLVAL) yyprint(FILE,YYCHAR,YYLVAL) --- 227,232 ---- *************** static inline int _yylex (void); *** 233,239 **** static int yylex (void); static void init_reswords (void); ! /* Initialisation routine for this file. */ void c_parse_init (void) { --- 238,244 ---- static int yylex (void); static void init_reswords (void); ! /* Initialization routine for this file. */ void c_parse_init (void) { *************** c_parse_init (void) *** 246,257 **** ! #define YYFINAL 1153 #define YYFLAG -32768 ! #define YYNTBASE 97 /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */ ! #define YYTRANSLATE(x) ((unsigned)(x) <= 328 ? yytranslate[x] : 365) /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */ static const char yytranslate[] = --- 251,262 ---- ! #define YYFINAL 1168 #define YYFLAG -32768 ! #define YYNTBASE 95 /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */ ! #define YYTRANSLATE(x) ((unsigned)(x) <= 326 ? yytranslate[x] : 364) /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */ static const char yytranslate[] = *************** static const char yytranslate[] = *** 259,274 **** 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 93, 2, 2, 2, 60, 51, 2, ! 67, 89, 58, 56, 94, 57, 66, 59, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 46, 90, ! 2, 44, 2, 45, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 68, 2, 96, 50, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 95, 49, 91, 92, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, --- 264,279 ---- 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 90, 2, 2, 2, 59, 50, 2, ! 66, 92, 57, 55, 91, 56, 65, 58, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 45, 87, ! 2, 43, 2, 44, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 67, 2, 94, 49, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 93, 48, 88, 89, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, *************** static const char yytranslate[] = *** 285,591 **** 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, ! 36, 37, 38, 39, 40, 41, 42, 43, 47, 48, ! 52, 53, 54, 55, 61, 62, 63, 64, 65, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, ! 80, 81, 82, 83, 84, 85, 86, 87, 88 }; #if YYDEBUG static const short yyprhs[] = { ! 0, 0, 1, 3, 4, 7, 8, 12, 14, 16, ! 18, 20, 26, 29, 33, 38, 43, 46, 49, 52, ! 54, 55, 56, 65, 70, 71, 72, 81, 86, 87, ! 88, 96, 100, 102, 104, 106, 108, 110, 112, 114, ! 116, 118, 120, 122, 124, 125, 127, 129, 133, 135, ! 138, 141, 144, 147, 150, 155, 158, 163, 166, 169, ! 171, 173, 175, 177, 182, 184, 188, 192, 196, 200, ! 204, 208, 212, 216, 220, 224, 228, 232, 233, 238, ! 239, 244, 245, 246, 254, 255, 261, 265, 269, 271, ! 273, 275, 277, 278, 286, 290, 294, 298, 302, 307, ! 314, 323, 330, 335, 339, 343, 346, 349, 351, 353, ! 355, 357, 359, 361, 362, 364, 367, 369, 371, 374, ! 377, 382, 387, 390, 393, 396, 397, 399, 404, 409, ! 413, 417, 420, 423, 425, 428, 431, 434, 437, 440, ! 442, 445, 447, 450, 453, 456, 459, 462, 465, 467, ! 470, 473, 476, 479, 482, 485, 488, 491, 494, 497, ! 500, 503, 506, 509, 512, 515, 517, 520, 523, 526, ! 529, 532, 535, 538, 541, 544, 547, 550, 553, 556, ! 559, 562, 565, 568, 571, 574, 577, 580, 583, 586, ! 589, 592, 595, 598, 601, 604, 607, 610, 613, 616, ! 619, 622, 625, 628, 631, 634, 637, 640, 643, 646, ! 649, 651, 653, 655, 657, 659, 661, 663, 665, 667, ! 669, 671, 673, 675, 677, 679, 681, 683, 685, 687, ! 689, 691, 693, 695, 697, 699, 701, 703, 705, 707, ! 709, 711, 713, 715, 717, 719, 721, 723, 725, 727, ! 729, 731, 733, 735, 737, 739, 741, 743, 745, 747, ! 749, 751, 753, 755, 757, 759, 761, 762, 764, 766, ! 768, 770, 772, 774, 776, 778, 781, 784, 786, 791, ! 796, 798, 803, 805, 810, 811, 816, 817, 824, 828, ! 829, 836, 840, 841, 843, 845, 848, 855, 857, 861, ! 862, 864, 869, 876, 881, 883, 885, 887, 889, 891, ! 893, 895, 896, 901, 903, 904, 907, 909, 913, 917, ! 920, 921, 926, 928, 929, 934, 936, 938, 940, 943, ! 946, 952, 956, 957, 958, 965, 966, 967, 974, 976, ! 978, 983, 987, 990, 994, 996, 998, 1000, 1002, 1006, ! 1009, 1011, 1013, 1017, 1020, 1024, 1028, 1033, 1037, 1042, ! 1046, 1049, 1051, 1053, 1056, 1058, 1061, 1063, 1066, 1067, ! 1075, 1081, 1082, 1090, 1096, 1097, 1106, 1107, 1115, 1118, ! 1121, 1124, 1125, 1127, 1128, 1130, 1132, 1135, 1136, 1140, ! 1143, 1148, 1152, 1155, 1159, 1161, 1163, 1166, 1168, 1173, ! 1175, 1180, 1183, 1188, 1192, 1195, 1200, 1204, 1206, 1210, ! 1212, 1214, 1218, 1219, 1223, 1224, 1226, 1227, 1229, 1232, ! 1234, 1236, 1238, 1242, 1245, 1249, 1254, 1258, 1261, 1264, ! 1266, 1271, 1275, 1280, 1286, 1292, 1294, 1296, 1298, 1300, ! 1302, 1305, 1308, 1311, 1314, 1316, 1319, 1322, 1325, 1327, ! 1330, 1333, 1336, 1339, 1341, 1344, 1346, 1348, 1350, 1352, ! 1355, 1356, 1357, 1358, 1359, 1360, 1362, 1364, 1367, 1371, ! 1373, 1376, 1378, 1380, 1386, 1388, 1390, 1393, 1396, 1399, ! 1402, 1403, 1409, 1410, 1415, 1416, 1418, 1421, 1425, 1428, ! 1431, 1432, 1437, 1439, 1443, 1444, 1445, 1453, 1459, 1462, ! 1463, 1464, 1465, 1466, 1479, 1480, 1487, 1490, 1492, 1494, ! 1497, 1501, 1504, 1507, 1510, 1514, 1521, 1530, 1541, 1554, ! 1558, 1563, 1565, 1569, 1572, 1573, 1577, 1578, 1585, 1586, ! 1590, 1592, 1593, 1597, 1600, 1602, 1603, 1610, 1613, 1614, ! 1618, 1624, 1627, 1632, 1633, 1635, 1636, 1638, 1639, 1641, ! 1643, 1647, 1652, 1660, 1662, 1666, 1667, 1671, 1674, 1675, ! 1676, 1683, 1686, 1687, 1689, 1691, 1695, 1697, 1701, 1706, ! 1711, 1715, 1720, 1724, 1729, 1734, 1738, 1743, 1747, 1749, ! 1750, 1754, 1756, 1759, 1761, 1765, 1767, 1771, 1773, 1775, ! 1777, 1779, 1781, 1783, 1785, 1787, 1791, 1795, 1800, 1803, ! 1804, 1808, 1809, 1810, 1811, 1821, 1822, 1828, 1829, 1839, ! 1845, 1846, 1853, 1857, 1858, 1860, 1864, 1868, 1870, 1872, ! 1874, 1876, 1877, 1881, 1884, 1888, 1892, 1894, 1895, 1897, ! 1902, 1904, 1908, 1911, 1913, 1915, 1916, 1917, 1918, 1926, ! 1927, 1930, 1931, 1935, 1937, 1939, 1940, 1941, 1947, 1952, ! 1954, 1960, 1963, 1964, 1967, 1968, 1970, 1972, 1974, 1977, ! 1980, 1985, 1988, 1991, 1993, 1997, 2000, 2003, 2005, 2006, ! 2009, 2010, 2014, 2016, 2018, 2021, 2023, 2025, 2027, 2029, ! 2031, 2033, 2035, 2037, 2039, 2041, 2043, 2045, 2047, 2049, ! 2051, 2053, 2055, 2057, 2059, 2061, 2063, 2065, 2067, 2069, ! 2071, 2073, 2080, 2084, 2090, 2093, 2095, 2097, 2099, 2102, ! 2104, 2108, 2111, 2113, 2115, 2117, 2122, 2124, 2126, 2128, ! 2131, 2134, 2136, 2141, 2146 }; static const short yyrhs[] = { ! -1, 98, 0, 0, 99, 101, 0, 0, 98, 100, ! 101, 0, 102, 0, 104, 0, 103, 0, 307, 0, ! 28, 67, 113, 89, 90, 0, 306, 101, 0, 135, ! 169, 90, 0, 155, 135, 169, 90, 0, 154, 135, ! 168, 90, 0, 161, 90, 0, 1, 90, 0, 1, ! 91, 0, 90, 0, 0, 0, 154, 135, 198, 105, ! 129, 258, 106, 247, 0, 154, 135, 198, 1, 0, ! 0, 0, 155, 135, 203, 107, 129, 258, 108, 247, ! 0, 155, 135, 203, 1, 0, 0, 0, 135, 203, ! 109, 129, 258, 110, 247, 0, 135, 203, 1, 0, ! 3, 0, 4, 0, 80, 0, 75, 0, 51, 0, ! 57, 0, 56, 0, 62, 0, 63, 0, 92, 0, ! 93, 0, 115, 0, 0, 115, 0, 121, 0, 115, ! 94, 121, 0, 127, 0, 58, 120, 0, 306, 120, ! 0, 112, 120, 0, 48, 111, 0, 117, 116, 0, ! 117, 67, 224, 89, 0, 118, 116, 0, 118, 67, ! 224, 89, 0, 34, 120, 0, 35, 120, 0, 12, ! 0, 30, 0, 29, 0, 116, 0, 67, 224, 89, ! 120, 0, 120, 0, 121, 56, 121, 0, 121, 57, ! 121, 0, 121, 58, 121, 0, 121, 59, 121, 0, ! 121, 60, 121, 0, 121, 54, 121, 0, 121, 55, ! 121, 0, 121, 53, 121, 0, 121, 52, 121, 0, ! 121, 51, 121, 0, 121, 49, 121, 0, 121, 50, ! 121, 0, 0, 121, 48, 122, 121, 0, 0, 121, ! 47, 123, 121, 0, 0, 0, 121, 45, 124, 113, ! 46, 125, 121, 0, 0, 121, 45, 126, 46, 121, ! 0, 121, 44, 121, 0, 121, 43, 121, 0, 3, ! 0, 9, 0, 10, 0, 42, 0, 0, 67, 224, ! 89, 95, 128, 184, 91, 0, 67, 113, 89, 0, ! 67, 1, 89, 0, 251, 249, 89, 0, 251, 1, ! 89, 0, 127, 67, 114, 89, 0, 36, 67, 121, ! 94, 224, 89, 0, 37, 67, 121, 94, 121, 94, ! 121, 89, 0, 38, 67, 224, 94, 224, 89, 0, ! 127, 68, 113, 96, 0, 127, 66, 111, 0, 127, ! 65, 111, 0, 127, 62, 0, 127, 63, 0, 358, ! 0, 362, 0, 363, 0, 364, 0, 88, 0, 130, ! 0, 0, 132, 0, 258, 133, 0, 131, 0, 239, ! 0, 132, 131, 0, 131, 239, 0, 156, 135, 168, ! 90, 0, 157, 135, 169, 90, 0, 156, 90, 0, ! 157, 90, 0, 258, 137, 0, 0, 175, 0, 154, ! 135, 168, 90, 0, 155, 135, 169, 90, 0, 154, ! 135, 192, 0, 155, 135, 195, 0, 161, 90, 0, ! 306, 137, 0, 8, 0, 138, 8, 0, 139, 8, ! 0, 138, 176, 0, 140, 8, 0, 141, 8, 0, ! 176, 0, 140, 176, 0, 163, 0, 142, 8, 0, ! 143, 8, 0, 142, 165, 0, 143, 165, 0, 138, ! 163, 0, 139, 163, 0, 164, 0, 142, 176, 0, ! 142, 166, 0, 143, 166, 0, 138, 164, 0, 139, ! 164, 0, 144, 8, 0, 145, 8, 0, 144, 165, ! 0, 145, 165, 0, 140, 163, 0, 141, 163, 0, ! 144, 176, 0, 144, 166, 0, 145, 166, 0, 140, ! 164, 0, 141, 164, 0, 181, 0, 146, 8, 0, ! 147, 8, 0, 138, 181, 0, 139, 181, 0, 146, ! 181, 0, 147, 181, 0, 146, 176, 0, 148, 8, ! 0, 149, 8, 0, 140, 181, 0, 141, 181, 0, ! 148, 181, 0, 149, 181, 0, 148, 176, 0, 150, ! 8, 0, 151, 8, 0, 150, 165, 0, 151, 165, ! 0, 146, 163, 0, 147, 163, 0, 142, 181, 0, ! 143, 181, 0, 150, 181, 0, 151, 181, 0, 150, ! 176, 0, 150, 166, 0, 151, 166, 0, 146, 164, ! 0, 147, 164, 0, 152, 8, 0, 153, 8, 0, ! 152, 165, 0, 153, 165, 0, 148, 163, 0, 149, ! 163, 0, 144, 181, 0, 145, 181, 0, 152, 181, ! 0, 153, 181, 0, 152, 176, 0, 152, 166, 0, ! 153, 166, 0, 148, 164, 0, 149, 164, 0, 142, ! 0, 143, 0, 144, 0, 145, 0, 150, 0, 151, ! 0, 152, 0, 153, 0, 138, 0, 139, 0, 140, ! 0, 141, 0, 146, 0, 147, 0, 148, 0, 149, ! 0, 142, 0, 143, 0, 150, 0, 151, 0, 138, ! 0, 139, 0, 146, 0, 147, 0, 142, 0, 143, ! 0, 144, 0, 145, 0, 138, 0, 139, 0, 140, ! 0, 141, 0, 142, 0, 143, 0, 144, 0, 145, ! 0, 138, 0, 139, 0, 140, 0, 141, 0, 138, 0, 139, 0, 140, 0, 141, 0, 142, 0, 143, ! 0, 144, 0, 145, 0, 146, 0, 147, 0, 148, ! 0, 149, 0, 150, 0, 151, 0, 152, 0, 153, ! 0, 0, 159, 0, 165, 0, 167, 0, 166, 0, ! 7, 0, 212, 0, 207, 0, 4, 0, 75, 320, ! 0, 80, 320, 0, 321, 0, 119, 67, 113, 89, ! 0, 119, 67, 224, 89, 0, 171, 0, 168, 94, ! 136, 171, 0, 173, 0, 169, 94, 136, 173, 0, ! 0, 28, 67, 10, 89, 0, 0, 198, 170, 175, ! 44, 172, 182, 0, 198, 170, 175, 0, 0, 203, ! 170, 175, 44, 174, 182, 0, 203, 170, 175, 0, ! 0, 176, 0, 177, 0, 176, 177, 0, 31, 67, ! 67, 178, 89, 89, 0, 179, 0, 178, 94, 179, ! 0, 0, 180, 0, 180, 67, 3, 89, 0, 180, ! 67, 3, 94, 115, 89, 0, 180, 67, 114, 89, ! 0, 111, 0, 181, 0, 7, 0, 8, 0, 6, ! 0, 5, 0, 121, 0, 0, 95, 183, 184, 91, ! 0, 1, 0, 0, 185, 213, 0, 186, 0, 185, ! 94, 186, 0, 190, 44, 188, 0, 191, 188, 0, ! 0, 111, 46, 187, 188, 0, 188, 0, 0, 95, ! 189, 184, 91, 0, 121, 0, 1, 0, 191, 0, ! 190, 191, 0, 66, 111, 0, 68, 121, 11, 121, ! 96, 0, 68, 121, 96, 0, 0, 0, 198, 193, ! 129, 258, 194, 252, 0, 0, 0, 203, 196, 129, ! 258, 197, 252, 0, 199, 0, 203, 0, 67, 175, ! 199, 89, 0, 199, 67, 301, 0, 199, 232, 0, ! 58, 162, 199, 0, 4, 0, 80, 0, 201, 0, ! 202, 0, 201, 67, 301, 0, 201, 232, 0, 4, ! 0, 80, 0, 202, 67, 301, 0, 202, 232, 0, ! 58, 162, 201, 0, 58, 162, 202, 0, 67, 175, ! 202, 89, 0, 203, 67, 301, 0, 67, 175, 203, ! 89, 0, 58, 162, 203, 0, 203, 232, 0, 3, ! 0, 14, 0, 14, 176, 0, 15, 0, 15, 176, ! 0, 13, 0, 13, 176, 0, 0, 204, 111, 95, ! 208, 215, 91, 175, 0, 204, 95, 215, 91, 175, ! 0, 0, 205, 111, 95, 209, 215, 91, 175, 0, ! 205, 95, 215, 91, 175, 0, 0, 206, 111, 95, ! 210, 222, 214, 91, 175, 0, 0, 206, 95, 211, ! 222, 214, 91, 175, 0, 204, 111, 0, 205, 111, ! 0, 206, 111, 0, 0, 94, 0, 0, 94, 0, ! 216, 0, 216, 217, 0, 0, 216, 217, 90, 0, ! 216, 90, 0, 73, 67, 75, 89, 0, 158, 135, ! 218, 0, 158, 135, 0, 159, 135, 219, 0, 159, ! 0, 1, 0, 306, 217, 0, 220, 0, 218, 94, ! 136, 220, 0, 221, 0, 219, 94, 136, 221, 0, ! 198, 175, 0, 198, 46, 121, 175, 0, 46, 121, ! 175, 0, 203, 175, 0, 203, 46, 121, 175, 0, ! 46, 121, 175, 0, 223, 0, 222, 94, 223, 0, ! 1, 0, 111, 0, 111, 44, 121, 0, 0, 160, ! 225, 226, 0, 0, 228, 0, 0, 228, 0, 229, ! 176, 0, 230, 0, 229, 0, 231, 0, 58, 162, ! 229, 0, 58, 162, 0, 58, 162, 230, 0, 67, ! 175, 228, 89, 0, 231, 67, 291, 0, 231, 232, ! 0, 67, 291, 0, 232, 0, 68, 162, 121, 96, ! 0, 68, 162, 96, 0, 68, 162, 58, 96, 0, ! 68, 6, 162, 121, 96, 0, 68, 159, 6, 121, ! 96, 0, 234, 0, 235, 0, 236, 0, 237, 0, ! 261, 0, 234, 261, 0, 235, 261, 0, 236, 261, ! 0, 237, 261, 0, 134, 0, 234, 134, 0, 235, ! 134, 0, 237, 134, 0, 262, 0, 234, 262, 0, ! 235, 262, 0, 236, 262, 0, 237, 262, 0, 239, ! 0, 238, 239, 0, 234, 0, 235, 0, 236, 0, ! 237, 0, 1, 90, 0, 0, 0, 0, 0, 0, ! 245, 0, 246, 0, 245, 246, 0, 33, 305, 90, ! 0, 252, 0, 1, 252, 0, 95, 0, 91, 0, ! 240, 244, 250, 91, 241, 0, 233, 0, 1, 0, ! 67, 95, 0, 248, 249, 0, 254, 260, 0, 254, ! 1, 0, 0, 16, 255, 67, 113, 89, 0, 0, ! 19, 257, 260, 18, 0, 0, 261, 0, 262, 259, ! 0, 242, 259, 243, 0, 258, 273, 0, 258, 284, ! 0, 0, 253, 17, 264, 260, 0, 253, 0, 253, ! 17, 1, 0, 0, 0, 18, 265, 67, 113, 89, ! 266, 260, 0, 256, 67, 113, 89, 90, 0, 256, ! 1, 0, 0, 0, 0, 0, 20, 267, 67, 272, ! 268, 286, 90, 269, 286, 89, 270, 260, 0, 0, ! 21, 67, 113, 89, 271, 260, 0, 286, 90, 0, ! 137, 0, 252, 0, 113, 90, 0, 242, 263, 243, ! 0, 24, 90, 0, 25, 90, 0, 26, 90, 0, ! 26, 113, 90, 0, 28, 285, 67, 113, 89, 90, ! 0, 28, 285, 67, 113, 46, 287, 89, 90, 0, ! 28, 285, 67, 113, 46, 287, 46, 287, 89, 90, ! 0, 28, 285, 67, 113, 46, 287, 46, 287, 46, ! 290, 89, 90, 0, 27, 111, 90, 0, 27, 58, ! 113, 90, 0, 90, 0, 83, 113, 90, 0, 83, ! 90, 0, 0, 276, 274, 283, 0, 0, 87, 67, ! 113, 89, 275, 252, 0, 0, 278, 277, 280, 0, ! 278, 0, 0, 84, 279, 252, 0, 280, 281, 0, ! 281, 0, 0, 85, 67, 298, 89, 282, 252, 0, ! 86, 252, 0, 0, 22, 121, 46, 0, 22, 121, ! 11, 121, 46, 0, 23, 46, 0, 111, 258, 46, ! 175, 0, 0, 8, 0, 0, 113, 0, 0, 288, ! 0, 289, 0, 288, 94, 289, 0, 10, 67, 113, ! 89, 0, 68, 111, 96, 10, 67, 113, 89, 0, ! 10, 0, 290, 94, 10, 0, 0, 175, 292, 293, ! 0, 296, 89, 0, 0, 0, 297, 90, 294, 175, ! 295, 293, 0, 1, 89, 0, 0, 11, 0, 297, ! 0, 297, 94, 11, 0, 299, 0, 297, 94, 298, ! 0, 154, 135, 200, 175, 0, 154, 135, 203, 175, ! 0, 154, 135, 227, 0, 155, 135, 203, 175, 0, ! 155, 135, 227, 0, 156, 300, 200, 175, 0, 156, ! 300, 203, 175, 0, 156, 300, 227, 0, 157, 300, ! 203, 175, 0, 157, 300, 227, 0, 135, 0, 0, ! 175, 302, 303, 0, 293, 0, 304, 89, 0, 3, ! 0, 304, 94, 3, 0, 111, 0, 305, 94, 111, ! 0, 32, 0, 313, 0, 309, 0, 310, 0, 318, ! 0, 329, 0, 71, 0, 111, 0, 308, 94, 111, ! 0, 81, 308, 90, 0, 82, 111, 111, 90, 0, ! 46, 111, 0, 0, 95, 322, 91, 0, 0, 0, ! 0, 69, 111, 311, 320, 314, 312, 315, 333, 71, ! 0, 0, 70, 111, 311, 316, 312, 0, 0, 69, ! 111, 67, 111, 89, 320, 317, 333, 71, 0, 70, ! 111, 67, 111, 89, 0, 0, 79, 111, 320, 319, ! 333, 71, 0, 79, 308, 90, 0, 0, 321, 0, ! 53, 308, 53, 0, 322, 323, 324, 0, 324, 0, ! 77, 0, 78, 0, 76, 0, 0, 324, 325, 90, ! 0, 324, 90, 0, 158, 135, 326, 0, 159, 135, ! 326, 0, 1, 0, 0, 327, 0, 326, 94, 136, ! 327, 0, 198, 0, 198, 46, 121, 0, 46, 121, ! 0, 56, 0, 57, 0, 0, 0, 0, 328, 330, ! 339, 331, 340, 332, 247, 0, 0, 333, 336, 0, ! 0, 333, 334, 103, 0, 90, 0, 1, 0, 0, ! 0, 328, 337, 339, 338, 335, 0, 67, 224, 89, ! 348, 0, 348, 0, 67, 224, 89, 349, 346, 0, ! 349, 346, 0, 0, 90, 341, 0, 0, 342, 0, ! 343, 0, 239, 0, 342, 343, 0, 343, 239, 0, ! 154, 135, 344, 90, 0, 154, 90, 0, 155, 90, ! 0, 345, 0, 344, 94, 345, 0, 200, 175, 0, ! 203, 175, 0, 227, 0, 0, 94, 11, 0, 0, ! 94, 347, 296, 0, 350, 0, 352, 0, 349, 352, ! 0, 3, 0, 4, 0, 75, 0, 80, 0, 351, ! 0, 13, 0, 14, 0, 15, 0, 16, 0, 17, ! 0, 18, 0, 19, 0, 20, 0, 21, 0, 22, ! 0, 23, 0, 24, 0, 25, 0, 26, 0, 27, ! 0, 28, 0, 12, 0, 29, 0, 30, 0, 7, ! 0, 8, 0, 350, 46, 67, 224, 89, 111, 0, ! 350, 46, 111, 0, 46, 67, 224, 89, 111, 0, ! 46, 111, 0, 350, 0, 354, 0, 356, 0, 354, ! 356, 0, 115, 0, 350, 46, 355, 0, 46, 355, ! 0, 113, 0, 75, 0, 4, 0, 68, 357, 353, ! 96, 0, 350, 0, 360, 0, 361, 0, 360, 361, ! 0, 350, 46, 0, 46, 0, 72, 67, 359, 89, ! 0, 79, 67, 111, 89, 0, 74, 67, 224, 89, ! 0 }; #endif --- 290,597 ---- 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, ! 36, 37, 38, 39, 40, 41, 42, 46, 47, 51, ! 52, 53, 54, 60, 61, 62, 63, 64, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, ! 80, 81, 82, 83, 84, 85, 86 }; #if YYDEBUG static const short yyprhs[] = { ! 0, 0, 1, 3, 4, 8, 9, 14, 16, 18, ! 20, 23, 25, 26, 30, 35, 40, 43, 46, 49, ! 51, 52, 53, 62, 67, 68, 69, 78, 83, 84, ! 85, 93, 97, 99, 101, 103, 105, 107, 109, 111, ! 113, 115, 117, 119, 123, 124, 126, 128, 132, 134, ! 137, 140, 143, 146, 149, 154, 157, 162, 165, 168, ! 170, 172, 174, 176, 181, 183, 187, 191, 195, 199, ! 203, 207, 211, 215, 219, 223, 227, 231, 232, 237, ! 238, 243, 244, 245, 253, 254, 260, 264, 268, 270, ! 272, 274, 276, 277, 285, 289, 293, 297, 301, 306, ! 313, 314, 322, 327, 336, 341, 348, 353, 358, 362, ! 366, 369, 372, 374, 376, 378, 380, 382, 384, 388, ! 393, 394, 396, 399, 401, 403, 406, 409, 414, 419, ! 422, 425, 428, 429, 431, 436, 441, 445, 449, 452, ! 455, 457, 460, 463, 466, 469, 472, 474, 477, 479, ! 482, 485, 488, 491, 494, 497, 499, 502, 505, 508, ! 511, 514, 517, 520, 523, 526, 529, 532, 535, 538, ! 541, 544, 547, 549, 552, 555, 558, 561, 564, 567, ! 570, 573, 576, 579, 582, 585, 588, 591, 594, 597, ! 600, 603, 606, 609, 612, 615, 618, 621, 624, 627, ! 630, 633, 636, 639, 642, 645, 648, 651, 654, 657, ! 660, 663, 666, 669, 672, 675, 678, 681, 683, 685, ! 687, 689, 691, 693, 695, 697, 699, 701, 703, 705, ! 707, 709, 711, 713, 715, 717, 719, 721, 723, 725, ! 727, 729, 731, 733, 735, 737, 739, 741, 743, 745, ! 747, 749, 751, 753, 755, 757, 759, 761, 763, 765, ! 767, 769, 771, 773, 775, 777, 779, 781, 783, 785, ! 787, 789, 791, 793, 794, 796, 798, 800, 802, 804, ! 806, 808, 810, 813, 816, 818, 823, 828, 830, 835, ! 837, 842, 843, 850, 854, 855, 862, 866, 867, 869, ! 871, 874, 883, 887, 889, 893, 894, 896, 901, 908, ! 913, 915, 917, 919, 921, 923, 925, 927, 928, 933, ! 935, 936, 939, 941, 945, 949, 952, 953, 958, 960, ! 961, 966, 968, 970, 972, 975, 978, 980, 986, 990, ! 991, 992, 999, 1000, 1001, 1008, 1010, 1012, 1017, 1021, ! 1024, 1028, 1030, 1032, 1034, 1038, 1041, 1043, 1047, 1050, ! 1054, 1058, 1063, 1067, 1072, 1076, 1079, 1081, 1083, 1086, ! 1088, 1091, 1093, 1096, 1097, 1105, 1111, 1112, 1120, 1126, ! 1127, 1136, 1137, 1145, 1148, 1151, 1154, 1155, 1157, 1158, ! 1160, 1162, 1165, 1166, 1170, 1173, 1178, 1182, 1185, 1189, ! 1191, 1193, 1196, 1198, 1203, 1205, 1210, 1213, 1218, 1222, ! 1225, 1230, 1234, 1236, 1240, 1242, 1244, 1248, 1249, 1253, ! 1254, 1256, 1257, 1259, 1262, 1264, 1266, 1268, 1272, 1275, ! 1279, 1284, 1288, 1291, 1294, 1296, 1301, 1305, 1310, 1316, ! 1322, 1324, 1326, 1328, 1330, 1332, 1335, 1338, 1341, 1344, ! 1346, 1349, 1352, 1355, 1357, 1360, 1363, 1366, 1369, 1371, ! 1374, 1376, 1378, 1380, 1382, 1385, 1386, 1387, 1389, 1391, ! 1394, 1398, 1400, 1403, 1405, 1407, 1411, 1413, 1415, 1418, ! 1421, 1422, 1423, 1426, 1430, 1433, 1436, 1439, 1443, 1447, ! 1449, 1459, 1469, 1477, 1485, 1486, 1487, 1497, 1498, 1499, ! 1513, 1514, 1516, 1519, 1521, 1524, 1526, 1539, 1540, 1549, ! 1552, 1554, 1556, 1558, 1560, 1562, 1565, 1568, 1571, 1575, ! 1577, 1581, 1586, 1588, 1592, 1595, 1597, 1604, 1609, 1613, ! 1618, 1619, 1622, 1623, 1629, 1633, 1635, 1638, 1640, 1642, ! 1646, 1652, 1655, 1660, 1667, 1668, 1670, 1673, 1678, 1687, ! 1689, 1693, 1699, 1707, 1708, 1710, 1711, 1713, 1715, 1719, ! 1726, 1736, 1738, 1742, 1744, 1745, 1746, 1747, 1751, 1754, ! 1755, 1756, 1763, 1766, 1767, 1769, 1771, 1775, 1777, 1781, ! 1786, 1791, 1795, 1800, 1804, 1809, 1814, 1818, 1823, 1827, ! 1829, 1830, 1834, 1836, 1839, 1841, 1845, 1847, 1851, 1853, ! 1855, 1857, 1859, 1861, 1863, 1865, 1867, 1871, 1875, 1880, ! 1883, 1884, 1888, 1889, 1890, 1891, 1901, 1902, 1908, 1909, ! 1919, 1925, 1926, 1933, 1937, 1938, 1940, 1944, 1945, 1949, ! 1950, 1952, 1954, 1956, 1957, 1961, 1964, 1966, 1967, 1969, ! 1971, 1973, 1974, 1975, 1982, 1983, 1986, 1987, 1991, 1993, ! 1995, 1996, 1997, 2003, 2008, 2010, 2016, 2019, 2022, 2023, ! 2027, 2028, 2031, 2033, 2035, 2038, 2040, 2042, 2044, 2046, ! 2048, 2050, 2052, 2054, 2056, 2058, 2060, 2062, 2064, 2066, ! 2068, 2070, 2072, 2074, 2076, 2078, 2080, 2082, 2084, 2086, ! 2088, 2090, 2092, 2095, 2096, 2099, 2101, 2108, 2112, 2118, ! 2121, 2123, 2125, 2127, 2130, 2132, 2136, 2139, 2141, 2143, ! 2145, 2150, 2152, 2154, 2156, 2159, 2162, 2164, 2169, 2174 }; static const short yyrhs[] = { ! -1, 96, 0, 0, 100, 97, 99, 0, 0, 96, ! 100, 98, 99, 0, 102, 0, 101, 0, 283, 0, ! 309, 99, 0, 310, 0, 0, 134, 168, 87, 0, ! 154, 134, 168, 87, 0, 153, 134, 167, 87, 0, ! 160, 87, 0, 1, 87, 0, 1, 88, 0, 87, ! 0, 0, 0, 153, 134, 197, 103, 129, 249, 104, ! 243, 0, 153, 134, 197, 1, 0, 0, 0, 154, ! 134, 202, 105, 129, 249, 106, 243, 0, 154, 134, ! 202, 1, 0, 0, 0, 134, 202, 107, 129, 249, ! 108, 243, 0, 134, 202, 1, 0, 3, 0, 4, ! 0, 74, 0, 50, 0, 56, 0, 55, 0, 61, ! 0, 62, 0, 89, 0, 90, 0, 119, 0, 111, ! 91, 119, 0, 0, 113, 0, 119, 0, 113, 91, ! 119, 0, 125, 0, 57, 118, 0, 309, 118, 0, ! 110, 118, 0, 47, 109, 0, 115, 114, 0, 115, ! 66, 223, 92, 0, 116, 114, 0, 116, 66, 223, ! 92, 0, 35, 118, 0, 36, 118, 0, 13, 0, ! 31, 0, 30, 0, 114, 0, 66, 223, 92, 118, ! 0, 118, 0, 119, 55, 119, 0, 119, 56, 119, ! 0, 119, 57, 119, 0, 119, 58, 119, 0, 119, ! 59, 119, 0, 119, 53, 119, 0, 119, 54, 119, ! 0, 119, 52, 119, 0, 119, 51, 119, 0, 119, ! 50, 119, 0, 119, 48, 119, 0, 119, 49, 119, ! 0, 0, 119, 47, 120, 119, 0, 0, 119, 46, ! 121, 119, 0, 0, 0, 119, 44, 122, 111, 45, ! 123, 119, 0, 0, 119, 44, 124, 45, 119, 0, ! 119, 43, 119, 0, 119, 42, 119, 0, 3, 0, ! 10, 0, 11, 0, 40, 0, 0, 66, 223, 92, ! 93, 126, 182, 88, 0, 66, 111, 92, 0, 66, ! 1, 92, 0, 247, 245, 92, 0, 247, 1, 92, ! 0, 125, 66, 112, 92, 0, 37, 66, 119, 91, ! 223, 92, 0, 0, 41, 66, 223, 91, 127, 128, ! 92, 0, 41, 66, 1, 92, 0, 38, 66, 119, ! 91, 119, 91, 119, 92, 0, 38, 66, 1, 92, ! 0, 39, 66, 223, 91, 223, 92, 0, 39, 66, ! 1, 92, 0, 125, 67, 111, 94, 0, 125, 65, ! 109, 0, 125, 64, 109, 0, 125, 61, 0, 125, ! 62, 0, 357, 0, 361, 0, 362, 0, 363, 0, ! 86, 0, 109, 0, 128, 65, 109, 0, 128, 67, ! 111, 94, 0, 0, 131, 0, 249, 132, 0, 130, ! 0, 238, 0, 131, 130, 0, 130, 238, 0, 155, ! 134, 167, 87, 0, 156, 134, 168, 87, 0, 155, ! 87, 0, 156, 87, 0, 249, 136, 0, 0, 173, ! 0, 153, 134, 167, 87, 0, 154, 134, 168, 87, ! 0, 153, 134, 191, 0, 154, 134, 194, 0, 160, ! 87, 0, 309, 136, 0, 8, 0, 137, 8, 0, ! 138, 8, 0, 137, 174, 0, 139, 8, 0, 140, ! 8, 0, 174, 0, 139, 174, 0, 162, 0, 141, ! 8, 0, 142, 8, 0, 141, 164, 0, 142, 164, ! 0, 137, 162, 0, 138, 162, 0, 163, 0, 141, ! 174, 0, 141, 165, 0, 142, 165, 0, 137, 163, ! 0, 138, 163, 0, 143, 8, 0, 144, 8, 0, ! 143, 164, 0, 144, 164, 0, 139, 162, 0, 140, ! 162, 0, 143, 174, 0, 143, 165, 0, 144, 165, ! 0, 139, 163, 0, 140, 163, 0, 179, 0, 145, ! 8, 0, 146, 8, 0, 137, 179, 0, 138, 179, ! 0, 145, 179, 0, 146, 179, 0, 145, 174, 0, ! 147, 8, 0, 148, 8, 0, 139, 179, 0, 140, ! 179, 0, 147, 179, 0, 148, 179, 0, 147, 174, ! 0, 149, 8, 0, 150, 8, 0, 149, 164, 0, ! 150, 164, 0, 145, 162, 0, 146, 162, 0, 141, ! 179, 0, 142, 179, 0, 149, 179, 0, 150, 179, ! 0, 149, 174, 0, 149, 165, 0, 150, 165, 0, ! 145, 163, 0, 146, 163, 0, 151, 8, 0, 152, ! 8, 0, 151, 164, 0, 152, 164, 0, 147, 162, ! 0, 148, 162, 0, 143, 179, 0, 144, 179, 0, ! 151, 179, 0, 152, 179, 0, 151, 174, 0, 151, ! 165, 0, 152, 165, 0, 147, 163, 0, 148, 163, ! 0, 141, 0, 142, 0, 143, 0, 144, 0, 149, ! 0, 150, 0, 151, 0, 152, 0, 137, 0, 138, ! 0, 139, 0, 140, 0, 145, 0, 146, 0, 147, ! 0, 148, 0, 141, 0, 142, 0, 149, 0, 150, ! 0, 137, 0, 138, 0, 145, 0, 146, 0, 141, ! 0, 142, 0, 143, 0, 144, 0, 137, 0, 138, 0, 139, 0, 140, 0, 141, 0, 142, 0, 143, ! 0, 144, 0, 137, 0, 138, 0, 139, 0, 140, ! 0, 137, 0, 138, 0, 139, 0, 140, 0, 141, ! 0, 142, 0, 143, 0, 144, 0, 145, 0, 146, ! 0, 147, 0, 148, 0, 149, 0, 150, 0, 151, ! 0, 152, 0, 0, 158, 0, 164, 0, 166, 0, ! 165, 0, 7, 0, 211, 0, 206, 0, 4, 0, ! 74, 323, 0, 4, 324, 0, 324, 0, 117, 66, ! 111, 92, 0, 117, 66, 223, 92, 0, 169, 0, ! 167, 91, 135, 169, 0, 171, 0, 168, 91, 135, ! 171, 0, 0, 197, 282, 173, 43, 170, 180, 0, ! 197, 282, 173, 0, 0, 202, 282, 173, 43, 172, ! 180, 0, 202, 282, 173, 0, 0, 174, 0, 175, ! 0, 174, 175, 0, 32, 292, 66, 66, 176, 92, ! 92, 293, 0, 32, 1, 293, 0, 177, 0, 176, ! 91, 177, 0, 0, 178, 0, 178, 66, 3, 92, ! 0, 178, 66, 3, 91, 113, 92, 0, 178, 66, ! 112, 92, 0, 109, 0, 179, 0, 7, 0, 8, ! 0, 6, 0, 5, 0, 119, 0, 0, 93, 181, ! 182, 88, 0, 1, 0, 0, 183, 212, 0, 184, ! 0, 183, 91, 184, 0, 188, 43, 186, 0, 190, ! 186, 0, 0, 109, 45, 185, 186, 0, 186, 0, ! 0, 93, 187, 182, 88, 0, 119, 0, 1, 0, ! 189, 0, 188, 189, 0, 65, 109, 0, 190, 0, ! 67, 119, 12, 119, 94, 0, 67, 119, 94, 0, ! 0, 0, 197, 192, 129, 249, 193, 248, 0, 0, ! 0, 202, 195, 129, 249, 196, 248, 0, 198, 0, ! 202, 0, 66, 173, 198, 92, 0, 198, 66, 304, ! 0, 198, 231, 0, 57, 161, 198, 0, 4, 0, ! 200, 0, 201, 0, 200, 66, 304, 0, 200, 231, ! 0, 4, 0, 201, 66, 304, 0, 201, 231, 0, ! 57, 161, 200, 0, 57, 161, 201, 0, 66, 173, ! 201, 92, 0, 202, 66, 304, 0, 66, 173, 202, ! 92, 0, 57, 161, 202, 0, 202, 231, 0, 3, ! 0, 15, 0, 15, 174, 0, 16, 0, 16, 174, ! 0, 14, 0, 14, 174, 0, 0, 203, 109, 93, ! 207, 214, 88, 173, 0, 203, 93, 214, 88, 173, ! 0, 0, 204, 109, 93, 208, 214, 88, 173, 0, ! 204, 93, 214, 88, 173, 0, 0, 205, 109, 93, ! 209, 221, 213, 88, 173, 0, 0, 205, 93, 210, ! 221, 213, 88, 173, 0, 203, 109, 0, 204, 109, ! 0, 205, 109, 0, 0, 91, 0, 0, 91, 0, ! 215, 0, 215, 216, 0, 0, 215, 216, 87, 0, ! 215, 87, 0, 72, 66, 74, 92, 0, 157, 134, ! 217, 0, 157, 134, 0, 158, 134, 218, 0, 158, ! 0, 1, 0, 309, 216, 0, 219, 0, 217, 91, ! 135, 219, 0, 220, 0, 218, 91, 135, 220, 0, ! 197, 173, 0, 197, 45, 119, 173, 0, 45, 119, ! 173, 0, 202, 173, 0, 202, 45, 119, 173, 0, ! 45, 119, 173, 0, 222, 0, 221, 91, 222, 0, ! 1, 0, 109, 0, 109, 43, 119, 0, 0, 159, ! 224, 225, 0, 0, 227, 0, 0, 227, 0, 228, ! 174, 0, 229, 0, 228, 0, 230, 0, 57, 161, ! 228, 0, 57, 161, 0, 57, 161, 229, 0, 66, ! 173, 227, 92, 0, 230, 66, 294, 0, 230, 231, ! 0, 66, 294, 0, 231, 0, 67, 161, 119, 94, ! 0, 67, 161, 94, 0, 67, 161, 57, 94, 0, ! 67, 6, 161, 119, 94, 0, 67, 158, 6, 119, ! 94, 0, 233, 0, 234, 0, 235, 0, 236, 0, ! 252, 0, 233, 252, 0, 234, 252, 0, 235, 252, ! 0, 236, 252, 0, 133, 0, 233, 133, 0, 234, ! 133, 0, 236, 133, 0, 253, 0, 233, 253, 0, ! 234, 253, 0, 235, 253, 0, 236, 253, 0, 238, ! 0, 237, 238, 0, 233, 0, 234, 0, 235, 0, ! 236, 0, 1, 87, 0, 0, 0, 241, 0, 242, ! 0, 241, 242, 0, 34, 308, 87, 0, 248, 0, ! 1, 248, 0, 93, 0, 88, 0, 240, 246, 88, ! 0, 232, 0, 1, 0, 66, 93, 0, 244, 245, ! 0, 0, 0, 250, 253, 0, 239, 250, 252, 0, ! 249, 279, 0, 249, 280, 0, 249, 111, 0, 239, ! 250, 257, 0, 239, 250, 87, 0, 251, 0, 17, ! 239, 249, 66, 254, 92, 255, 18, 256, 0, 17, ! 239, 249, 66, 254, 92, 256, 18, 256, 0, 17, ! 239, 249, 66, 254, 92, 255, 0, 17, 239, 249, ! 66, 254, 92, 256, 0, 0, 0, 19, 239, 249, ! 66, 254, 92, 258, 259, 251, 0, 0, 0, 20, ! 239, 249, 258, 259, 251, 19, 262, 263, 66, 254, ! 92, 87, 0, 0, 111, 0, 264, 87, 0, 136, ! 0, 249, 264, 0, 264, 0, 21, 239, 66, 265, ! 249, 266, 87, 267, 92, 258, 259, 251, 0, 0, ! 22, 239, 66, 111, 92, 270, 258, 251, 0, 111, ! 87, 0, 257, 0, 260, 0, 261, 0, 268, 0, ! 269, 0, 25, 87, 0, 26, 87, 0, 27, 87, ! 0, 27, 111, 87, 0, 284, 0, 28, 109, 87, ! 0, 28, 57, 111, 87, 0, 87, 0, 81, 111, ! 87, 0, 81, 87, 0, 278, 0, 85, 249, 66, ! 111, 92, 248, 0, 83, 66, 301, 92, 0, 272, ! 93, 245, 0, 272, 93, 1, 88, 0, 0, 274, ! 273, 0, 0, 82, 249, 248, 276, 274, 0, 84, ! 249, 248, 0, 275, 0, 275, 277, 0, 248, 0, ! 271, 0, 23, 119, 45, 0, 23, 119, 12, 119, ! 45, 0, 24, 45, 0, 109, 249, 45, 173, 0, ! 29, 292, 66, 291, 92, 293, 0, 0, 281, 0, ! 281, 87, 0, 29, 1, 293, 87, 0, 29, 286, ! 292, 66, 285, 92, 293, 87, 0, 291, 0, 291, ! 45, 287, 0, 291, 45, 287, 45, 287, 0, 291, ! 45, 287, 45, 287, 45, 290, 0, 0, 8, 0, ! 0, 288, 0, 289, 0, 288, 91, 289, 0, 291, ! 293, 66, 111, 92, 292, 0, 67, 109, 94, 291, ! 293, 66, 111, 92, 292, 0, 291, 0, 290, 91, ! 291, 0, 11, 0, 0, 0, 0, 173, 295, 296, ! 0, 299, 92, 0, 0, 0, 300, 87, 297, 173, ! 298, 296, 0, 1, 92, 0, 0, 12, 0, 300, ! 0, 300, 91, 12, 0, 302, 0, 300, 91, 301, ! 0, 153, 134, 199, 173, 0, 153, 134, 202, 173, ! 0, 153, 134, 226, 0, 154, 134, 202, 173, 0, ! 154, 134, 226, 0, 155, 303, 199, 173, 0, 155, ! 303, 202, 173, 0, 155, 303, 226, 0, 156, 303, ! 202, 173, 0, 156, 303, 226, 0, 134, 0, 0, ! 173, 305, 306, 0, 296, 0, 307, 92, 0, 3, ! 0, 307, 91, 3, 0, 109, 0, 308, 91, 109, ! 0, 33, 0, 316, 0, 312, 0, 313, 0, 321, ! 0, 331, 0, 70, 0, 109, 0, 311, 91, 109, ! 0, 79, 311, 87, 0, 80, 109, 109, 87, 0, ! 45, 109, 0, 0, 93, 325, 88, 0, 0, 0, ! 0, 68, 109, 314, 323, 317, 315, 318, 334, 70, ! 0, 0, 69, 109, 314, 319, 315, 0, 0, 68, ! 109, 66, 109, 92, 323, 320, 334, 70, 0, 69, ! 109, 66, 109, 92, 0, 0, 78, 109, 323, 322, ! 334, 70, 0, 78, 311, 87, 0, 0, 324, 0, ! 52, 311, 52, 0, 0, 325, 326, 327, 0, 0, ! 76, 0, 77, 0, 75, 0, 0, 327, 328, 87, ! 0, 327, 87, 0, 216, 0, 0, 87, 0, 55, ! 0, 56, 0, 0, 0, 330, 332, 340, 329, 333, ! 243, 0, 0, 334, 337, 0, 0, 334, 335, 101, ! 0, 87, 0, 1, 0, 0, 0, 330, 338, 340, ! 339, 336, 0, 66, 350, 92, 344, 0, 344, 0, ! 66, 350, 92, 345, 341, 0, 345, 341, 0, 342, ! 343, 0, 0, 342, 91, 301, 0, 0, 91, 12, ! 0, 346, 0, 351, 0, 345, 351, 0, 3, 0, ! 4, 0, 74, 0, 347, 0, 14, 0, 15, 0, ! 16, 0, 17, 0, 18, 0, 19, 0, 20, 0, ! 21, 0, 22, 0, 23, 0, 24, 0, 25, 0, ! 26, 0, 27, 0, 28, 0, 29, 0, 13, 0, ! 30, 0, 31, 0, 7, 0, 8, 0, 9, 0, ! 9, 0, 349, 348, 0, 0, 349, 223, 0, 349, ! 0, 346, 45, 66, 350, 92, 109, 0, 346, 45, ! 109, 0, 45, 66, 350, 92, 109, 0, 45, 109, ! 0, 346, 0, 353, 0, 355, 0, 353, 355, 0, ! 113, 0, 346, 45, 354, 0, 45, 354, 0, 111, ! 0, 74, 0, 4, 0, 67, 356, 352, 94, 0, ! 346, 0, 359, 0, 360, 0, 359, 360, 0, 346, ! 45, 0, 45, 0, 71, 66, 358, 92, 0, 78, ! 66, 109, 92, 0, 73, 66, 223, 92, 0 }; #endif *************** static const short yyrhs[] = *** 594,672 **** /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const short yyrline[] = { ! 0, 342, 346, 353, 353, 355, 355, 358, 363, 365, ! 366, 367, 375, 379, 387, 389, 391, 393, 394, 395, ! 400, 400, 400, 412, 414, 414, 414, 425, 427, 427, ! 427, 438, 442, 444, 445, 446, 449, 451, 453, 456, ! 458, 460, 462, 466, 470, 473, 476, 479, 483, 485, ! 488, 491, 495, 497, 503, 506, 509, 512, 514, 518, ! 522, 526, 530, 532, 536, 538, 540, 542, 544, 546, ! 548, 550, 552, 554, 556, 558, 560, 562, 562, 569, ! 569, 576, 576, 576, 586, 586, 597, 604, 615, 622, ! 623, 624, 626, 626, 639, 644, 646, 660, 666, 668, ! 671, 681, 691, 693, 700, 709, 711, 713, 715, 717, ! 719, 721, 725, 732, 743, 753, 758, 760, 761, 762, ! 769, 772, 774, 777, 785, 794, 804, 809, 812, 814, ! 816, 818, 820, 876, 880, 883, 888, 894, 898, 903, ! 907, 912, 916, 919, 922, 925, 928, 931, 936, 940, ! 943, 946, 949, 952, 957, 961, 964, 967, 970, 973, ! 978, 982, 985, 988, 991, 996, 1000, 1003, 1006, 1012, ! 1018, 1024, 1032, 1038, 1042, 1045, 1051, 1057, 1063, 1071, ! 1077, 1081, 1084, 1087, 1090, 1093, 1096, 1102, 1108, 1114, ! 1122, 1126, 1129, 1132, 1135, 1140, 1144, 1147, 1150, 1153, ! 1156, 1159, 1165, 1171, 1177, 1185, 1189, 1192, 1195, 1198, ! 1204, 1206, 1207, 1208, 1209, 1210, 1211, 1212, 1215, 1217, ! 1218, 1219, 1220, 1221, 1222, 1223, 1226, 1228, 1229, 1230, ! 1233, 1235, 1236, 1237, 1240, 1242, 1243, 1244, 1247, 1249, ! 1250, 1251, 1254, 1256, 1257, 1258, 1259, 1260, 1261, 1262, ! 1265, 1267, 1268, 1269, 1270, 1271, 1272, 1273, 1274, 1275, ! 1276, 1277, 1278, 1279, 1280, 1281, 1285, 1288, 1313, 1315, ! 1318, 1322, 1325, 1328, 1332, 1337, 1339, 1344, 1346, 1352, ! 1358, 1360, 1363, 1365, 1368, 1371, 1375, 1375, 1384, 1391, ! 1391, 1400, 1407, 1410, 1414, 1417, 1421, 1426, 1429, 1433, ! 1436, 1438, 1440, 1442, 1449, 1451, 1452, 1453, 1456, 1458, ! 1463, 1465, 1465, 1469, 1474, 1478, 1481, 1483, 1488, 1492, ! 1495, 1495, 1501, 1504, 1504, 1509, 1511, 1514, 1516, 1519, ! 1522, 1526, 1530, 1530, 1530, 1561, 1561, 1561, 1595, 1597, ! 1602, 1605, 1610, 1612, 1614, 1615, 1622, 1624, 1627, 1633, ! 1635, 1636, 1639, 1645, 1647, 1649, 1651, 1658, 1664, 1666, ! 1668, 1670, 1673, 1676, 1680, 1683, 1687, 1690, 1700, 1700, ! 1708, 1712, 1712, 1717, 1721, 1721, 1726, 1726, 1733, 1736, ! 1738, 1746, 1748, 1751, 1753, 1770, 1773, 1778, 1780, 1782, ! 1786, 1790, 1794, 1804, 1807, 1812, 1814, 1819, 1821, 1825, ! 1827, 1831, 1836, 1840, 1846, 1851, 1855, 1864, 1866, 1871, ! 1876, 1879, 1883, 1883, 1891, 1894, 1897, 1902, 1906, 1912, ! 1914, 1917, 1919, 1923, 1926, 1930, 1933, 1935, 1937, 1939, ! 1945, 1948, 1950, 1952, 1955, 1965, 1967, 1968, 1972, 1975, ! 1977, 1978, 1979, 1980, 1983, 1985, 1991, 1992, 1995, 1997, ! 1998, 1999, 2000, 2003, 2005, 2008, 2010, 2011, 2012, 2015, ! 2018, 2025, 2034, 2050, 2065, 2067, 2072, 2074, 2077, 2091, ! 2094, 2097, 2101, 2103, 2110, 2112, 2115, 2133, 2140, 2146, ! 2149, 2149, 2170, 2170, 2193, 2199, 2201, 2205, 2211, 2225, ! 2234, 2234, 2243, 2255, 2265, 2265, 2265, 2277, 2280, 2282, ! 2282, 2282, 2282, 2282, 2299, 2299, 2308, 2311, 2316, 2319, ! 2322, 2326, 2335, 2344, 2347, 2350, 2354, 2358, 2363, 2367, ! 2379, 2385, 2387, 2391, 2395, 2395, 2399, 2399, 2405, 2405, ! 2410, 2415, 2415, 2421, 2423, 2426, 2426, 2433, 2436, 2444, ! 2447, 2450, 2453, 2468, 2471, 2475, 2478, 2483, 2485, 2488, ! 2490, 2494, 2497, 2503, 2506, 2515, 2515, 2524, 2526, 2526, ! 2526, 2533, 2539, 2541, 2552, 2556, 2562, 2565, 2571, 2577, ! 2582, 2585, 2591, 2598, 2604, 2609, 2612, 2618, 2623, 2632, ! 2632, 2641, 2643, 2660, 2663, 2668, 2671, 2675, 2686, 2688, ! 2689, 2690, 2691, 2692, 2706, 2709, 2713, 2720, 2727, 2729, ! 2732, 2734, 2737, 2737, 2737, 2754, 2754, 2766, 2766, 2778, ! 2787, 2787, 2803, 2809, 2814, 2817, 2827, 2829, 2832, 2834, ! 2835, 2838, 2843, 2844, 2861, 2865, 2868, 2872, 2875, 2876, ! 2879, 2887, 2893, 2902, 2905, 2909, 2909, 2909, 2909, 2938, ! 2940, 2941, 2941, 2944, 2946, 2949, 2949, 2949, 2966, 2972, ! 2977, 2982, 2991, 2993, 2999, 3001, 3004, 3006, 3007, 3008, ! 3011, 3014, 3016, 3020, 3023, 3030, 3035, 3039, 3043, 3048, ! 3053, 3053, 3065, 3069, 3072, 3078, 3080, 3081, 3082, 3083, ! 3086, 3087, 3087, 3087, 3087, 3087, 3087, 3087, 3088, 3088, ! 3088, 3088, 3088, 3088, 3089, 3089, 3089, 3089, 3089, 3090, ! 3090, 3093, 3099, 3104, 3109, 3115, 3117, 3120, 3122, 3129, ! 3141, 3146, 3152, 3154, 3158, 3164, 3169, 3171, 3174, 3176, ! 3182, 3187, 3193, 3200, 3209 }; #endif --- 600,677 ---- /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const short yyrline[] = { ! 0, 363, 367, 374, 374, 377, 377, 382, 384, 385, ! 386, 388, 393, 397, 401, 403, 405, 407, 408, 409, ! 414, 414, 414, 426, 428, 428, 428, 439, 441, 441, ! 441, 452, 456, 458, 459, 462, 464, 466, 469, 471, ! 473, 475, 479, 480, 485, 488, 491, 494, 498, 500, ! 504, 507, 512, 515, 522, 526, 531, 536, 539, 544, ! 548, 552, 556, 558, 563, 565, 567, 569, 571, 573, ! 575, 577, 579, 581, 583, 585, 587, 589, 589, 596, ! 596, 603, 603, 603, 615, 615, 627, 631, 638, 646, ! 648, 650, 653, 653, 674, 679, 681, 687, 692, 695, ! 699, 699, 709, 711, 723, 725, 737, 739, 742, 745, ! 751, 754, 757, 760, 763, 766, 769, 778, 781, 783, ! 787, 789, 795, 800, 802, 803, 804, 811, 814, 816, ! 819, 827, 836, 856, 861, 864, 866, 868, 870, 872, ! 917, 920, 922, 926, 931, 934, 938, 941, 945, 948, ! 950, 952, 954, 956, 958, 962, 965, 967, 969, 971, ! 973, 977, 980, 982, 984, 986, 988, 992, 995, 997, ! 999, 1001, 1005, 1008, 1010, 1012, 1014, 1016, 1018, 1022, ! 1027, 1030, 1032, 1034, 1036, 1038, 1042, 1047, 1050, 1052, ! 1054, 1056, 1058, 1060, 1062, 1064, 1066, 1070, 1073, 1075, ! 1077, 1079, 1083, 1086, 1088, 1090, 1092, 1094, 1096, 1098, ! 1100, 1102, 1106, 1109, 1111, 1113, 1115, 1120, 1122, 1123, ! 1124, 1125, 1126, 1127, 1128, 1131, 1133, 1134, 1135, 1136, ! 1137, 1138, 1139, 1142, 1144, 1145, 1146, 1149, 1151, 1152, ! 1153, 1156, 1158, 1159, 1160, 1163, 1165, 1166, 1167, 1170, ! 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1181, 1183, 1184, ! 1185, 1186, 1187, 1188, 1189, 1190, 1191, 1192, 1193, 1194, ! 1195, 1196, 1197, 1201, 1204, 1229, 1231, 1234, 1238, 1243, ! 1246, 1250, 1256, 1259, 1265, 1268, 1278, 1289, 1291, 1294, ! 1296, 1299, 1299, 1315, 1323, 1323, 1339, 1347, 1350, 1354, ! 1357, 1361, 1365, 1369, 1372, 1376, 1379, 1381, 1383, 1385, ! 1392, 1394, 1395, 1396, 1399, 1401, 1406, 1409, 1409, 1413, ! 1418, 1422, 1425, 1427, 1432, 1436, 1439, 1439, 1445, 1448, ! 1448, 1453, 1455, 1458, 1460, 1463, 1466, 1469, 1474, 1478, ! 1478, 1478, 1508, 1508, 1508, 1541, 1543, 1548, 1551, 1553, ! 1555, 1557, 1565, 1567, 1570, 1573, 1575, 1579, 1582, 1584, ! 1586, 1588, 1595, 1598, 1600, 1602, 1604, 1608, 1611, 1615, ! 1618, 1622, 1625, 1635, 1635, 1644, 1650, 1650, 1656, 1662, ! 1662, 1668, 1668, 1676, 1679, 1681, 1689, 1691, 1694, 1696, ! 1713, 1716, 1721, 1723, 1725, 1729, 1733, 1737, 1745, 1748, ! 1753, 1755, 1760, 1762, 1766, 1768, 1772, 1777, 1781, 1788, ! 1793, 1797, 1807, 1809, 1814, 1819, 1822, 1826, 1826, 1836, ! 1839, 1842, 1846, 1849, 1855, 1857, 1860, 1862, 1866, 1870, ! 1874, 1877, 1879, 1881, 1884, 1891, 1894, 1896, 1898, 1901, ! 1911, 1913, 1914, 1918, 1921, 1923, 1924, 1925, 1926, 1929, ! 1931, 1937, 1938, 1941, 1943, 1944, 1945, 1946, 1949, 1951, ! 1954, 1956, 1957, 1958, 1961, 1965, 1971, 1973, 1978, 1980, ! 1983, 1997, 2000, 2003, 2006, 2007, 2010, 2012, 2015, 2027, ! 2035, 2041, 2043, 2047, 2052, 2070, 2075, 2087, 2092, 2097, ! 2100, 2105, 2109, 2113, 2119, 2123, 2127, 2136, 2136, 2136, ! 2147, 2150, 2154, 2157, 2161, 2173, 2177, 2187, 2187, 2200, ! 2203, 2205, 2207, 2209, 2211, 2213, 2215, 2217, 2219, 2221, ! 2222, 2224, 2226, 2228, 2230, 2232, 2234, 2238, 2243, 2246, ! 2250, 2252, 2255, 2255, 2261, 2266, 2269, 2274, 2277, 2284, ! 2286, 2288, 2290, 2306, 2313, 2316, 2320, 2323, 2329, 2335, ! 2340, 2343, 2346, 2352, 2355, 2368, 2370, 2373, 2375, 2379, ! 2384, 2391, 2394, 2399, 2411, 2415, 2425, 2425, 2434, 2436, ! 2436, 2436, 2443, 2453, 2459, 2468, 2470, 2474, 2477, 2483, ! 2488, 2492, 2495, 2500, 2507, 2512, 2516, 2519, 2524, 2529, ! 2538, 2538, 2547, 2549, 2563, 2566, 2571, 2574, 2578, 2589, ! 2591, 2592, 2593, 2594, 2595, 2602, 2605, 2609, 2616, 2623, ! 2625, 2628, 2630, 2633, 2633, 2633, 2647, 2647, 2656, 2656, ! 2665, 2671, 2671, 2685, 2691, 2696, 2699, 2709, 2711, 2714, ! 2716, 2717, 2718, 2721, 2723, 2724, 2731, 2743, 2745, 2752, ! 2754, 2757, 2757, 2757, 2778, 2780, 2781, 2781, 2784, 2786, ! 2789, 2789, 2789, 2805, 2811, 2816, 2821, 2830, 2837, 2842, ! 2849, 2854, 2860, 2864, 2867, 2873, 2875, 2876, 2877, 2880, ! 2881, 2881, 2881, 2881, 2881, 2881, 2881, 2882, 2882, 2882, ! 2882, 2882, 2882, 2883, 2883, 2883, 2883, 2883, 2884, 2884, ! 2884, 2887, 2891, 2896, 2902, 2907, 2913, 2919, 2924, 2929, ! 2935, 2937, 2940, 2942, 2949, 2961, 2966, 2972, 2975, 2979, ! 2985, 2990, 2992, 2995, 2997, 3003, 3008, 3014, 3021, 3030 }; #endif *************** static const short yyrline[] = *** 677,703 **** static const char *const yytname[] = { "$", "error", "$undefined.", "IDENTIFIER", "TYPENAME", "SCSPEC", "STATIC", ! "TYPESPEC", "TYPE_QUAL", "CONSTANT", "STRING", "ELLIPSIS", "SIZEOF", ! "ENUM", "STRUCT", "UNION", "IF", "ELSE", "WHILE", "DO", "FOR", "SWITCH", ! "CASE", "DEFAULT", "BREAK", "CONTINUE", "RETURN", "GOTO", "ASM_KEYWORD", ! "TYPEOF", "ALIGNOF", "ATTRIBUTE", "EXTENSION", "LABEL", "REALPART", ! "IMAGPART", "VA_ARG", "CHOOSE_EXPR", "TYPES_COMPATIBLE_P", "PTR_VALUE", ! "PTR_BASE", "PTR_EXTENT", "FUNC_NAME", "ASSIGN", "'='", "'?'", "':'", ! "OROR", "ANDAND", "'|'", "'^'", "'&'", "EQCOMPARE", "ARITHCOMPARE", ! "LSHIFT", "RSHIFT", "'+'", "'-'", "'*'", "'/'", "'%'", "UNARY", ! "PLUSPLUS", "MINUSMINUS", "HYPERUNARY", "POINTSAT", "'.'", "'('", "'['", ! "INTERFACE", "IMPLEMENTATION", "END", "SELECTOR", "DEFS", "ENCODE", ! "CLASSNAME", "PUBLIC", "PRIVATE", "PROTECTED", "PROTOCOL", "OBJECTNAME", ! "CLASS", "ALIAS", "AT_THROW", "AT_TRY", "AT_CATCH", "AT_FINALLY", ! "AT_SYNCHRONIZED", "OBJC_STRING", "')'", "';'", "'}'", "'~'", "'!'", ! "','", "'{'", "']'", "program", "extdefs", "@1", "@2", "extdef", ! "extdef_1", "datadef", "fndef", "@3", "@4", "@5", "@6", "@7", "@8", ! "identifier", "unop", "expr", "exprlist", "nonnull_exprlist", ! "unary_expr", "sizeof", "alignof", "typeof", "cast_expr", ! "expr_no_commas", "@9", "@10", "@11", "@12", "@13", "primary", "@14", ! "old_style_parm_decls", "old_style_parm_decls_1", "lineno_datadecl", ! "datadecls", "datadecl", "lineno_decl", "setspecs", "maybe_resetattrs", ! "decl", "declspecs_nosc_nots_nosa_noea", "declspecs_nosc_nots_nosa_ea", "declspecs_nosc_nots_sa_noea", "declspecs_nosc_nots_sa_ea", "declspecs_nosc_ts_nosa_noea", "declspecs_nosc_ts_nosa_ea", "declspecs_nosc_ts_sa_noea", "declspecs_nosc_ts_sa_ea", --- 682,709 ---- static const char *const yytname[] = { "$", "error", "$undefined.", "IDENTIFIER", "TYPENAME", "SCSPEC", "STATIC", ! "TYPESPEC", "TYPE_QUAL", "OBJC_TYPE_QUAL", "CONSTANT", "STRING", ! "ELLIPSIS", "SIZEOF", "ENUM", "STRUCT", "UNION", "IF", "ELSE", "WHILE", ! "DO", "FOR", "SWITCH", "CASE", "DEFAULT", "BREAK", "CONTINUE", "RETURN", ! "GOTO", "ASM_KEYWORD", "TYPEOF", "ALIGNOF", "ATTRIBUTE", "EXTENSION", ! "LABEL", "REALPART", "IMAGPART", "VA_ARG", "CHOOSE_EXPR", ! "TYPES_COMPATIBLE_P", "FUNC_NAME", "OFFSETOF", "ASSIGN", "'='", "'?'", ! "':'", "OROR", "ANDAND", "'|'", "'^'", "'&'", "EQCOMPARE", ! "ARITHCOMPARE", "LSHIFT", "RSHIFT", "'+'", "'-'", "'*'", "'/'", "'%'", ! "UNARY", "PLUSPLUS", "MINUSMINUS", "HYPERUNARY", "POINTSAT", "'.'", ! "'('", "'['", "AT_INTERFACE", "AT_IMPLEMENTATION", "AT_END", ! "AT_SELECTOR", "AT_DEFS", "AT_ENCODE", "CLASSNAME", "AT_PUBLIC", ! "AT_PRIVATE", "AT_PROTECTED", "AT_PROTOCOL", "AT_CLASS", "AT_ALIAS", ! "AT_THROW", "AT_TRY", "AT_CATCH", "AT_FINALLY", "AT_SYNCHRONIZED", ! "OBJC_STRING", "';'", "'}'", "'~'", "'!'", "','", "')'", "'{'", "']'", ! "program", "extdefs", "@1", "@2", "extdef", "save_obstack_position", ! "datadef", "fndef", "@3", "@4", "@5", "@6", "@7", "@8", "identifier", ! "unop", "expr", "exprlist", "nonnull_exprlist", "unary_expr", "sizeof", ! "alignof", "typeof", "cast_expr", "expr_no_commas", "@9", "@10", "@11", ! "@12", "@13", "primary", "@14", "@15", "offsetof_member_designator", ! "old_style_parm_decls", "lineno_datadecl", "datadecls", "datadecl", ! "lineno_decl", "setspecs", "maybe_resetattrs", "decl", ! "declspecs_nosc_nots_nosa_noea", "declspecs_nosc_nots_nosa_ea", "declspecs_nosc_nots_sa_noea", "declspecs_nosc_nots_sa_ea", "declspecs_nosc_ts_nosa_noea", "declspecs_nosc_ts_nosa_ea", "declspecs_nosc_ts_sa_noea", "declspecs_nosc_ts_sa_ea", *************** static const char *const yytname[] = *** 710,917 **** "declspecs", "maybe_type_quals_attrs", "typespec_nonattr", "typespec_attr", "typespec_reserved_nonattr", "typespec_reserved_attr", "typespec_nonreserved_nonattr", "initdecls", "notype_initdecls", ! "maybeasm", "initdcl", "@15", "notype_initdcl", "@16", ! "maybe_attribute", "attributes", "attribute", "attribute_list", ! "attrib", "any_word", "scspec", "init", "@17", "initlist_maybe_comma", ! "initlist1", "initelt", "@18", "initval", "@19", "designator_list", ! "designator", "nested_function", "@20", "@21", "notype_nested_function", ! "@22", "@23", "declarator", "after_type_declarator", "parm_declarator", "parm_declarator_starttypename", "parm_declarator_nostarttypename", "notype_declarator", "struct_head", "union_head", "enum_head", ! "structsp_attr", "@24", "@25", "@26", "@27", "structsp_nonattr", "maybecomma", "maybecomma_warn", "component_decl_list", "component_decl_list2", "component_decl", "components", "components_notype", "component_declarator", "component_notype_declarator", "enumlist", "enumerator", "typename", ! "@28", "absdcl", "absdcl_maybe_attribute", "absdcl1", "absdcl1_noea", "absdcl1_ea", "direct_absdcl1", "array_declarator", "stmts_and_decls", "lineno_stmt_decl_or_labels_ending_stmt", "lineno_stmt_decl_or_labels_ending_decl", "lineno_stmt_decl_or_labels_ending_label", "lineno_stmt_decl_or_labels_ending_error", "lineno_stmt_decl_or_labels", ! "errstmt", "pushlevel", "poplevel", "c99_block_start", "c99_block_end", ! "maybe_label_decls", "label_decls", "label_decl", "compstmt_or_error", ! "compstmt_start", "compstmt_nostart", "compstmt_contents_nonempty", ! "compstmt_primary_start", "compstmt", "simple_if", "if_prefix", "@29", ! "do_stmt_start", "@30", "save_location", "lineno_labeled_stmt", ! "c99_block_lineno_labeled_stmt", "lineno_stmt", "lineno_label", ! "select_or_iter_stmt", "@31", "@32", "@33", "@34", "@35", "@36", "@37", ! "@38", "for_init_stmt", "stmt", "@39", "@40", "objc_try_catch_stmt", ! "@41", "objc_try_stmt", "@42", "objc_catch_list", "objc_catch_block", ! "@43", "objc_finally_block", "label", "maybe_type_qual", "xexpr", ! "asm_operands", "nonnull_asm_operands", "asm_operand", "asm_clobbers", ! "parmlist", "@44", "parmlist_1", "@45", "@46", "parmlist_2", "parms", ! "parm", "firstparm", "setspecs_fp", "parmlist_or_identifiers", "@47", ! "parmlist_or_identifiers_1", "identifiers", "identifiers_or_typenames", ! "extension", "objcdef", "identifier_list", "classdecl", "aliasdecl", ! "superclass", "class_ivars", "classdef", "@48", "@49", "@50", "@51", ! "protocoldef", "@52", "protocolrefs", "non_empty_protocolrefs", ! "ivar_decl_list", "visibility_spec", "ivar_decls", "ivar_decl", "ivars", ! "ivar_declarator", "methodtype", "methoddef", "@53", "@54", "@55", ! "methodprotolist", "@56", "semi_or_error", "methodproto", "@57", "@58", ! "methoddecl", "optarglist", "myxdecls", "mydecls", "mydecl", "myparms", ! "myparm", "optparmlist", "@59", "unaryselector", "keywordselector", ! "selector", "reservedwords", "keyworddecl", "messageargs", ! "keywordarglist", "keywordexpr", "keywordarg", "receiver", ! "objcmessageexpr", "selectorarg", "keywordnamelist", "keywordname", ! "objcselectorexpr", "objcprotocolexpr", "objcencodeexpr", 0 }; #endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const short yyr1[] = { ! 0, 97, 97, 99, 98, 100, 98, 101, 102, 102, ! 102, 102, 102, 103, 103, 103, 103, 103, 103, 103, ! 105, 106, 104, 104, 107, 108, 104, 104, 109, 110, ! 104, 104, 111, 111, 111, 111, 112, 112, 112, 112, ! 112, 112, 112, 113, 114, 114, 115, 115, 116, 116, ! 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, ! 118, 119, 120, 120, 121, 121, 121, 121, 121, 121, ! 121, 121, 121, 121, 121, 121, 121, 122, 121, 123, ! 121, 124, 125, 121, 126, 121, 121, 121, 127, 127, ! 127, 127, 128, 127, 127, 127, 127, 127, 127, 127, ! 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, ! 127, 127, 129, 130, 130, 131, 132, 132, 132, 132, ! 133, 133, 133, 133, 134, 135, 136, 137, 137, 137, ! 137, 137, 137, 138, 138, 138, 139, 140, 140, 141, ! 141, 142, 142, 142, 142, 142, 142, 142, 143, 143, ! 143, 143, 143, 143, 144, 144, 144, 144, 144, 144, ! 145, 145, 145, 145, 145, 146, 146, 146, 146, 146, ! 146, 146, 147, 148, 148, 148, 148, 148, 148, 149, ! 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, ! 151, 151, 151, 151, 151, 152, 152, 152, 152, 152, ! 152, 152, 152, 152, 152, 153, 153, 153, 153, 153, ! 154, 154, 154, 154, 154, 154, 154, 154, 155, 155, ! 155, 155, 155, 155, 155, 155, 156, 156, 156, 156, ! 157, 157, 157, 157, 158, 158, 158, 158, 159, 159, ! 159, 159, 160, 160, 160, 160, 160, 160, 160, 160, ! 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, ! 161, 161, 161, 161, 161, 161, 162, 162, 163, 163, ! 164, 165, 165, 166, 167, 167, 167, 167, 167, 167, ! 168, 168, 169, 169, 170, 170, 172, 171, 171, 174, ! 173, 173, 175, 175, 176, 176, 177, 178, 178, 179, ! 179, 179, 179, 179, 180, 180, 180, 180, 181, 181, ! 182, 183, 182, 182, 184, 184, 185, 185, 186, 186, ! 187, 186, 186, 189, 188, 188, 188, 190, 190, 191, ! 191, 191, 193, 194, 192, 196, 197, 195, 198, 198, ! 199, 199, 199, 199, 199, 199, 200, 200, 201, 201, ! 201, 201, 202, 202, 202, 202, 202, 203, 203, 203, ! 203, 203, 204, 204, 205, 205, 206, 206, 208, 207, ! 207, 209, 207, 207, 210, 207, 211, 207, 212, 212, ! 212, 213, 213, 214, 214, 215, 215, 216, 216, 216, ! 216, 217, 217, 217, 217, 217, 217, 218, 218, 219, ! 219, 220, 220, 220, 221, 221, 221, 222, 222, 222, ! 223, 223, 225, 224, 226, 226, 227, 227, 227, 228, ! 228, 229, 229, 230, 230, 231, 231, 231, 231, 231, ! 232, 232, 232, 232, 232, 233, 233, 233, 233, 234, ! 234, 234, 234, 234, 235, 235, 235, 235, 236, 236, ! 236, 236, 236, 237, 237, 238, 238, 238, 238, 239, ! 240, 241, 242, 243, 244, 244, 245, 245, 246, 247, ! 247, 248, 249, 249, 250, 250, 251, 252, 253, 253, ! 255, 254, 257, 256, 258, 259, 259, 260, 261, 262, ! 264, 263, 263, 263, 265, 266, 263, 263, 263, 267, ! 268, 269, 270, 263, 271, 263, 272, 272, 273, 273, ! 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, ! 273, 273, 273, 273, 274, 273, 275, 273, 277, 276, ! 276, 279, 278, 280, 280, 282, 281, 283, 283, 284, ! 284, 284, 284, 285, 285, 286, 286, 287, 287, 288, ! 288, 289, 289, 290, 290, 292, 291, 293, 294, 295, ! 293, 293, 296, 296, 296, 296, 297, 297, 298, 298, ! 298, 298, 298, 299, 299, 299, 299, 299, 300, 302, ! 301, 303, 303, 304, 304, 305, 305, 306, 307, 307, ! 307, 307, 307, 307, 308, 308, 309, 310, 311, 311, ! 312, 312, 314, 315, 313, 316, 313, 317, 313, 313, ! 319, 318, 318, 320, 320, 321, 322, 322, 323, 323, ! 323, 324, 324, 324, 325, 325, 325, 326, 326, 326, ! 327, 327, 327, 328, 328, 330, 331, 332, 329, 333, ! 333, 334, 333, 335, 335, 337, 338, 336, 339, 339, ! 339, 339, 340, 340, 341, 341, 342, 342, 342, 342, ! 343, 343, 343, 344, 344, 345, 345, 345, 346, 346, ! 347, 346, 348, 349, 349, 350, 350, 350, 350, 350, ! 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, ! 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, ! 351, 352, 352, 352, 352, 353, 353, 354, 354, 355, ! 356, 356, 357, 357, 357, 358, 359, 359, 360, 360, ! 361, 361, 362, 363, 364 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const short yyr2[] = { ! 0, 0, 1, 0, 2, 0, 3, 1, 1, 1, ! 1, 5, 2, 3, 4, 4, 2, 2, 2, 1, 0, 0, 8, 4, 0, 0, 8, 4, 0, 0, 7, 3, 1, 1, 1, 1, 1, 1, 1, 1, ! 1, 1, 1, 1, 0, 1, 1, 3, 1, 2, 2, 2, 2, 2, 4, 2, 4, 2, 2, 1, 1, 1, 1, 4, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 4, 0, 4, 0, 0, 7, 0, 5, 3, 3, 1, 1, 1, 1, 0, 7, 3, 3, 3, 3, 4, 6, ! 8, 6, 4, 3, 3, 2, 2, 1, 1, 1, ! 1, 1, 1, 0, 1, 2, 1, 1, 2, 2, ! 4, 4, 2, 2, 2, 0, 1, 4, 4, 3, ! 3, 2, 2, 1, 2, 2, 2, 2, 2, 1, ! 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, ! 1, 1, 1, 1, 1, 2, 2, 1, 4, 4, ! 1, 4, 1, 4, 0, 4, 0, 6, 3, 0, ! 6, 3, 0, 1, 1, 2, 6, 1, 3, 0, ! 1, 4, 6, 4, 1, 1, 1, 1, 1, 1, ! 1, 0, 4, 1, 0, 2, 1, 3, 3, 2, ! 0, 4, 1, 0, 4, 1, 1, 1, 2, 2, ! 5, 3, 0, 0, 6, 0, 0, 6, 1, 1, ! 4, 3, 2, 3, 1, 1, 1, 1, 3, 2, ! 1, 1, 3, 2, 3, 3, 4, 3, 4, 3, ! 2, 1, 1, 2, 1, 2, 1, 2, 0, 7, ! 5, 0, 7, 5, 0, 8, 0, 7, 2, 2, ! 2, 0, 1, 0, 1, 1, 2, 0, 3, 2, ! 4, 3, 2, 3, 1, 1, 2, 1, 4, 1, ! 4, 2, 4, 3, 2, 4, 3, 1, 3, 1, ! 1, 3, 0, 3, 0, 1, 0, 1, 2, 1, ! 1, 1, 3, 2, 3, 4, 3, 2, 2, 1, ! 4, 3, 4, 5, 5, 1, 1, 1, 1, 1, ! 2, 2, 2, 2, 1, 2, 2, 2, 1, 2, ! 2, 2, 2, 1, 2, 1, 1, 1, 1, 2, ! 0, 0, 0, 0, 0, 1, 1, 2, 3, 1, ! 2, 1, 1, 5, 1, 1, 2, 2, 2, 2, ! 0, 5, 0, 4, 0, 1, 2, 3, 2, 2, ! 0, 4, 1, 3, 0, 0, 7, 5, 2, 0, ! 0, 0, 0, 12, 0, 6, 2, 1, 1, 2, ! 3, 2, 2, 2, 3, 6, 8, 10, 12, 3, ! 4, 1, 3, 2, 0, 3, 0, 6, 0, 3, ! 1, 0, 3, 2, 1, 0, 6, 2, 0, 3, ! 5, 2, 4, 0, 1, 0, 1, 0, 1, 1, ! 3, 4, 7, 1, 3, 0, 3, 2, 0, 0, ! 6, 2, 0, 1, 1, 3, 1, 3, 4, 4, ! 3, 4, 3, 4, 4, 3, 4, 3, 1, 0, ! 3, 1, 2, 1, 3, 1, 3, 1, 1, 1, ! 1, 1, 1, 1, 1, 3, 3, 4, 2, 0, ! 3, 0, 0, 0, 9, 0, 5, 0, 9, 5, ! 0, 6, 3, 0, 1, 3, 3, 1, 1, 1, ! 1, 0, 3, 2, 3, 3, 1, 0, 1, 4, ! 1, 3, 2, 1, 1, 0, 0, 0, 7, 0, ! 2, 0, 3, 1, 1, 0, 0, 5, 4, 1, ! 5, 2, 0, 2, 0, 1, 1, 1, 2, 2, ! 4, 2, 2, 1, 3, 2, 2, 1, 0, 2, ! 0, 3, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 1, 6, 3, 5, 2, 1, 1, 1, 2, 1, ! 3, 2, 1, 1, 1, 4, 1, 1, 1, 2, ! 2, 1, 4, 4, 4 }; /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE --- 716,926 ---- "declspecs", "maybe_type_quals_attrs", "typespec_nonattr", "typespec_attr", "typespec_reserved_nonattr", "typespec_reserved_attr", "typespec_nonreserved_nonattr", "initdecls", "notype_initdecls", ! "initdcl", "@16", "notype_initdcl", "@17", "maybe_attribute", ! "attributes", "attribute", "attribute_list", "attrib", "any_word", ! "scspec", "init", "@18", "initlist_maybe_comma", "initlist1", "initelt", ! "@19", "initval", "@20", "designator_list", "designator", ! "array_designator", "nested_function", "@21", "@22", ! "notype_nested_function", "@23", "@24", "declarator", ! "after_type_declarator", "parm_declarator", "parm_declarator_starttypename", "parm_declarator_nostarttypename", "notype_declarator", "struct_head", "union_head", "enum_head", ! "structsp_attr", "@25", "@26", "@27", "@28", "structsp_nonattr", "maybecomma", "maybecomma_warn", "component_decl_list", "component_decl_list2", "component_decl", "components", "components_notype", "component_declarator", "component_notype_declarator", "enumlist", "enumerator", "typename", ! "@29", "absdcl", "absdcl_maybe_attribute", "absdcl1", "absdcl1_noea", "absdcl1_ea", "direct_absdcl1", "array_declarator", "stmts_and_decls", "lineno_stmt_decl_or_labels_ending_stmt", "lineno_stmt_decl_or_labels_ending_decl", "lineno_stmt_decl_or_labels_ending_label", "lineno_stmt_decl_or_labels_ending_error", "lineno_stmt_decl_or_labels", ! "errstmt", "c99_block_start", "maybe_label_decls", "label_decls", ! "label_decl", "compstmt_or_error", "compstmt_start", "compstmt_nostart", ! "compstmt_contents_nonempty", "compstmt_primary_start", "compstmt", ! "save_location", "lineno_labels", "c99_block_lineno_labeled_stmt", ! "lineno_stmt", "lineno_label", "condition", "if_statement_1", ! "if_statement_2", "if_statement", "start_break", "start_continue", ! "while_statement", "do_statement", "@30", "@31", "xexpr", ! "for_init_stmt", "for_cond_expr", "for_incr_expr", "for_statement", ! "switch_statement", "@32", "stmt_nocomp", "objc_catch_prefix", ! "objc_catch_clause", "objc_opt_catch_list", "objc_try_catch_clause", ! "@33", "objc_finally_clause", "objc_try_catch_stmt", "stmt", "label", ! "simple_asm_expr", "maybeasm", "asmdef", "asm_stmt", "asm_argument", ! "maybe_volatile", "asm_operands", "nonnull_asm_operands", "asm_operand", ! "asm_clobbers", "asm_string", "stop_string_translation", ! "start_string_translation", "parmlist", "@34", "parmlist_1", "@35", ! "@36", "parmlist_2", "parms", "parm", "firstparm", "setspecs_fp", ! "parmlist_or_identifiers", "@37", "parmlist_or_identifiers_1", ! "identifiers", "identifiers_or_typenames", "extension", "objcdef", ! "identifier_list", "classdecl", "aliasdecl", "superclass", ! "class_ivars", "classdef", "@38", "@39", "@40", "@41", "protocoldef", ! "@42", "protocolrefs", "non_empty_protocolrefs", "ivar_decl_list", ! "visibility_spec", "ivar_decls", "ivar_decl", "opt_semi", "methodtype", ! "methoddef", "@43", "@44", "methodprotolist", "@45", "semi_or_error", ! "methodproto", "@46", "@47", "methoddecl", "optparmlist", "optparms", ! "optellipsis", "unaryselector", "keywordselector", "selector", ! "reservedwords", "objc_qual", "objc_quals", "objc_typename", ! "keyworddecl", "messageargs", "keywordarglist", "keywordexpr", ! "keywordarg", "receiver", "objcmessageexpr", "selectorarg", ! "keywordnamelist", "keywordname", "objcselectorexpr", ! "objcprotocolexpr", "objcencodeexpr", 0 }; #endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const short yyr1[] = { ! 0, 95, 95, 97, 96, 98, 96, 99, 99, 99, ! 99, 99, 100, 101, 101, 101, 101, 101, 101, 101, ! 103, 104, 102, 102, 105, 106, 102, 102, 107, 108, ! 102, 102, 109, 109, 109, 110, 110, 110, 110, 110, ! 110, 110, 111, 111, 112, 112, 113, 113, 114, 114, ! 114, 114, 114, 114, 114, 114, 114, 114, 114, 115, ! 116, 117, 118, 118, 119, 119, 119, 119, 119, 119, ! 119, 119, 119, 119, 119, 119, 119, 120, 119, 121, ! 119, 122, 123, 119, 124, 119, 119, 119, 125, 125, ! 125, 125, 126, 125, 125, 125, 125, 125, 125, 125, ! 127, 125, 125, 125, 125, 125, 125, 125, 125, 125, ! 125, 125, 125, 125, 125, 125, 125, 128, 128, 128, ! 129, 129, 130, 131, 131, 131, 131, 132, 132, 132, ! 132, 133, 134, 135, 136, 136, 136, 136, 136, 136, ! 137, 137, 137, 138, 139, 139, 140, 140, 141, 141, ! 141, 141, 141, 141, 141, 142, 142, 142, 142, 142, ! 142, 143, 143, 143, 143, 143, 143, 144, 144, 144, ! 144, 144, 145, 145, 145, 145, 145, 145, 145, 146, ! 147, 147, 147, 147, 147, 147, 148, 149, 149, 149, ! 149, 149, 149, 149, 149, 149, 149, 150, 150, 150, ! 150, 150, 151, 151, 151, 151, 151, 151, 151, 151, ! 151, 151, 152, 152, 152, 152, 152, 153, 153, 153, ! 153, 153, 153, 153, 153, 154, 154, 154, 154, 154, ! 154, 154, 154, 155, 155, 155, 155, 156, 156, 156, ! 156, 157, 157, 157, 157, 158, 158, 158, 158, 159, ! 159, 159, 159, 159, 159, 159, 159, 160, 160, 160, ! 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, ! 160, 160, 160, 161, 161, 162, 162, 163, 164, 164, ! 165, 166, 166, 166, 166, 166, 166, 167, 167, 168, ! 168, 170, 169, 169, 172, 171, 171, 173, 173, 174, ! 174, 175, 175, 176, 176, 177, 177, 177, 177, 177, ! 178, 178, 178, 178, 179, 179, 180, 181, 180, 180, ! 182, 182, 183, 183, 184, 184, 185, 184, 184, 187, ! 186, 186, 186, 188, 188, 189, 189, 190, 190, 192, ! 193, 191, 195, 196, 194, 197, 197, 198, 198, 198, ! 198, 198, 199, 199, 200, 200, 200, 201, 201, 201, ! 201, 201, 202, 202, 202, 202, 202, 203, 203, 204, ! 204, 205, 205, 207, 206, 206, 208, 206, 206, 209, ! 206, 210, 206, 211, 211, 211, 212, 212, 213, 213, ! 214, 214, 215, 215, 215, 215, 216, 216, 216, 216, ! 216, 216, 217, 217, 218, 218, 219, 219, 219, 220, ! 220, 220, 221, 221, 221, 222, 222, 224, 223, 225, ! 225, 226, 226, 226, 227, 227, 228, 228, 229, 229, ! 230, 230, 230, 230, 230, 231, 231, 231, 231, 231, ! 232, 232, 232, 232, 233, 233, 233, 233, 233, 234, ! 234, 234, 234, 235, 235, 235, 235, 235, 236, 236, ! 237, 237, 237, 237, 238, 239, 240, 240, 241, 241, ! 242, 243, 243, 244, 245, 245, 246, 246, 247, 248, ! 249, 250, 250, 251, 252, 253, 254, 255, 256, 256, ! 257, 257, 257, 257, 258, 259, 260, 262, 263, 261, ! 264, 264, 265, 265, 266, 267, 268, 270, 269, 271, ! 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, ! 271, 271, 271, 271, 271, 271, 271, 272, 273, 273, ! 274, 274, 276, 275, 277, 278, 278, 279, 279, 280, ! 280, 280, 280, 281, 282, 282, 283, 283, 284, 285, ! 285, 285, 285, 286, 286, 287, 287, 288, 288, 289, ! 289, 290, 290, 291, 292, 293, 295, 294, 296, 297, ! 298, 296, 296, 299, 299, 299, 299, 300, 300, 301, ! 301, 301, 301, 301, 302, 302, 302, 302, 302, 303, ! 305, 304, 306, 306, 307, 307, 308, 308, 309, 310, ! 310, 310, 310, 310, 310, 311, 311, 312, 313, 314, ! 314, 315, 315, 317, 318, 316, 319, 316, 320, 316, ! 316, 322, 321, 321, 323, 323, 324, 325, 325, 326, ! 326, 326, 326, 327, 327, 327, 328, 329, 329, 330, ! 330, 332, 333, 331, 334, 334, 335, 334, 336, 336, ! 338, 339, 337, 340, 340, 340, 340, 341, 342, 342, ! 343, 343, 344, 345, 345, 346, 346, 346, 346, 347, ! 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, ! 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, ! 347, 348, 349, 349, 350, 350, 351, 351, 351, 351, ! 352, 352, 353, 353, 354, 355, 355, 356, 356, 356, ! 357, 358, 358, 359, 359, 360, 360, 361, 362, 363 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const short yyr2[] = { ! 0, 0, 1, 0, 3, 0, 4, 1, 1, 1, ! 2, 1, 0, 3, 4, 4, 2, 2, 2, 1, 0, 0, 8, 4, 0, 0, 8, 4, 0, 0, 7, 3, 1, 1, 1, 1, 1, 1, 1, 1, ! 1, 1, 1, 3, 0, 1, 1, 3, 1, 2, 2, 2, 2, 2, 4, 2, 4, 2, 2, 1, 1, 1, 1, 4, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 4, 0, 4, 0, 0, 7, 0, 5, 3, 3, 1, 1, 1, 1, 0, 7, 3, 3, 3, 3, 4, 6, ! 0, 7, 4, 8, 4, 6, 4, 4, 3, 3, ! 2, 2, 1, 1, 1, 1, 1, 1, 3, 4, ! 0, 1, 2, 1, 1, 2, 2, 4, 4, 2, ! 2, 2, 0, 1, 4, 4, 3, 3, 2, 2, ! 1, 2, 2, 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, ! 1, 1, 2, 2, 1, 4, 4, 1, 4, 1, ! 4, 0, 6, 3, 0, 6, 3, 0, 1, 1, ! 2, 8, 3, 1, 3, 0, 1, 4, 6, 4, ! 1, 1, 1, 1, 1, 1, 1, 0, 4, 1, ! 0, 2, 1, 3, 3, 2, 0, 4, 1, 0, ! 4, 1, 1, 1, 2, 2, 1, 5, 3, 0, ! 0, 6, 0, 0, 6, 1, 1, 4, 3, 2, ! 3, 1, 1, 1, 3, 2, 1, 3, 2, 3, ! 3, 4, 3, 4, 3, 2, 1, 1, 2, 1, ! 2, 1, 2, 0, 7, 5, 0, 7, 5, 0, ! 8, 0, 7, 2, 2, 2, 0, 1, 0, 1, ! 1, 2, 0, 3, 2, 4, 3, 2, 3, 1, ! 1, 2, 1, 4, 1, 4, 2, 4, 3, 2, ! 4, 3, 1, 3, 1, 1, 3, 0, 3, 0, ! 1, 0, 1, 2, 1, 1, 1, 3, 2, 3, ! 4, 3, 2, 2, 1, 4, 3, 4, 5, 5, ! 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, ! 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, ! 1, 1, 1, 1, 2, 0, 0, 1, 1, 2, ! 3, 1, 2, 1, 1, 3, 1, 1, 2, 2, ! 0, 0, 2, 3, 2, 2, 2, 3, 3, 1, ! 9, 9, 7, 7, 0, 0, 9, 0, 0, 13, ! 0, 1, 2, 1, 2, 1, 12, 0, 8, 2, ! 1, 1, 1, 1, 1, 2, 2, 2, 3, 1, ! 3, 4, 1, 3, 2, 1, 6, 4, 3, 4, ! 0, 2, 0, 5, 3, 1, 2, 1, 1, 3, ! 5, 2, 4, 6, 0, 1, 2, 4, 8, 1, ! 3, 5, 7, 0, 1, 0, 1, 1, 3, 6, ! 9, 1, 3, 1, 0, 0, 0, 3, 2, 0, ! 0, 6, 2, 0, 1, 1, 3, 1, 3, 4, ! 4, 3, 4, 3, 4, 4, 3, 4, 3, 1, ! 0, 3, 1, 2, 1, 3, 1, 3, 1, 1, ! 1, 1, 1, 1, 1, 1, 3, 3, 4, 2, ! 0, 3, 0, 0, 0, 9, 0, 5, 0, 9, ! 5, 0, 6, 3, 0, 1, 3, 0, 3, 0, ! 1, 1, 1, 0, 3, 2, 1, 0, 1, 1, ! 1, 0, 0, 6, 0, 2, 0, 3, 1, 1, ! 0, 0, 5, 4, 1, 5, 2, 2, 0, 3, ! 0, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 1, 1, 2, 0, 2, 1, 6, 3, 5, 2, ! 1, 1, 1, 2, 1, 3, 2, 1, 1, 1, ! 4, 1, 1, 1, 2, 2, 1, 4, 4, 4 }; /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE *************** static const short yyr2[] = *** 919,2272 **** error. */ static const short yydefact[] = { ! 3, 5, 0, 0, 0, 274, 309, 308, 271, 133, ! 366, 362, 364, 0, 61, 0, 587, 0, 633, 634, ! 0, 0, 593, 613, 0, 613, 0, 0, 19, 4, ! 7, 9, 8, 0, 0, 218, 219, 220, 221, 210, ! 211, 212, 213, 222, 223, 224, 225, 214, 215, 216, ! 217, 125, 125, 0, 141, 148, 268, 270, 269, 139, ! 294, 165, 0, 0, 0, 273, 272, 0, 10, 589, ! 590, 588, 591, 277, 635, 592, 6, 17, 18, 367, ! 363, 365, 0, 0, 32, 33, 35, 34, 594, 0, ! 599, 599, 275, 614, 613, 0, 276, 0, 0, 0, ! 361, 266, 292, 0, 282, 0, 134, 146, 152, 136, ! 168, 135, 147, 153, 169, 137, 158, 163, 140, 175, ! 138, 159, 164, 176, 142, 144, 150, 149, 186, 143, ! 145, 151, 187, 154, 156, 161, 160, 201, 155, 157, ! 162, 202, 166, 184, 193, 172, 170, 167, 185, 194, ! 171, 173, 199, 208, 179, 177, 174, 200, 209, 178, ! 180, 182, 191, 190, 188, 181, 183, 192, 189, 195, ! 197, 206, 205, 203, 196, 198, 207, 204, 0, 0, ! 16, 295, 387, 378, 387, 379, 376, 380, 12, 0, ! 88, 89, 90, 59, 60, 0, 0, 0, 0, 0, ! 91, 0, 36, 38, 37, 0, 39, 40, 0, 0, ! 0, 0, 0, 111, 41, 42, 0, 0, 43, 62, ! 0, 0, 64, 46, 48, 0, 0, 107, 108, 109, ! 110, 299, 615, 0, 0, 0, 613, 0, 605, 610, ! 612, 596, 0, 0, 246, 247, 248, 249, 242, 243, ! 244, 245, 412, 0, 238, 239, 240, 241, 267, 0, ! 0, 293, 13, 292, 31, 0, 292, 266, 0, 292, ! 360, 344, 266, 292, 345, 0, 280, 0, 338, 339, ! 0, 0, 0, 0, 0, 368, 0, 371, 0, 374, ! 675, 676, 699, 700, 696, 680, 681, 682, 683, 684, ! 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, ! 695, 697, 698, 0, 0, 677, 678, 636, 649, 668, ! 672, 679, 673, 57, 58, 0, 0, 0, 52, 49, ! 0, 476, 0, 0, 714, 713, 712, 0, 0, 0, ! 0, 51, 0, 0, 0, 53, 0, 55, 0, 0, ! 81, 79, 77, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 105, 106, 0, 0, 44, ! 0, 0, 472, 464, 0, 50, 306, 307, 304, 0, ! 297, 300, 305, 595, 598, 0, 602, 0, 601, 639, ! 597, 278, 414, 279, 359, 0, 0, 126, 0, 579, ! 357, 266, 267, 0, 0, 484, 112, 0, 484, 117, ! 0, 291, 0, 0, 15, 292, 23, 0, 292, 292, ! 342, 14, 27, 0, 0, 292, 395, 389, 238, 239, ! 240, 241, 234, 235, 236, 237, 125, 125, 386, 0, ! 387, 292, 387, 409, 410, 383, 407, 0, 0, 704, ! 0, 652, 670, 651, 0, 674, 0, 0, 0, 0, ! 95, 94, 0, 0, 705, 0, 706, 707, 721, 716, ! 0, 717, 718, 0, 0, 11, 47, 0, 0, 87, ! 86, 0, 0, 0, 0, 75, 76, 74, 73, 72, ! 70, 71, 65, 66, 67, 68, 69, 104, 103, 0, ! 45, 0, 97, 0, 0, 465, 466, 96, 0, 299, ! 44, 613, 601, 609, 621, 606, 641, 266, 292, 413, ! 415, 420, 419, 421, 429, 358, 283, 284, 0, 0, ! 0, 0, 0, 431, 0, 459, 29, 119, 118, 115, ! 230, 231, 226, 227, 232, 233, 228, 229, 125, 125, ! 289, 343, 0, 0, 484, 288, 341, 484, 0, 370, ! 392, 0, 388, 396, 0, 373, 0, 0, 384, 0, ! 383, 0, 0, 0, 637, 669, 562, 0, 702, 0, ! 0, 0, 92, 63, 709, 711, 0, 715, 0, 708, ! 720, 722, 0, 719, 724, 723, 54, 56, 0, 0, ! 80, 78, 98, 102, 585, 0, 475, 444, 474, 484, ! 484, 484, 484, 0, 453, 0, 462, 439, 448, 467, ! 296, 298, 88, 0, 607, 603, 0, 0, 611, 645, ! 0, 640, 423, 555, 428, 292, 427, 285, 0, 583, ! 563, 125, 125, 581, 0, 564, 566, 580, 0, 0, ! 0, 432, 430, 0, 122, 0, 123, 0, 0, 340, ! 281, 284, 21, 286, 25, 390, 0, 292, 391, 397, ! 0, 292, 393, 399, 292, 292, 411, 408, 292, 0, ! 0, 648, 668, 218, 219, 220, 221, 210, 211, 212, ! 213, 222, 223, 224, 225, 214, 215, 216, 217, 125, ! 0, 657, 653, 655, 0, 0, 671, 564, 0, 0, ! 0, 0, 0, 710, 82, 85, 468, 0, 445, 440, ! 449, 446, 441, 450, 462, 442, 451, 447, 443, 452, ! 454, 461, 88, 274, 0, 0, 0, 0, 0, 0, ! 543, 613, 613, 0, 531, 0, 521, 471, 484, 0, ! 124, 125, 125, 0, 0, 460, 508, 488, 524, 530, ! 489, 0, 301, 0, 303, 639, 639, 620, 618, 619, ! 600, 621, 626, 623, 125, 125, 0, 0, 642, 0, ! 125, 125, 422, 424, 0, 0, 555, 426, 561, 578, ! 416, 416, 557, 558, 0, 582, 0, 433, 434, 0, ! 30, 469, 0, 0, 313, 311, 310, 290, 0, 0, ! 0, 292, 0, 401, 292, 292, 0, 404, 292, 369, ! 372, 377, 292, 703, 650, 661, 416, 662, 658, 659, ! 638, 0, 99, 0, 101, 326, 0, 0, 323, 0, ! 325, 0, 381, 316, 322, 0, 0, 0, 586, 473, ! 0, 541, 511, 512, 513, 0, 0, 0, 544, 0, ! 523, 0, 0, 0, 0, 509, 0, 0, 131, 480, ! 494, 482, 499, 0, 492, 0, 0, 463, 477, 538, ! 0, 132, 0, 641, 641, 0, 627, 627, 622, 646, ! 0, 0, 425, 556, 350, 266, 292, 351, 292, 346, ! 347, 292, 575, 417, 420, 266, 292, 292, 577, 292, ! 565, 125, 125, 567, 584, 470, 120, 121, 0, 22, ! 287, 26, 403, 292, 0, 406, 292, 0, 375, 292, ! 292, 667, 0, 663, 701, 0, 329, 46, 0, 320, ! 93, 0, 315, 0, 0, 328, 319, 83, 0, 539, ! 514, 0, 519, 0, 522, 532, 0, 292, 0, 129, ! 332, 0, 130, 335, 0, 0, 462, 0, 0, 0, ! 479, 484, 478, 498, 0, 510, 0, 525, 0, 529, ! 534, 302, 608, 604, 0, 630, 624, 628, 625, 0, ! 423, 555, 573, 292, 349, 292, 353, 574, 418, 423, ! 555, 576, 559, 416, 416, 0, 402, 398, 405, 400, ! 665, 666, 660, 416, 100, 0, 331, 0, 0, 317, ! 318, 0, 0, 520, 0, 526, 542, 127, 0, 128, ! 0, 0, 0, 0, 545, 0, 493, 462, 463, 485, ! 484, 0, 537, 0, 533, 632, 0, 292, 644, 643, ! 647, 354, 355, 0, 348, 352, 0, 292, 292, 570, ! 292, 572, 312, 664, 0, 324, 321, 540, 547, 0, ! 0, 484, 484, 0, 0, 483, 546, 507, 500, 0, ! 504, 491, 487, 486, 0, 0, 631, 0, 356, 560, ! 568, 569, 571, 330, 0, 0, 0, 548, 549, 515, ! 527, 333, 336, 481, 495, 545, 506, 462, 497, 535, ! 629, 0, 0, 547, 0, 0, 0, 0, 462, 0, ! 505, 0, 0, 0, 0, 516, 550, 334, 337, 496, ! 501, 536, 551, 0, 0, 0, 545, 0, 553, 0, ! 517, 0, 0, 0, 0, 502, 552, 518, 554, 462, ! 503, 0, 0, 0 }; static const short yydefgoto[] = { ! 1151, 1, 2, 3, 29, 30, 31, 32, 417, 808, ! 423, 810, 268, 653, 839, 216, 332, 499, 218, 219, ! 220, 221, 33, 222, 223, 484, 483, 481, 847, 482, ! 224, 712, 405, 406, 407, 408, 539, 607, 34, 396, ! 750, 244, 245, 246, 247, 248, 249, 250, 251, 43, ! 44, 45, 46, 47, 48, 49, 50, 51, 52, 641, ! 642, 436, 258, 252, 53, 259, 54, 55, 56, 57, ! 58, 275, 103, 269, 276, 809, 104, 658, 397, 261, ! 60, 379, 380, 381, 61, 807, 918, 841, 842, 843, ! 1018, 844, 938, 845, 846, 959, 1028, 1116, 962, 1030, ! 1117, 661, 278, 929, 899, 900, 279, 62, 63, 64, ! 65, 440, 442, 447, 288, 66, 942, 569, 283, 284, ! 438, 668, 672, 669, 673, 445, 446, 253, 392, 519, ! 931, 903, 904, 522, 523, 270, 608, 609, 610, 611, ! 612, 613, 409, 373, 849, 971, 975, 504, 505, 506, ! 800, 755, 374, 615, 225, 801, 874, 875, 964, 876, ! 966, 410, 1038, 972, 1039, 1040, 877, 1037, 965, 1118, ! 967, 1105, 1136, 1149, 1107, 1078, 757, 879, 1070, 758, ! 880, 759, 862, 979, 980, 1121, 977, 760, 859, 1079, ! 1096, 1097, 1098, 1139, 634, 785, 643, 909, 1056, 644, ! 645, 913, 646, 790, 400, 529, 647, 648, 605, 226, ! 68, 89, 69, 70, 236, 515, 71, 512, 766, 388, ! 765, 72, 389, 92, 73, 626, 771, 627, 776, 986, ! 987, 74, 75, 189, 451, 705, 516, 630, 1050, 631, ! 777, 989, 317, 574, 702, 703, 704, 932, 933, 453, ! 576, 318, 319, 320, 321, 322, 465, 466, 585, 467, ! 337, 227, 470, 471, 472, 228, 229, 230 }; static const short yypact[] = { ! 119, 138, 4124, 4124, 36,-32768,-32768,-32768,-32768,-32768, ! 129, 129, 129, 125,-32768, 143,-32768, 133,-32768,-32768, ! 133, 133,-32768, 186, 133, 186, 133, 133,-32768,-32768, ! -32768,-32768,-32768, 216, 234, 913, 1684, 1540, 4321, 332, ! 421, 351, 862, 4241, 4334, 4271, 4351, 547, 949, 771, ! 1100,-32768,-32768, 61,-32768,-32768,-32768,-32768,-32768, 129, ! -32768,-32768, 120, 219, 303,-32768,-32768, 4124,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 129, ! 129, 129, 3789, 231,-32768,-32768,-32768,-32768,-32768, 49, ! 192, 217,-32768,-32768, 237, 287,-32768, 404, 133, 3516, ! -32768, 98, 129, 452,-32768, 1569,-32768,-32768,-32768, 129, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 129,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768, 129,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768, 129,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768, 129,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768, 129,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768, 129,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768, 129,-32768,-32768,-32768,-32768,-32768, 200, 234, ! -32768,-32768, 238, 225, 238, 266,-32768, 279,-32768, 4453, ! -32768,-32768,-32768,-32768,-32768, 3789, 3789, 318, 327, 344, ! -32768, 133,-32768,-32768,-32768, 3789,-32768,-32768, 2443, 3589, ! 357, 393, 401,-32768,-32768,-32768, 3789, 244, 381,-32768, ! 3855, 3921,-32768, 5127, 872, 2164, 3789,-32768,-32768,-32768, ! -32768, 1116,-32768, 133, 133, 133, 186, 133,-32768,-32768, ! -32768,-32768, 407, 392, 1968, 4829, 4796, 4848, 998, 839, ! 1072, 1122,-32768, 402, 203, 498, 317, 506,-32768, 234, ! 234, 129,-32768, 129,-32768, 437, 129, 468, 1916, 129, ! -32768,-32768, 98, 129,-32768, 476,-32768, 1718, 387, 496, ! 527, 2916, 449, 436, 4088,-32768, 439,-32768, 369,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768, 525, 4816,-32768,-32768,-32768,-32768, 3401, ! 487,-32768,-32768,-32768,-32768, 3789, 3789, 4816,-32768,-32768, ! 456,-32768, 458, 461,-32768,-32768,-32768, 1194, 4489, 4816, ! 133,-32768, 466, 3789, 2443,-32768, 2443,-32768, 3789, 3789, ! 535,-32768,-32768, 3789, 3789, 3789, 3789, 3789, 3789, 3789, ! 3789, 3789, 3789, 3789, 3789,-32768,-32768, 133, 133, 3789, ! 3789, 482,-32768, 550, 502,-32768,-32768,-32768,-32768, 20, ! -32768, 539,-32768,-32768,-32768, 513,-32768, 523, 545,-32768, ! -32768,-32768, 420,-32768, 496, 391, 234,-32768, 608,-32768, ! -32768, 98, 636, 2965, 569,-32768,-32768, 1942, 73,-32768, ! 4663, 620, 200, 200,-32768, 129,-32768, 1916, 129, 129, ! -32768,-32768,-32768, 1916, 638, 129,-32768,-32768, 1968, 4829, ! 4796, 4848, 998, 839, 1072, 1122,-32768, 618, 628, 1229, ! 238, 129, 238,-32768, 635, 627,-32768, 369, 4816,-32768, ! 641, 650, 714,-32768, 487,-32768, 720, 4982, 5000, 648, ! -32768,-32768, 3308, 3789, 698, 651, 1194,-32768,-32768, 712, ! 673, 4489,-32768, 677, 679,-32768, 5127, 694, 701, 5127, ! 5127, 3789, 778, 3789, 3789, 1908, 1091, 1504, 1318, 1405, ! 592, 592, 758, 758,-32768,-32768,-32768,-32768,-32768, 715, ! 381, 730,-32768, 133, 2257, 550,-32768,-32768, 742, 1116, ! 3987, 186, 545,-32768,-32768,-32768, 330, 98, 129,-32768, ! -32768,-32768,-32768, 713,-32768,-32768,-32768, 158, 750, 4212, ! 3789, 3789, 3033,-32768, 4882,-32768,-32768,-32768,-32768,-32768, ! 4384, 4699, 1126, 1489, 4567, 4716, 1285, 1516, 754, 765, ! -32768, 387, 435, 200,-32768, 813,-32768,-32768, 773,-32768, ! 405, 519,-32768,-32768, 774,-32768, 775, 3789, 133, 780, ! 627, 784, 4533, 1437,-32768,-32768, 3319, 4816,-32768, 4816, ! 3789, 4816,-32768,-32768, 381,-32768, 3789,-32768, 698,-32768, ! -32768,-32768, 712,-32768,-32768,-32768, 779, 779, 832, 3789, ! 1975, 2410,-32768,-32768,-32768, 579, 569,-32768,-32768, 68, ! 76, 83, 84, 880,-32768, 791, 3127,-32768,-32768,-32768, ! -32768,-32768, 247, 794,-32768,-32768, 512, 4033,-32768,-32768, ! 2951,-32768, 420, 420,-32768, 129,-32768,-32768, 795,-32768, ! -32768,-32768,-32768,-32768, 796, 581,-32768,-32768, 255, 4900, ! 4932,-32768,-32768, 88,-32768, 200,-32768, 234, 2772,-32768, ! -32768, 861,-32768,-32768,-32768,-32768, 3789, 70, 798,-32768, ! 3789, 286, 801,-32768, 129, 129, 5127,-32768, 129, 799, ! 133,-32768, 3401, 4384, 4699, 4580, 4742, 1126, 1489, 1351, ! 1647, 4567, 4716, 4610, 4779, 1285, 1516, 1619, 1661, 807, ! 809,-32768,-32768, 4622, 1857, 88,-32768, 806, 814, 816, ! 5030, 818, 2536,-32768,-32768, 2502,-32768, 133,-32768,-32768, ! -32768,-32768,-32768,-32768, 3220,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768, 855, 863, 3789, 866, 825, 826, 3657, 365, ! 914, 263, 289, 3723,-32768, 864,-32768,-32768,-32768, 840, ! -32768,-32768,-32768, 843, 733, 852,-32768,-32768,-32768, 860, ! -32768, 3429,-32768, 3789,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768, 857, 4453,-32768, 234, ! -32768,-32768,-32768,-32768, 859, 4229,-32768,-32768,-32768,-32768, ! 540, 415,-32768,-32768, 1418,-32768, 946,-32768,-32768, 865, ! -32768,-32768, 587, 594,-32768,-32768, 5127,-32768, 88, 2772, ! 88, 5091, 3789,-32768, 129, 5091, 3789,-32768, 129,-32768, ! -32768,-32768, 129,-32768,-32768,-32768, 540,-32768,-32768,-32768, ! -32768, 133,-32768, 3789,-32768,-32768, 133, 3589,-32768, 912, ! 5127, 868, 867,-32768,-32768, 260, 2704, 3789,-32768,-32768, ! 2090,-32768,-32768,-32768,-32768, 875, 3789, 877,-32768, 902, ! -32768, 881, 865, 3789, 927,-32768, 200, 234,-32768,-32768, ! -32768,-32768,-32768, 908, 959, 2037, 78,-32768,-32768, 891, ! 894,-32768, 282, 553, 589, 4069, 443, 443,-32768,-32768, ! 200, 234,-32768,-32768,-32768, 98, 129,-32768, 129, 725, ! 740, 162,-32768,-32768, 129, 98, 129, 162,-32768, 129, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 2536,-32768, ! -32768,-32768,-32768, 5091, 405,-32768, 5091, 519,-32768, 129, ! 162,-32768, 603,-32768,-32768, 5048,-32768, 4395, 2536,-32768, ! -32768, 2629,-32768, 2840, 3789,-32768,-32768, 2502, 3789,-32768, ! -32768, 892,-32768, 3789,-32768,-32768, 895, 129, 604,-32768, ! 425, 605,-32768, 812, 918, 919,-32768, 920, 3789, 2350, ! -32768,-32768,-32768,-32768, 3789,-32768, 865,-32768, 922, 894, ! -32768,-32768,-32768,-32768, 3789, 935, 896,-32768, 896, 95, ! 540, 481,-32768, 129,-32768, 129,-32768,-32768, 129, 415, ! 415,-32768,-32768, 540, 415, 901,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768, 540,-32768, 3789,-32768, 904, 2840,-32768, ! -32768, 4395, 5109,-32768, 29,-32768,-32768,-32768, 1916,-32768, ! 1916, 3789, 3789, 979, 3429, 909,-32768,-32768,-32768,-32768, ! -32768, 915,-32768, 4622,-32768, 5127, 3789, 129,-32768,-32768, ! -32768, 725, 740, 445,-32768,-32768, 4229, 129, 162,-32768, ! 162,-32768,-32768,-32768, 4950,-32768,-32768,-32768, 82, 911, ! 865,-32768,-32768, 925, 928,-32768,-32768,-32768,-32768, 917, ! -32768,-32768,-32768,-32768, 926, 931, 5127, 443,-32768,-32768, ! -32768,-32768,-32768,-32768, 954, 133, 42, 932,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768, 3789,-32768,-32768,-32768,-32768, ! -32768, 3789, 906, 82, 938, 82, 865, 865,-32768, 941, ! -32768, 865, 944, 1024, 53,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768, 969, 1030, 951, 3789, 3789,-32768, 331, ! -32768, 953, 955, 958, 1039,-32768,-32768,-32768,-32768,-32768, ! -32768, 1050, 1053,-32768 }; static const short yypgoto[] = { ! -32768,-32768,-32768,-32768, 105,-32768, 427,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768, -17,-32768, -81, 551, -298, 591, ! -32768,-32768,-32768, -133, 1036,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768, -350,-32768, 656,-32768,-32768, 92, 563, -381, ! -732, 3, 9, 130, 233, 11, 28, 38, 40, -382, ! -328, -550, -547, -324, -323, -534, -525, -476, -475, 659, ! 663, -594, -232,-32768, -591, -150, 1211, 1242, 140, 1466, ! -32768, -604, -162, -269, 522,-32768, 670,-32768, 423, 724, ! -15,-32768, 567,-32768, 1139, 268,-32768, -818,-32768, 141, ! -32768, -809,-32768,-32768, 246,-32768,-32768,-32768,-32768,-32768, ! -32768, -176, 408, -729, 102, -140, 19,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768, 526, -127,-32768, ! 654,-32768,-32768, 171, 172, 653, 534, 16,-32768,-32768, ! -731, -365, -368, -583,-32768, 537,-32768,-32768,-32768,-32768, ! -32768,-32768, -352,-32768,-32768, -558, 66,-32768,-32768, 611, ! -637,-32768, 354,-32768,-32768, -580,-32768,-32768,-32768,-32768, ! -32768, -355, 77, -841, -448, -369,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768, 131,-32768,-32768,-32768,-32768, -990, ! 14,-32768, 44,-32768, 491,-32768, -753,-32768,-32768, 577, ! 584, 112,-32768, 520, -399,-32768,-32768,-32768,-32768, 13, ! -32768, 87,-32768,-32768, 1070, 655,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768, -3, -4,-32768,-32768, 394,-32768, 281, ! 79, -478,-32768,-32768,-32768,-32768, 93,-32768,-32768,-32768, ! -32768,-32768, 417,-32768,-32768,-32768, 489,-32768, 182, 517, ! -32768, 599, 631, -161,-32768, -265,-32768,-32768, 614, 759, ! -32768,-32768,-32768,-32768, 755,-32768,-32768,-32768 }; ! #define YYLAST 5187 static const short yytable[] = { ! 88, 217, 277, 90, 91, 35, 35, 94, 418, 88, ! 98, 36, 36, 39, 39, 67, 67, 280, 243, 93, ! 556, 93, 96, 693, 521, 753, 694, 520, 544, 881, ! 40, 40, 893, 774, 553, 402, 756, 946, 629, 697, ! 41, 41, 42, 42, 181, 183, 185, 187, 698, 783, ! 536, 802, 437, 105, 455, 537, 617, 286, 754, 902, ! 908, 898, 323, 324, 181, 181, 181, 554, 830, -455, ! 35, 500, 329, 557, -114, 1068, 36, -456, 39, 973, ! 67, 242, 545, 341, -457, -458, 546, 547, 1113, 799, ! 93, 239, 1094, 375, 181, 40, 1048, 699, 700, 1134, ! 1005, 15, 232, 181, 254, 41, 9, 42, 76, 508, ! 255, 95, 181, 97, 509, 1119, 812, 403, 1069, -1, ! 1017, 181, 412, 84, 85, 1033, 77, 78, 336, 15, ! 181, 1114, 37, 37, 1020, 618, 84, 85, -2, 181, ! 751, 752, 1135, 233, 756, 974, 1141, 544, 181, 616, ! 1095, 180, 614, 693, 780, 781, 694, 181, 454, -435, ! 15, 719, 722, 725, 728, 584, 754, -436, -114, 697, ! 753, 919, 188, 921, -437, -438, 464, 469, 698, 125, ! 130, 134, 139, 747, 328, 1049, 265, 161, 166, 170, ! 175, 691, 82, 15, 544, 86, 1081, 37, 281, 662, ! 87, 545, 664, 100, 271, 546, 547, 437, 86, 1066, ! 83, 106, 500, 87, 378, 182, 383, 384, 385, 915, ! 387, 701, 84, 85, 333, 266, 267, 699, 700, 266, ! 267, 256, 93, 386, 15, 38, 38, 100, 234, 17, ! 720, 723, 726, 729, 693, 692, 181, 694, 545, 695, ! 696, 530, 546, 547, 616, 616, 724, 616, 272, 235, ! 697, 730, 958, 234, 782, 521, 1120, 273, 784, 698, ! 254, 444, 1059, 1061, 1057, 254, 255, 1129, 394, 395, ! 274, 255, 955, 99, 237, 751, 752, 428, 584, 501, ! 17, 774, 101, 429, 86, 432, 449, 439, 231, 87, ! 38, 102, 1077, 1089, 943, 588, 84, 85, 1150, -35, ! 592, 282, 433, 564, 184, 566, 17, 15, 911, 912, ! 285, 691, 434, 474, 435, 115, 836, -594, 944, 583, ! 450, -594, 816, 342, 257, -34, 762, 6, 7, 8, ! 124, 763, 17, 459, 795, 10, 11, 12, 15, 796, ! 497, 498, 829, 266, 267, 473, 6, 7, 8, 133, ! 477, 287, 478, 15, 10, 11, 12, 632, 84, 85, ! 443, 981, 84, 85, 289, 692, 343, 240, 86, 695, ! 696, 233, 15, 87, 667, 325, 18, 19, 125, 130, ! 134, 139, 418, 864, 326, 775, 1042, 256, 186, 329, ! 598, 628, 256, 544, 254, 629, 629, 783, 100, 271, ! 255, 327, 691, 540, 430, 527, 783, 455, 100, 541, ! 1143, 542, -254, 856, 338, 1144, 6, 7, 8, 129, ! 444, 394, 395, 924, 10, 11, 12, 927, 543, 578, ! 86, -256, 428, 753, 86, 87, 100, 271, 429, 87, ! 432, 666, 439, 265, 419, 267, -284, 545, 266, 267, ! 339, 546, 547, 272, 571, 882, 692, 433, 340, -284, ! 695, 696, 273, 905, 401, 343, 9, 434, 517, 435, ! 525, 391, 906, 267, 100, 274, 604, 518, 267, 984, ! 1100, 393, 378, 693, 241, 803, 694, 390, 233, 15, ! 257, 272, 419, 267, 398, 257, 111, 93, 624, 697, ! 273, -255, 995, 267, 120, -284, 424, 431, 698, -284, ! 254, 454, 100, 274, 659, 260, 255, 425, 84, 85, ! 441, 256, 540, 456, 1088, 749, 1127, 1128, 541, 895, ! 542, 1131, 262, 100, 894, 460, 263, 461, 896, 267, ! 462, 444, 6, 7, 8, 160, 475, 543, 751, 752, ! 10, 11, 12, 266, 267, 670, 414, 911, 912, 430, ! 415, 502, 125, 130, 134, 139, 683, 101, 15, 540, ! 671, -84, 684, 503, 687, 541, 102, 542, 767, 768, ! 769, 507, 448, 708, 1054, 709, 1055, 711, 895, 748, ! 86, 688, 511, 770, 543, 87, 510, 896, 267, 18, ! 19, 689, 513, 690, 178, 179, 724, 421, 528, 35, ! 897, 263, 782, 521, 982, 36, 784, 39, 375, 761, ! 428, 782, 521, 35, 257, 784, 429, -262, 432, 36, ! 514, 39, 531, 749, 40, 18, 19, 256, 360, 361, ! 362, 363, 364, 775, 41, 433, 42, 855, 40, 535, ! 983, 691, 861, 823, 550, 434, 1087, 435, 41, 716, ! 42, 793, 431, 717, 544, 794, 527, 916, 1071, 567, ! 1072, 415, 125, 130, 917, 724, 161, 166, 263, 399, ! 960, 418, 411, 1012, 1027, 1029, 413, 1013, 415, 263, ! 848, 718, 721, 685, 727, 961, 683, 748, -394, -394, ! 985, 985, 684, 558, 687, 692, 1101, 1102, 562, 695, ! 696, 568, 857, 84, 85, 575, 59, 59, 545, 280, ! 572, 688, 546, 547, 79, 80, 81, 93, 93, 96, ! 573, 689, 581, 690, 586, 990, 37, 587, 667, 869, ! 257, 870, 871, 872, 873, 999, 336, 430, 590, 109, ! 37, 118, 591, 127, 35, 136, 594, 145, 595, 154, ! 36, 163, 39, 172, 761, 951, 6, 7, 8, 169, ! 635, 267, 956, 596, 10, 11, 12, 577, 540, 40, ! 597, 59, 993, 267, 541, 86, 542, 683, 527, 41, ! 87, 42, 15, 684, 602, 687, 686, 995, 267, 901, ! 907, 345, 347, 543, 934, 420, 362, 363, 364, 936, ! 551, 552, 688, 59, 599, 59, 603, 125, 130, 134, ! 139, 620, 689, 685, 690, 161, 166, 170, 175, 637, ! 265, 555, 399, -284, 654, 930, 8, 129, 559, 38, ! 1052, 1053, 10, 11, 12, 656, -284, 663, 883, 884, ! 431, -264, 665, 38, 565, 674, 675, 6, 7, 8, ! 138, 678, 1024, 680, 582, 10, 11, 12, 714, 266, ! 267, 404, 731, 764, 788, 792, 963, 1035, 428, 265, ! 822, 37, 814, 1041, 429, 818, 432, 825, 254, 827, ! 794, -32, -284, 831, 255, 832, -284, 834, 254, -33, ! 527, 985, 851, 433, 255, 852, 853, 5, 6, 7, ! 8, 106, 858, 434, 685, 435, 10, 11, 12, 524, ! 865, 863, 59, 868, 365, 366, 686, 367, 368, 369, ! 370, 633, 14, 372, 15, -528, 671, 888, 892, 914, ! 1073, 1074, -257, 1076, 6, 7, 8, 165, 939, 940, ! 747, 941, 10, 11, 12, 950, 17, 952, 109, 953, ! 118, 954, 127, 957, 136, 968, 969, 976, 109, 978, ! 118, 1046, 1023, 181, 1025, 1031, 1032, 1034, 23, 1043, ! 1047, 59, 1062, 25, 38, 1065, 59, 1075, 1080, 560, ! 561, 1099, 1123, -250, 1084, 8, 124, 1106, 59, 394, ! 395, 10, 11, 12, 1103, 430, 1108, 1104, 394, 395, ! 1109, 1111, 1058, 1060, 1076, 256, 1115, 686, 1125, 15, ! 1122, 1130, 930, 1132, 1133, 256, 1137, 35, 59, -263, ! 1138, 1140, 1145, 36, 1146, 39, 683, 761, 1147, 1148, ! 1152, 59, 684, 1153, 687, 1076, 1142, 778, 786, 540, ! 636, 623, 40, 59, 538, 541, 526, 542, 59, 548, ! 59, 688, 41, 549, 42, 660, 621, 920, 1112, 8, ! 133, 689, 1019, 690, 543, 10, 11, 12, 420, 420, ! 813, 945, 1051, 563, 817, 1007, 679, 819, 820, 1009, ! 570, 821, 677, 15, 1082, 6, 7, 8, 174, 878, ! 1044, 655, 657, 10, 11, 12, 619, 1083, 431, 84, ! 85, 6, 7, 376, 377, 59, 787, 1124, 257, 8, ! 138, 6, 7, 8, 124, 10, 11, 12, 257, 10, ! 11, 12, 355, 356, 357, 358, 359, 360, 361, 362, ! 363, 364, 109, 706, 118, 1085, 127, 15, 136, 1126, ! 707, 238, 791, 59, 37, 885, 1110, 625, 988, 524, ! 524, 681, 59, 685, 110, 114, 119, 123, 128, 132, ! 137, 141, 146, 150, 155, 159, 164, 168, 173, 177, ! -265, 86, 828, 779, 889, 1063, 87, 290, 291, 824, ! 713, 292, 293, 682, 789, 789, 294, 295, 296, 297, ! 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, ! 308, 309, 310, 311, 312, 589, 593, 0, 0, 0, ! 426, 0, 0, 5, 922, 0, 8, 9, 925, 0, ! 463, 59, 10, 11, 12, 928, 107, 112, 116, 121, ! 0, 0, 0, 0, 143, 148, 152, 157, 14, 0, ! 15, 16, 826, 0, 109, 0, 127, 38, 145, 315, ! 163, 0, 0, 0, 316, 0, 686, 108, 113, 117, ! 122, 0, 17, 0, 0, 144, 149, 153, 158, 0, ! 6, 7, 8, 160, 0, 0, 0, 59, 10, 11, ! 12, 59, 0, 59, 23, 59, 0, 0, 0, 25, ! 0, 0, 0, 0, 866, 867, 15, 0, 0, 991, ! 0, 992, 0, 0, 997, 0, 0, 524, 524, 1000, ! 1001, 0, 1002, 0, 0, 0, 0, 886, 887, 0, ! 59, 0, 0, 890, 891, 0, 1006, 0, 0, 1008, ! 0, 59, 1010, 1011, 59, 0, 6, 7, 8, 133, ! 0, 457, 458, 524, 10, 11, 12, 0, 0, 0, ! 382, 357, 358, 359, 360, 361, 362, 363, 364, 476, ! 1026, 0, 15, 0, 479, 480, 0, 0, 0, 485, ! 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, ! 496, 0, 0, 0, 0, 0, 0, 109, 0, 118, ! 0, 127, 0, 136, 0, 145, 399, 154, 399, 163, ! 0, 172, 5, 6, 7, 8, 9, 59, 0, 910, ! 0, 10, 11, 12, 0, 0, 994, 996, 404, 534, ! 0, 5, 6, 7, 8, 9, 0, 14, 0, 15, ! 10, 11, 12, 0, 0, 107, 112, 116, 121, 358, ! 359, 360, 361, 362, 363, 364, 14, 0, 15, 0, ! 0, 17, 0, 0, 1003, 1004, 0, 0, 0, 0, ! 1090, 1091, 0, 1092, 0, 59, 108, 113, 117, 122, ! 17, 0, 0, 23, 6, 7, 8, 129, 25, 0, ! 0, 0, 10, 11, 12, 126, 131, 135, 140, 0, ! 0, 0, 23, 162, 167, 171, 176, 25, 59, 600, ! 601, 6, 7, 8, 165, 0, 0, 524, 524, 10, ! 11, 12, -654, 0, 0, 0, 524, 524, 0, 0, ! 524, 524, 0, 0, 5, 6, 7, 8, 115, 0, ! 524, 0, 0, 10, 11, 12, 356, 357, 358, 359, ! 360, 361, 362, 363, 364, 0, 649, 650, 0, 14, ! 264, 15, 0, -28, -28, -28, -28, -28, 0, 0, ! 0, 0, -28, -28, -28, 0, 0, 0, 994, 996, ! 996, 0, 0, 17, 0, 0, 0, 265, -28, 0, ! -284, 0, 0, 676, 0, 0, 0, 0, 0, 59, ! 0, 0, 0, -284, 0, 23, 710, 0, 0, 59, ! 25, 0, -28, 0, 6, 7, 8, 169, 998, 59, ! -252, 0, 10, 11, 12, 715, 266, 267, 0, 107, ! 112, 116, 121, 0, -28, 0, 0, 0, 382, -28, ! 15, 0, 6, 7, 8, 138, 0, 0, 0, -284, ! 10, 11, 12, -284, -28, 0, 6, 7, 8, 174, ! 108, 113, 117, 122, 10, 11, 12, 0, 0, 110, ! 114, 128, 132, 146, 150, 164, 168, 0, 5, 6, ! 7, 8, 111, 0, 806, 0, 0, 10, 11, 12, ! 0, 0, 811, 0, 0, 0, 815, 0, 0, 0, ! 0, 0, 0, 14, 126, 131, 135, 140, 0, 416, ! 0, 0, -20, -20, -20, -20, -20, 0, 0, 0, ! 0, -20, -20, -20, 0, 0, 0, 17, 0, 0, ! 0, 0, 0, 0, 0, 0, 265, -20, 840, -284, ! 0, 107, 112, 0, 0, 143, 148, 0, 59, 23, ! 0, 0, -284, 0, 25, 0, 0, 59, 0, 0, ! 850, -20, 0, 0, -251, 0, 0, 0, 0, 0, ! 0, 0, 108, 113, 0, 0, 144, 149, 0, 0, ! 0, 0, 0, -20, 0, 0, 0, 0, -20, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, -284, 0, ! 0, 0, -284, -20, 0, 0, 0, 0, 0, 0, ! 0, 0, 110, 114, 119, 123, 128, 132, 137, 141, ! 146, 150, 155, 159, 164, 168, 173, 177, 0, 0, ! 0, 0, 0, 0, 0, 806, 0, 0, 923, 0, ! 0, 0, 926, 0, 0, 0, 0, 0, 404, 0, ! 0, -656, -656, -656, -656, -656, 0, 0, 0, 935, ! -656, -656, -656, 937, 0, 0, 0, 0, 0, 0, ! 0, 0, 840, 947, 0, 0, -656, 0, -656, 0, ! 0, 0, 0, 0, 107, 112, 116, 121, 126, 131, ! 135, 140, 143, 148, 152, 157, 0, 0, 0, 0, ! -656, 0, 0, 0, 0, 0, 0, 404, 0, 0, ! -484, -484, -484, -484, -484, 108, 113, 117, 122, -484, ! -484, -484, -656, 144, 149, 153, 158, -656, 0, 0, ! 0, 0, 0, 404, 0, -484, -116, -116, -116, -116, ! -116, 0, -656, 0, 840, -116, -116, -116, 354, 355, ! 356, 357, 358, 359, 360, 361, 362, 363, 364, -484, ! 0, -116, 5, 0, 840, 8, 106, 840, 0, 840, ! 1021, 10, 11, 12, 1022, 0, 0, 0, 0, 0, ! 0, -484, 0, 0, 0, -116, -484, 14, 0, 15, ! 0, 0, 0, 0, 0, 0, 0, 0, 126, 131, ! 0, -113, 162, 167, 0, 0, 0, -116, 0, 0, ! 1045, 17, -116, 352, 353, 354, 355, 356, 357, 358, ! 359, 360, 361, 362, 363, 364, 0, -116, 970, 0, ! -462, -462, 0, 23, 0, 0, -462, -462, 25, -462, ! 0, 1064, 0, -462, 840, -462, -462, -462, -462, -462, ! -462, -462, -462, -462, -462, -462, 0, -462, 0, -462, ! 0, -462, -462, -462, -462, -462, 0, 0, 0, -462, ! 0, 0, 1086, 0, 0, -462, 0, 0, -462, 0, ! 0, 0, 0, -462, -462, -462, 0, 0, 0, -462, ! -462, 948, 0, 0, -462, -462, 0, 0, 0, -462, ! 0, -462, -462, 0, 0, 0, -462, -462, 0, 0, ! -462, -462, 0, 0, -462, -462, 0, -462, 0, -462, ! -462, 0, -462, 348, 349, 350, 949, 351, 352, 353, ! 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, ! 364, 0, 0, 126, 131, 135, 140, 0, 0, 0, ! 0, 162, 167, 171, 176, 371, 0, -460, -460, -460, ! -460, -460, -460, -460, -460, 0, -460, -460, -460, -460, ! -460, 0, -460, -460, -460, -460, -460, -460, -460, -460, ! -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, ! -460, -460, -460, 0, 0, 0, -460, 0, 0, 0, ! 0, 0, -460, 0, 0, -460, 0, -460, 0, 0, ! -460, -460, -460, 0, 0, 0, -460, -460, 0, 0, ! 0, -460, -460, 0, 0, 0, -460, 0, -460, -460, ! 0, 0, 0, -460, -460, 0, 0, -460, -460, 0, ! 0, -460, -460, 0, -460, 372, -460, -460, 606, -460, ! -484, -484, -484, -484, -484, -484, -484, -484, 0, -484, ! -484, -484, -484, -484, 0, -484, -484, -484, -484, -484, ! -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, ! 0, -484, -484, -484, -484, -484, 0, 0, 0, -484, ! 0, 0, 0, 0, 0, -484, 0, 0, -484, 0, ! -484, 0, 0, -484, -484, -484, 0, 0, 0, -484, ! -484, 0, 0, 0, -484, -484, 0, 0, 0, -484, ! 0, -484, -484, 0, 0, 0, -484, -484, 0, 0, ! -484, -484, 0, 0, -484, -484, 0, -484, 0, -484, ! -484, 1036, -484, -490, -490, 0, 0, 0, 0, -490, ! -490, 0, -490, 0, 0, 0, -490, 0, -490, -490, ! -490, -490, -490, -490, -490, -490, -490, -490, -490, 0, ! -490, 0, -490, 0, -490, -490, -490, -490, -490, 0, ! 0, 0, -490, 0, 0, 0, 0, 0, -490, 0, ! 0, -490, 0, 0, 0, 0, -490, -490, -490, 0, ! 0, 0, -490, -490, 0, 0, 0, -490, -490, 0, ! 0, 0, -490, 0, -490, -490, 0, 0, 0, -490, ! -490, 0, 0, -490, -490, 0, 0, -490, -490, 0, ! -490, 0, -490, -490, 330, -490, 190, 5, 0, 0, ! 8, 9, 191, 192, 0, 193, 10, 11, 12, 353, ! 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, ! 364, 0, 14, 194, 15, 16, 0, 195, 196, 197, ! 198, 199, 0, 0, 0, 200, 0, 0, 0, 0, ! 0, 201, 0, 0, 202, 0, 17, 0, 0, 203, ! 204, 205, 0, 0, 0, 206, 207, 0, 0, 0, ! 208, 209, 0, 0, 0, 210, 0, 211, 23, 0, ! 0, 0, 212, 25, 0, 0, 0, 0, 0, 0, ! 0, 213, 0, 0, 0, 214, 215, 835, 331, 732, ! 85, 0, 0, 0, 0, 191, 192, 350, 193, 351, ! 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, ! 362, 363, 364, 0, 0, 0, 194, 0, 16, 0, ! 195, 196, 197, 198, 199, 0, 0, 0, 200, 0, ! 0, 0, 0, 0, 201, 0, 0, 202, 0, 0, ! 0, 0, 203, 204, 205, 0, 0, 0, 206, 207, ! 0, 0, 836, 208, 837, 0, 0, 0, 210, 0, ! 211, 86, 0, 0, 0, 212, 87, 0, 0, 0, ! 0, 0, 0, 0, 213, 0, 0, -314, 214, 215, ! 835, 838, 732, 85, 0, 0, 0, 0, 191, 192, ! 0, 193, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, ! 0, 16, 0, 195, 196, 197, 198, 199, 0, 0, ! 0, 200, 0, 0, 0, 0, 0, 201, 0, 0, ! 202, 0, 0, 0, 0, 203, 204, 205, 0, 0, ! 0, 206, 207, 0, 0, 836, 208, 837, 0, 0, ! 0, 210, 0, 211, 86, 835, 0, 190, 212, 87, ! 0, 0, 0, 191, 192, 0, 193, 213, 0, 0, ! -382, 214, 215, 0, 838, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 194, 0, 16, 0, 195, 196, ! 197, 198, 199, 0, 0, 0, 200, 0, -327, 0, ! 0, 0, 201, 0, 0, 202, 0, 0, 0, 0, ! 203, 204, 205, 0, 0, 0, 206, 207, 0, 0, ! -327, 208, 209, 804, 0, 190, 210, 0, 211, 0, ! 0, 191, 192, 212, 193, 0, 0, 0, 0, 0, ! 0, 0, 213, 0, 0, 0, 214, 215, 0, 838, ! 0, 0, 194, 0, 16, 0, 195, 196, 197, 198, ! 199, 0, 0, 0, 200, 0, 0, 0, 0, 0, ! 201, 0, 0, 202, 0, 0, 0, 0, 203, 204, ! 205, 0, 0, 0, 206, 207, 0, 0, 0, 208, ! 209, 835, 0, 190, 210, 0, 211, 0, 0, 191, ! 192, 212, 193, 0, 0, 0, 0, 0, 0, 0, ! 213, 0, 0, 0, 214, 215, 0, 805, 0, 0, ! 194, 0, 16, 0, 195, 196, 197, 198, 199, 0, ! 0, 0, 200, 0, 0, 0, 0, 0, 201, 0, ! 0, 202, 0, 0, 0, 0, 203, 204, 205, 0, ! 0, 0, 206, 207, 0, 0, 0, 208, 209, 0, ! 0, 0, 210, 0, 211, 0, 0, 422, 0, 212, ! -24, -24, -24, -24, -24, 0, 0, 0, 213, -24, ! -24, -24, 214, 215, 0, 838, 0, 0, 0, 0, ! 0, 0, 0, 0, 265, -24, 0, -284, 0, 0, ! 0, 0, 4, 0, -125, 5, 6, 7, 8, 9, ! -284, 0, 0, 0, 10, 11, 12, 0, 190, -24, ! 0, 0, 0, 0, 191, 192, 0, 193, 0, 0, ! 14, 0, 15, 266, 267, 0, 0, 0, 0, 0, ! 0, -24, 0, 0, 0, 194, -24, 16, 0, 195, ! 196, 197, 198, 199, 17, 0, -284, 200, 0, -125, ! -284, -24, 0, 201, 0, 0, 202, 0, -125, 0, ! 0, 203, 204, 532, 0, 0, 23, 206, 207, 0, ! 0, 25, 208, 209, 0, 0, 190, 210, 0, 211, ! 0, 28, 191, 192, 212, 193, 0, 0, 0, 0, ! 0, 0, 0, 213, 0, 0, 0, 214, 215, 0, ! 0, 533, 0, 194, 0, 16, 0, 195, 196, 197, ! 198, 199, 0, 0, 0, 200, 0, 0, 0, 0, ! 0, 201, 0, 0, 202, 0, 0, 0, 0, 203, ! 204, 205, 0, 0, 0, 206, 207, 0, 0, 0, ! 208, 209, 0, 0, 0, 210, 0, 211, 0, 0, ! 0, 0, 212, 0, 0, 0, 0, 0, 0, 0, ! 0, 213, 0, 0, 0, 214, 215, 0, 0, 651, ! 732, 733, 6, 7, 8, 9, 191, 192, 0, 193, ! 10, 11, 12, 0, 0, 0, 0, 0, 0, 734, ! 735, 736, 737, 738, 739, 740, 14, 194, 15, 16, ! 0, 195, 196, 197, 198, 199, 0, 0, 0, 200, ! 0, 0, 0, 0, 0, 201, 0, 0, 202, 0, ! 17, 0, 0, 203, 204, 205, 0, 0, 0, 206, ! 207, 0, 0, 0, 208, 209, 0, 0, 0, 210, ! 0, 211, 741, 0, 0, 0, 212, 742, 0, 0, ! 743, 744, 0, 0, 745, 213, 0, 746, 0, 214, ! 215, 0, 747, 732, 85, 0, 0, 0, 0, 191, ! 192, 0, 193, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 734, 735, 736, 737, 738, 739, 740, 0, ! 194, 0, 16, 0, 195, 196, 197, 198, 199, 0, ! 0, 0, 200, 0, 0, 0, 0, 0, 201, 0, ! 0, 202, 0, 0, 0, 0, 203, 204, 205, 0, ! 0, 0, 206, 207, 0, 0, 0, 208, 209, 0, ! 0, 0, 210, 0, 211, 86, 0, 0, 0, 212, ! 87, 0, 0, 743, 744, 0, 0, 745, 213, 0, ! 746, 190, 214, 215, 0, 747, 0, 191, 192, 0, ! 193, 0, 0, 5, 6, 7, 8, 9, 0, 0, ! 640, 0, 10, 11, 12, 0, 0, 0, 194, 0, ! 16, 0, 195, 196, 197, 198, 199, 0, 14, 0, ! 200, 0, 0, 0, 0, 0, 201, 0, 0, 202, ! 0, 0, 0, 0, 203, 204, 205, 0, 0, 0, ! 206, 207, 17, 0, 0, 208, 209, 0, 0, 0, ! 210, 0, 211, 0, 0, 0, 0, 212, 0, 0, ! 0, 0, 0, 0, 23, 0, 213, 0, 0, 25, ! 214, 215, 0, 582, 290, 291, 0, 0, 292, 293, ! 0, 0, 0, 294, 295, 296, 297, 298, 299, 300, ! 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, ! 311, 312, 190, 5, 6, 7, 8, 9, 191, 192, ! 0, 193, 10, 11, 12, 0, 0, 313, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 14, 194, ! 15, 16, 0, 195, 196, 197, 198, 199, 0, 0, ! 0, 200, 0, 0, 0, 0, 315, 201, 0, 0, ! 202, 316, 17, 0, 0, 203, 204, 205, 0, 0, ! 0, 206, 207, 0, 0, 452, 208, 209, 0, 0, ! 0, 210, 0, 211, 23, 0, 0, 0, 212, 25, ! 0, 0, 0, 0, 0, 0, 0, 213, 0, 190, ! 5, 214, 215, 8, 9, 191, 192, 0, 193, 10, ! 11, 12, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 14, 194, 15, 16, 0, ! 195, 196, 197, 198, 199, 0, 0, 0, 200, 0, ! 0, 0, 0, 0, 201, 0, 0, 202, 0, 17, ! 0, 0, 203, 204, 205, 0, 0, 0, 206, 207, ! 0, 0, 0, 208, 209, 0, 0, 0, 210, 0, ! 211, 23, 190, 334, 0, 212, 25, 0, 191, 192, ! 0, 193, 0, 0, 213, 0, 0, 0, 214, 215, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, ! 0, 16, 0, 195, 196, 197, 198, 199, 0, 0, ! 0, 200, 0, 0, 0, 0, 0, 201, 0, 0, ! 202, 0, 0, 0, 0, 203, 204, 205, 0, 0, ! 0, 206, 207, 0, 0, 0, 208, 209, 0, 0, ! 190, 210, 0, 211, 335, 0, 191, 192, 212, 193, ! 0, 0, 0, 0, 0, 0, 0, 213, 0, 0, ! 0, 214, 215, 0, 0, 0, 0, 194, 0, 16, ! 0, 195, 196, 197, 198, 199, 0, 0, 0, 200, ! 0, 0, 0, 0, 0, 201, 0, 0, 202, 0, ! 0, 0, 0, 203, 204, 205, 0, 0, 0, 206, ! 207, 0, 0, 0, 208, 209, 190, 0, 0, 210, ! 0, 211, 191, 192, 0, 193, 212, 0, 0, 0, ! 0, 0, 0, 0, 0, 213, 0, 854, 0, 214, ! 215, 0, 0, 194, 0, 16, 0, 195, 196, 197, ! 198, 199, 0, 0, 0, 200, 0, 0, 0, 0, ! 0, 201, 0, 0, 202, 0, 0, 0, 0, 203, ! 204, 205, 0, 0, 0, 206, 207, 0, 0, 0, ! 208, 209, 190, 0, 0, 210, 0, 211, 191, 192, ! 0, 193, 212, 0, 0, 0, 0, 0, 0, 0, ! 0, 213, 0, 860, 0, 214, 215, 0, 0, 194, ! 0, 16, 0, 195, 196, 197, 198, 199, 0, 0, ! 0, 200, 0, 0, 0, 0, 0, 201, 0, 0, ! 202, 0, 0, 0, 0, 203, 204, 205, 0, 0, ! 0, 206, 207, 0, 0, 0, 208, 209, 190, 0, ! 0, 210, 0, 211, 191, 192, 0, 193, 212, 0, ! 0, 0, 0, 0, 0, 0, 0, 213, 0, 0, ! 0, 214, 215, 0, 0, 194, 0, 16, 0, 195, ! 196, 197, 198, 199, 0, 0, 0, 200, 0, 0, ! 0, 0, 0, 201, 0, 0, 202, 0, 0, 0, ! 0, 203, 204, 205, 0, 0, 0, 206, 207, 0, ! 0, 0, 344, 209, 190, 0, 0, 210, 0, 211, ! 191, 192, 0, 193, 212, 0, 0, 0, 0, 0, ! 0, 0, 0, 213, 0, 0, 0, 214, 215, 0, ! 0, 194, 0, 16, 0, 195, 196, 197, 198, 199, ! 0, 0, 0, 200, 0, 0, 0, 0, 0, 201, ! 0, 0, 202, 0, 0, 0, 0, 203, 204, 205, ! 0, 0, 0, 206, 207, 0, 0, 0, 346, 209, ! 622, 0, 0, 210, 0, 211, 191, 192, 0, 193, ! 212, 0, 0, 0, 0, 0, 0, 0, 0, 213, ! 0, 0, 0, 214, 215, 0, 0, 194, 0, 16, ! 0, 195, 196, 197, 198, 199, 0, 0, 0, 200, ! 0, 0, 0, 0, 772, 201, 0, 5, 202, 0, ! 8, 9, 0, 203, 204, 205, 10, 11, 12, 206, ! 207, 0, 0, 0, 208, 209, 0, 0, 0, 210, ! 0, 211, 14, 0, 15, 0, 212, 0, 0, 0, ! 772, 0, 0, 5, 0, 213, 8, 9, 0, 214, ! 215, 0, 10, 11, 12, 0, 17, 0, 0, 426, ! 0, 0, 5, 0, 0, 8, 9, 0, 14, 0, ! 15, 10, 11, 12, 0, 0, 0, 0, 23, -617, ! -617, -617, 0, 25, 0, 0, 0, 14, 0, 15, ! 16, 0, 17, 773, -617, 4, 0, -125, 5, 6, ! 7, 8, 9, 0, 0, 0, 0, 10, 11, 12, ! 0, 17, 0, 0, 23, -616, -616, -616, 0, 25, ! 0, 0, 13, 14, 0, 15, 16, 0, 0, 773, ! -616, 0, 0, 23, 0, 0, 0, 0, 25, 0, ! 0, 0, 0, 0, 0, 0, 0, 17, 427, -385, ! 18, 19, -125, 0, 0, 0, 0, 0, 0, 0, ! 0, -125, 0, 20, 21, 22, 0, 0, 0, 23, ! 0, 0, 0, 24, 25, 26, 27, 0, 0, 0, ! 0, 0, 0, 638, 28, 639, 5, 6, 7, 8, ! 9, 0, 0, 640, 0, 10, 11, 12, 0, 0, ! 638, 0, 0, 5, 6, 7, 8, 9, 0, 0, ! 640, 14, 10, 11, 12, 5, 6, 7, 8, 142, ! 0, 0, 0, 0, 10, 11, 12, 0, 14, 0, ! 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, ! 14, 0, 15, 0, 0, 5, 6, 7, 8, 151, ! 0, 0, 17, 0, 10, 11, 12, 23, 0, 0, ! 0, 0, 25, 0, 17, 0, 0, 0, 0, 0, ! 14, -562, 15, 0, 23, 0, 0, 0, 0, 25, ! 0, 0, 0, 0, 0, 0, 23, 0, -562, 0, ! 0, 25, 0, 0, 17, 5, 6, 7, 8, 120, ! 0, -258, 0, 0, 10, 11, 12, 0, 5, 6, ! 7, 8, 147, 0, 0, 0, 23, 10, 11, 12, ! 14, 25, 0, 0, 0, 5, 6, 7, 8, 156, ! 0, -260, 0, 14, 10, 11, 12, 0, 0, 0, ! 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, ! 14, 0, 0, 0, 0, 0, 0, 17, 5, 6, ! 7, 8, 106, 0, 0, 0, 23, 10, 11, 12, ! 0, 25, 0, 0, 17, 0, 1015, 0, 0, 23, ! 0, -253, 0, 14, 25, 15, 0, 0, 0, 0, ! 0, 0, 0, 0, -259, 0, 23, 0, 0, 0, ! 0, 25, 0, 0, 0, 0, 0, 17, 348, 349, ! 350, -261, 351, 352, 353, 354, 355, 356, 357, 358, ! 359, 360, 361, 362, 363, 364, 290, 291, 0, 23, ! 292, 293, 0, 0, 25, 294, 295, 296, 297, 298, ! 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, ! 309, 310, 311, 312, 0, 0, 0, 0, 0, 0, ! 0, 1016, 290, 291, 0, 0, 292, 293, 0, 313, ! 0, 294, 295, 296, 297, 298, 299, 300, 301, 302, ! 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, ! 314, 0, 0, 0, 0, 0, 0, 0, 315, 0, ! 0, 0, 0, 316, 0, 468, 290, 291, 0, 0, ! 292, 293, 0, 0, 0, 294, 295, 296, 297, 298, ! 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, ! 309, 310, 311, 312, 315, 0, 0, 0, 0, 316, ! 0, 5, 6, 7, 8, 142, 0, 0, 0, 313, ! 10, 11, 12, 0, 5, 6, 7, 8, 115, 0, ! 0, 0, 0, 10, 11, 12, 14, 0, 15, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 315, 14, ! 0, 15, 0, 316, 5, 6, 7, 8, 151, 0, ! 17, 0, 0, 10, 11, 12, 5, 6, 7, 8, ! 9, 0, 0, 17, 0, 10, 11, 12, 0, 14, ! 0, 15, 23, 0, 0, 0, 0, 25, 0, 0, ! 0, 14, 0, 15, 0, 23, 0, 0, 0, 0, ! 25, 0, 0, 17, 0, 0, 0, 5, 6, 7, ! 8, 9, 0, 0, 0, 17, 10, 11, 12, 0, ! 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, ! 25, 0, 14, 0, 0, 0, 0, 23, 0, 0, ! 0, 0, 25, 5, 6, 7, 8, 111, 0, 0, ! 0, 0, 10, 11, 12, 0, 17, 0, 0, 0, ! 5, 6, 7, 8, 147, 0, 0, 0, 14, 10, ! 11, 12, 0, 0, 0, 0, 0, 0, 23, 0, ! 0, 0, 0, 25, 0, 14, 5, 6, 7, 8, ! 120, 0, 17, 0, 0, 10, 11, 12, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, ! 0, 14, 0, 0, 23, 0, 0, 0, 0, 25, ! 0, 0, 0, 5, 6, 7, 8, 156, 0, 0, ! 0, 23, 10, 11, 12, 17, 25, 0, 0, 0, ! 5, 0, 0, 8, 115, 0, 0, 0, 14, 10, ! 11, 12, 0, 0, 0, 0, 0, 23, 0, 0, ! 5, 0, 25, 8, 9, 14, 0, 15, 0, 10, ! 11, 12, 17, 5, 0, 0, 8, 111, 0, 0, ! 0, 0, 10, 11, 12, 14, 0, 15, 0, 17, ! 0, 0, 5, 0, 23, 8, 120, 0, 14, 25, ! 0, 10, 11, 12, 0, 0, 0, 0, 0, 17, ! 0, 23, 0, 0, 0, 0, 25, 14, 0, 0, ! 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, ! 0, 23, 0, 0, 0, 0, 25, 0, 0, 0, ! 0, 17, 0, 0, 23, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 23, 0, 348, 349, 350, 25, 351, ! 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, ! 362, 363, 364, 348, 349, 350, 0, 351, 352, 353, ! 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, ! 364, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 348, 349, 350, 652, 351, ! 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, ! 362, 363, 364, 348, 349, 350, 797, 351, 352, 353, ! 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, ! 364, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 348, 349, 350, 798, 351, ! 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, ! 362, 363, 364, 348, 349, 350, 1093, 351, 352, 353, ! 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, ! 364, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 348, 349, 350, 579, 351, 352, 353, ! 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, ! 364, 348, 349, 350, 580, 351, 352, 353, 354, 355, ! 356, 357, 358, 359, 360, 361, 362, 363, 364, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 15, 0, 833, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 348, 349, 350, 1014, 351, 352, ! 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, ! 363, 364, 348, 349, 350, 1067, 351, 352, 353, 354, ! 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, ! 348, 349, 350, 0, 351, 352, 353, 354, 355, 356, ! 357, 358, 359, 360, 361, 362, 363, 364 }; static const short yycheck[] = { ! 17, 82, 178, 20, 21, 2, 3, 24, 277, 26, ! 27, 2, 3, 2, 3, 2, 3, 179, 99, 23, ! 419, 25, 25, 573, 392, 616, 573, 392, 410, 761, ! 2, 3, 785, 627, 415, 267, 616, 846, 516, 573, ! 2, 3, 2, 3, 59, 62, 63, 64, 573, 632, ! 405, 655, 284, 34, 319, 407, 504, 184, 616, 790, ! 791, 790, 195, 196, 79, 80, 81, 417, 705, 1, ! 67, 369, 205, 423, 1, 46, 67, 1, 67, 1, ! 67, 98, 410, 216, 1, 1, 410, 410, 46, 1, ! 94, 94, 10, 226, 109, 67, 1, 573, 573, 46, ! 918, 31, 53, 118, 101, 67, 8, 67, 3, 89, ! 101, 24, 127, 26, 94, 1105, 46, 267, 89, 0, ! 938, 136, 272, 3, 4, 966, 90, 91, 209, 31, ! 145, 89, 2, 3, 943, 504, 3, 4, 0, 154, ! 616, 616, 89, 94, 724, 67, 1136, 529, 163, 504, ! 68, 90, 504, 703, 630, 630, 703, 172, 319, 91, ! 31, 609, 610, 611, 612, 463, 724, 91, 95, 703, ! 761, 808, 67, 810, 91, 91, 337, 338, 703, 39, ! 40, 41, 42, 95, 201, 90, 28, 47, 48, 49, ! 50, 573, 67, 31, 576, 75, 1037, 67, 179, 554, ! 80, 529, 557, 3, 4, 529, 529, 439, 75, 1018, ! 67, 8, 510, 80, 231, 95, 233, 234, 235, 799, ! 237, 573, 3, 4, 208, 67, 68, 703, 703, 67, ! 68, 101, 236, 236, 31, 2, 3, 3, 46, 53, ! 609, 610, 611, 612, 794, 573, 261, 794, 576, 573, ! 573, 401, 576, 576, 609, 610, 611, 612, 58, 67, ! 794, 613, 866, 46, 632, 633, 1107, 67, 633, 794, ! 267, 288, 1003, 1004, 1003, 272, 267, 1118, 259, 260, ! 80, 272, 862, 67, 67, 761, 761, 284, 586, 370, ! 53, 885, 58, 284, 75, 284, 313, 284, 67, 80, ! 67, 67, 1034, 1056, 44, 466, 3, 4, 1149, 46, ! 471, 73, 284, 440, 95, 442, 53, 31, 794, 794, ! 95, 703, 284, 340, 284, 8, 66, 90, 68, 462, ! 314, 94, 46, 89, 101, 46, 89, 5, 6, 7, ! 8, 94, 53, 327, 89, 13, 14, 15, 31, 94, ! 367, 368, 704, 67, 68, 339, 5, 6, 7, 8, ! 344, 95, 346, 31, 13, 14, 15, 517, 3, 4, ! 1, 89, 3, 4, 95, 703, 94, 90, 75, 703, ! 703, 94, 31, 80, 560, 67, 56, 57, 248, 249, ! 250, 251, 661, 748, 67, 627, 976, 267, 95, 532, ! 481, 71, 272, 785, 401, 883, 884, 990, 3, 4, ! 401, 67, 794, 410, 284, 396, 999, 682, 3, 410, ! 89, 410, 90, 58, 67, 94, 5, 6, 7, 8, ! 447, 412, 413, 814, 13, 14, 15, 818, 410, 456, ! 75, 90, 439, 1034, 75, 80, 3, 4, 439, 80, ! 439, 46, 439, 28, 67, 68, 31, 785, 67, 68, ! 67, 785, 785, 58, 448, 763, 794, 439, 67, 44, ! 794, 794, 67, 58, 6, 94, 8, 439, 58, 439, ! 89, 89, 67, 68, 3, 80, 503, 67, 68, 46, ! 1070, 89, 509, 1043, 90, 657, 1043, 90, 94, 31, ! 267, 58, 67, 68, 67, 272, 8, 511, 511, 1043, ! 67, 90, 67, 68, 8, 90, 67, 284, 1043, 94, ! 517, 682, 3, 80, 89, 102, 517, 91, 3, 4, ! 91, 401, 529, 46, 89, 616, 1116, 1117, 529, 58, ! 529, 1121, 90, 3, 4, 89, 94, 89, 67, 68, ! 89, 568, 5, 6, 7, 8, 90, 529, 1034, 1034, ! 13, 14, 15, 67, 68, 46, 90, 1043, 1043, 439, ! 94, 89, 432, 433, 434, 435, 573, 58, 31, 576, ! 561, 46, 573, 33, 573, 576, 67, 576, 76, 77, ! 78, 89, 67, 577, 993, 579, 995, 581, 58, 616, ! 75, 573, 89, 91, 576, 80, 67, 67, 68, 56, ! 57, 573, 89, 573, 51, 52, 971, 90, 10, 616, ! 80, 94, 990, 991, 71, 616, 991, 616, 761, 616, ! 627, 999, 1000, 630, 401, 1000, 627, 90, 627, 630, ! 95, 630, 6, 724, 616, 56, 57, 517, 56, 57, ! 58, 59, 60, 885, 616, 627, 616, 738, 630, 90, ! 71, 1043, 743, 680, 44, 627, 1047, 627, 630, 90, ! 630, 90, 439, 94, 1056, 94, 657, 90, 1028, 44, ! 1030, 94, 542, 543, 90, 1040, 546, 547, 94, 266, ! 866, 960, 269, 90, 90, 90, 273, 94, 94, 94, ! 717, 609, 610, 573, 612, 867, 703, 724, 90, 91, ! 886, 887, 703, 75, 703, 1043, 1071, 1072, 90, 1043, ! 1043, 94, 739, 3, 4, 11, 2, 3, 1056, 891, ! 89, 703, 1056, 1056, 10, 11, 12, 741, 742, 742, ! 90, 703, 94, 703, 46, 895, 616, 96, 924, 16, ! 517, 18, 19, 20, 21, 905, 837, 627, 46, 35, ! 630, 37, 89, 39, 761, 41, 89, 43, 89, 45, ! 761, 47, 761, 49, 761, 856, 5, 6, 7, 8, ! 67, 68, 863, 89, 13, 14, 15, 67, 785, 761, ! 89, 67, 67, 68, 785, 75, 785, 794, 779, 761, ! 80, 761, 31, 794, 89, 794, 573, 67, 68, 790, ! 791, 220, 221, 785, 831, 278, 58, 59, 60, 836, ! 412, 413, 794, 99, 46, 101, 96, 687, 688, 689, ! 690, 89, 794, 703, 794, 695, 696, 697, 698, 89, ! 28, 418, 419, 31, 90, 826, 7, 8, 425, 616, ! 990, 991, 13, 14, 15, 90, 44, 44, 765, 766, ! 627, 90, 89, 630, 441, 91, 91, 5, 6, 7, ! 8, 91, 953, 89, 95, 13, 14, 15, 46, 67, ! 68, 1, 91, 89, 89, 89, 867, 968, 885, 28, ! 91, 761, 94, 974, 885, 94, 885, 90, 895, 90, ! 94, 46, 90, 89, 895, 89, 94, 89, 905, 46, ! 891, 1087, 46, 885, 905, 90, 90, 4, 5, 6, ! 7, 8, 8, 885, 794, 885, 13, 14, 15, 392, ! 90, 67, 208, 90, 62, 63, 703, 65, 66, 67, ! 68, 518, 29, 91, 31, 85, 927, 90, 89, 3, ! 1031, 1032, 90, 1034, 5, 6, 7, 8, 46, 91, ! 95, 94, 13, 14, 15, 90, 53, 90, 244, 67, ! 246, 90, 248, 46, 250, 67, 17, 86, 254, 85, ! 256, 46, 90, 998, 89, 67, 67, 67, 75, 67, ! 94, 267, 91, 80, 761, 91, 272, 18, 89, 436, ! 437, 90, 96, 90, 89, 7, 8, 90, 284, 990, ! 991, 13, 14, 15, 89, 885, 90, 89, 999, 1000, ! 89, 67, 1003, 1004, 1105, 895, 94, 794, 90, 31, ! 1111, 90, 1013, 89, 10, 905, 67, 1034, 314, 90, ! 10, 90, 89, 1034, 89, 1034, 1043, 1034, 90, 10, ! 0, 327, 1043, 0, 1043, 1136, 1137, 630, 635, 1056, ! 523, 510, 1034, 339, 408, 1056, 396, 1056, 344, 410, ! 346, 1043, 1034, 410, 1034, 553, 509, 809, 1095, 7, ! 8, 1043, 941, 1043, 1056, 13, 14, 15, 551, 552, ! 667, 845, 990, 439, 671, 924, 570, 674, 675, 927, ! 447, 678, 568, 31, 1038, 5, 6, 7, 8, 755, ! 979, 548, 549, 13, 14, 15, 505, 1040, 885, 3, ! 4, 5, 6, 7, 8, 401, 635, 1113, 895, 7, ! 8, 5, 6, 7, 8, 13, 14, 15, 905, 13, ! 14, 15, 51, 52, 53, 54, 55, 56, 57, 58, ! 59, 60, 428, 576, 430, 1043, 432, 31, 434, 1115, ! 576, 91, 642, 439, 1034, 771, 1087, 512, 887, 632, ! 633, 572, 448, 1043, 35, 36, 37, 38, 39, 40, ! 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, ! 90, 75, 703, 630, 777, 1013, 80, 3, 4, 682, ! 586, 7, 8, 572, 641, 642, 12, 13, 14, 15, ! 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, ! 26, 27, 28, 29, 30, 466, 471, -1, -1, -1, ! 1, -1, -1, 4, 811, -1, 7, 8, 815, -1, ! 46, 517, 13, 14, 15, 822, 35, 36, 37, 38, ! -1, -1, -1, -1, 43, 44, 45, 46, 29, -1, ! 31, 32, 699, -1, 540, -1, 542, 1034, 544, 75, ! 546, -1, -1, -1, 80, -1, 1043, 35, 36, 37, ! 38, -1, 53, -1, -1, 43, 44, 45, 46, -1, ! 5, 6, 7, 8, -1, -1, -1, 573, 13, 14, ! 15, 577, -1, 579, 75, 581, -1, -1, -1, 80, ! -1, -1, -1, -1, 751, 752, 31, -1, -1, 896, ! -1, 898, -1, -1, 901, -1, -1, 790, 791, 906, ! 907, -1, 909, -1, -1, -1, -1, 774, 775, -1, ! 616, -1, -1, 780, 781, -1, 923, -1, -1, 926, ! -1, 627, 929, 930, 630, -1, 5, 6, 7, 8, ! -1, 325, 326, 826, 13, 14, 15, -1, -1, -1, ! 231, 53, 54, 55, 56, 57, 58, 59, 60, 343, ! 957, -1, 31, -1, 348, 349, -1, -1, -1, 353, ! 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, ! 364, -1, -1, -1, -1, -1, -1, 683, -1, 685, ! -1, 687, -1, 689, -1, 691, 993, 693, 995, 695, ! -1, 697, 4, 5, 6, 7, 8, 703, -1, 11, ! -1, 13, 14, 15, -1, -1, 899, 900, 1, 403, ! -1, 4, 5, 6, 7, 8, -1, 29, -1, 31, ! 13, 14, 15, -1, -1, 244, 245, 246, 247, 54, ! 55, 56, 57, 58, 59, 60, 29, -1, 31, -1, ! -1, 53, -1, -1, 911, 912, -1, -1, -1, -1, ! 1057, 1058, -1, 1060, -1, 761, 244, 245, 246, 247, ! 53, -1, -1, 75, 5, 6, 7, 8, 80, -1, ! -1, -1, 13, 14, 15, 39, 40, 41, 42, -1, ! -1, -1, 75, 47, 48, 49, 50, 80, 794, 483, ! 484, 5, 6, 7, 8, -1, -1, 990, 991, 13, ! 14, 15, 95, -1, -1, -1, 999, 1000, -1, -1, ! 1003, 1004, -1, -1, 4, 5, 6, 7, 8, -1, ! 1013, -1, -1, 13, 14, 15, 52, 53, 54, 55, ! 56, 57, 58, 59, 60, -1, 530, 531, -1, 29, ! 1, 31, -1, 4, 5, 6, 7, 8, -1, -1, ! -1, -1, 13, 14, 15, -1, -1, -1, 1051, 1052, ! 1053, -1, -1, 53, -1, -1, -1, 28, 29, -1, ! 31, -1, -1, 567, -1, -1, -1, -1, -1, 885, ! -1, -1, -1, 44, -1, 75, 580, -1, -1, 895, ! 80, -1, 53, -1, 5, 6, 7, 8, 904, 905, ! 90, -1, 13, 14, 15, 599, 67, 68, -1, 428, ! 429, 430, 431, -1, 75, -1, -1, -1, 509, 80, ! 31, -1, 5, 6, 7, 8, -1, -1, -1, 90, ! 13, 14, 15, 94, 95, -1, 5, 6, 7, 8, ! 428, 429, 430, 431, 13, 14, 15, -1, -1, 540, ! 541, 542, 543, 544, 545, 546, 547, -1, 4, 5, ! 6, 7, 8, -1, 658, -1, -1, 13, 14, 15, ! -1, -1, 666, -1, -1, -1, 670, -1, -1, -1, ! -1, -1, -1, 29, 248, 249, 250, 251, -1, 1, ! -1, -1, 4, 5, 6, 7, 8, -1, -1, -1, ! -1, 13, 14, 15, -1, -1, -1, 53, -1, -1, ! -1, -1, -1, -1, -1, -1, 28, 29, 712, 31, ! -1, 540, 541, -1, -1, 544, 545, -1, 1034, 75, ! -1, -1, 44, -1, 80, -1, -1, 1043, -1, -1, ! 734, 53, -1, -1, 90, -1, -1, -1, -1, -1, ! -1, -1, 540, 541, -1, -1, 544, 545, -1, -1, ! -1, -1, -1, 75, -1, -1, -1, -1, 80, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, 90, -1, ! -1, -1, 94, 95, -1, -1, -1, -1, -1, -1, ! -1, -1, 683, 684, 685, 686, 687, 688, 689, 690, ! 691, 692, 693, 694, 695, 696, 697, 698, -1, -1, ! -1, -1, -1, -1, -1, 809, -1, -1, 812, -1, ! -1, -1, 816, -1, -1, -1, -1, -1, 1, -1, ! -1, 4, 5, 6, 7, 8, -1, -1, -1, 833, ! 13, 14, 15, 837, -1, -1, -1, -1, -1, -1, ! -1, -1, 846, 847, -1, -1, 29, -1, 31, -1, ! -1, -1, -1, -1, 683, 684, 685, 686, 432, 433, ! 434, 435, 691, 692, 693, 694, -1, -1, -1, -1, ! 53, -1, -1, -1, -1, -1, -1, 1, -1, -1, ! 4, 5, 6, 7, 8, 683, 684, 685, 686, 13, ! 14, 15, 75, 691, 692, 693, 694, 80, -1, -1, ! -1, -1, -1, 1, -1, 29, 4, 5, 6, 7, ! 8, -1, 95, -1, 918, 13, 14, 15, 50, 51, ! 52, 53, 54, 55, 56, 57, 58, 59, 60, 53, ! -1, 29, 4, -1, 938, 7, 8, 941, -1, 943, ! 944, 13, 14, 15, 948, -1, -1, -1, -1, -1, ! -1, 75, -1, -1, -1, 53, 80, 29, -1, 31, ! -1, -1, -1, -1, -1, -1, -1, -1, 542, 543, ! -1, 95, 546, 547, -1, -1, -1, 75, -1, -1, ! 984, 53, 80, 48, 49, 50, 51, 52, 53, 54, ! 55, 56, 57, 58, 59, 60, -1, 95, 1, -1, ! 3, 4, -1, 75, -1, -1, 9, 10, 80, 12, ! -1, 1015, -1, 16, 1018, 18, 19, 20, 21, 22, ! 23, 24, 25, 26, 27, 28, -1, 30, -1, 32, ! -1, 34, 35, 36, 37, 38, -1, -1, -1, 42, ! -1, -1, 1046, -1, -1, 48, -1, -1, 51, -1, ! -1, -1, -1, 56, 57, 58, -1, -1, -1, 62, ! 63, 11, -1, -1, 67, 68, -1, -1, -1, 72, ! -1, 74, 75, -1, -1, -1, 79, 80, -1, -1, ! 83, 84, -1, -1, 87, 88, -1, 90, -1, 92, ! 93, -1, 95, 43, 44, 45, 46, 47, 48, 49, ! 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, ! 60, -1, -1, 687, 688, 689, 690, -1, -1, -1, ! -1, 695, 696, 697, 698, 1, -1, 3, 4, 5, ! 6, 7, 8, 9, 10, -1, 12, 13, 14, 15, ! 16, -1, 18, 19, 20, 21, 22, 23, 24, 25, ! 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, ! 36, 37, 38, -1, -1, -1, 42, -1, -1, -1, ! -1, -1, 48, -1, -1, 51, -1, 53, -1, -1, ! 56, 57, 58, -1, -1, -1, 62, 63, -1, -1, ! -1, 67, 68, -1, -1, -1, 72, -1, 74, 75, ! -1, -1, -1, 79, 80, -1, -1, 83, 84, -1, ! -1, 87, 88, -1, 90, 91, 92, 93, 1, 95, ! 3, 4, 5, 6, 7, 8, 9, 10, -1, 12, ! 13, 14, 15, 16, -1, 18, 19, 20, 21, 22, ! 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, ! -1, 34, 35, 36, 37, 38, -1, -1, -1, 42, ! -1, -1, -1, -1, -1, 48, -1, -1, 51, -1, ! 53, -1, -1, 56, 57, 58, -1, -1, -1, 62, ! 63, -1, -1, -1, 67, 68, -1, -1, -1, 72, ! -1, 74, 75, -1, -1, -1, 79, 80, -1, -1, ! 83, 84, -1, -1, 87, 88, -1, 90, -1, 92, ! 93, 1, 95, 3, 4, -1, -1, -1, -1, 9, ! 10, -1, 12, -1, -1, -1, 16, -1, 18, 19, ! 20, 21, 22, 23, 24, 25, 26, 27, 28, -1, ! 30, -1, 32, -1, 34, 35, 36, 37, 38, -1, ! -1, -1, 42, -1, -1, -1, -1, -1, 48, -1, ! -1, 51, -1, -1, -1, -1, 56, 57, 58, -1, ! -1, -1, 62, 63, -1, -1, -1, 67, 68, -1, ! -1, -1, 72, -1, 74, 75, -1, -1, -1, 79, ! 80, -1, -1, 83, 84, -1, -1, 87, 88, -1, ! 90, -1, 92, 93, 1, 95, 3, 4, -1, -1, ! 7, 8, 9, 10, -1, 12, 13, 14, 15, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, ! 60, -1, 29, 30, 31, 32, -1, 34, 35, 36, ! 37, 38, -1, -1, -1, 42, -1, -1, -1, -1, ! -1, 48, -1, -1, 51, -1, 53, -1, -1, 56, ! 57, 58, -1, -1, -1, 62, 63, -1, -1, -1, ! 67, 68, -1, -1, -1, 72, -1, 74, 75, -1, ! -1, -1, 79, 80, -1, -1, -1, -1, -1, -1, ! -1, 88, -1, -1, -1, 92, 93, 1, 95, 3, ! 4, -1, -1, -1, -1, 9, 10, 45, 12, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, ! 58, 59, 60, -1, -1, -1, 30, -1, 32, -1, ! 34, 35, 36, 37, 38, -1, -1, -1, 42, -1, ! -1, -1, -1, -1, 48, -1, -1, 51, -1, -1, ! -1, -1, 56, 57, 58, -1, -1, -1, 62, 63, ! -1, -1, 66, 67, 68, -1, -1, -1, 72, -1, ! 74, 75, -1, -1, -1, 79, 80, -1, -1, -1, ! -1, -1, -1, -1, 88, -1, -1, 91, 92, 93, ! 1, 95, 3, 4, -1, -1, -1, -1, 9, 10, ! -1, 12, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, 30, ! -1, 32, -1, 34, 35, 36, 37, 38, -1, -1, ! -1, 42, -1, -1, -1, -1, -1, 48, -1, -1, ! 51, -1, -1, -1, -1, 56, 57, 58, -1, -1, ! -1, 62, 63, -1, -1, 66, 67, 68, -1, -1, ! -1, 72, -1, 74, 75, 1, -1, 3, 79, 80, ! -1, -1, -1, 9, 10, -1, 12, 88, -1, -1, ! 91, 92, 93, -1, 95, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, 30, -1, 32, -1, 34, 35, ! 36, 37, 38, -1, -1, -1, 42, -1, 44, -1, ! -1, -1, 48, -1, -1, 51, -1, -1, -1, -1, ! 56, 57, 58, -1, -1, -1, 62, 63, -1, -1, ! 66, 67, 68, 1, -1, 3, 72, -1, 74, -1, ! -1, 9, 10, 79, 12, -1, -1, -1, -1, -1, ! -1, -1, 88, -1, -1, -1, 92, 93, -1, 95, ! -1, -1, 30, -1, 32, -1, 34, 35, 36, 37, ! 38, -1, -1, -1, 42, -1, -1, -1, -1, -1, ! 48, -1, -1, 51, -1, -1, -1, -1, 56, 57, ! 58, -1, -1, -1, 62, 63, -1, -1, -1, 67, ! 68, 1, -1, 3, 72, -1, 74, -1, -1, 9, ! 10, 79, 12, -1, -1, -1, -1, -1, -1, -1, ! 88, -1, -1, -1, 92, 93, -1, 95, -1, -1, ! 30, -1, 32, -1, 34, 35, 36, 37, 38, -1, ! -1, -1, 42, -1, -1, -1, -1, -1, 48, -1, ! -1, 51, -1, -1, -1, -1, 56, 57, 58, -1, ! -1, -1, 62, 63, -1, -1, -1, 67, 68, -1, ! -1, -1, 72, -1, 74, -1, -1, 1, -1, 79, ! 4, 5, 6, 7, 8, -1, -1, -1, 88, 13, ! 14, 15, 92, 93, -1, 95, -1, -1, -1, -1, ! -1, -1, -1, -1, 28, 29, -1, 31, -1, -1, ! -1, -1, 1, -1, 3, 4, 5, 6, 7, 8, ! 44, -1, -1, -1, 13, 14, 15, -1, 3, 53, ! -1, -1, -1, -1, 9, 10, -1, 12, -1, -1, ! 29, -1, 31, 67, 68, -1, -1, -1, -1, -1, ! -1, 75, -1, -1, -1, 30, 80, 32, -1, 34, ! 35, 36, 37, 38, 53, -1, 90, 42, -1, 58, ! 94, 95, -1, 48, -1, -1, 51, -1, 67, -1, ! -1, 56, 57, 58, -1, -1, 75, 62, 63, -1, ! -1, 80, 67, 68, -1, -1, 3, 72, -1, 74, ! -1, 90, 9, 10, 79, 12, -1, -1, -1, -1, ! -1, -1, -1, 88, -1, -1, -1, 92, 93, -1, ! -1, 96, -1, 30, -1, 32, -1, 34, 35, 36, ! 37, 38, -1, -1, -1, 42, -1, -1, -1, -1, ! -1, 48, -1, -1, 51, -1, -1, -1, -1, 56, ! 57, 58, -1, -1, -1, 62, 63, -1, -1, -1, ! 67, 68, -1, -1, -1, 72, -1, 74, -1, -1, ! -1, -1, 79, -1, -1, -1, -1, -1, -1, -1, ! -1, 88, -1, -1, -1, 92, 93, -1, -1, 96, ! 3, 4, 5, 6, 7, 8, 9, 10, -1, 12, ! 13, 14, 15, -1, -1, -1, -1, -1, -1, 22, ! 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, ! -1, 34, 35, 36, 37, 38, -1, -1, -1, 42, ! -1, -1, -1, -1, -1, 48, -1, -1, 51, -1, ! 53, -1, -1, 56, 57, 58, -1, -1, -1, 62, ! 63, -1, -1, -1, 67, 68, -1, -1, -1, 72, ! -1, 74, 75, -1, -1, -1, 79, 80, -1, -1, ! 83, 84, -1, -1, 87, 88, -1, 90, -1, 92, ! 93, -1, 95, 3, 4, -1, -1, -1, -1, 9, ! 10, -1, 12, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, 22, 23, 24, 25, 26, 27, 28, -1, ! 30, -1, 32, -1, 34, 35, 36, 37, 38, -1, ! -1, -1, 42, -1, -1, -1, -1, -1, 48, -1, ! -1, 51, -1, -1, -1, -1, 56, 57, 58, -1, ! -1, -1, 62, 63, -1, -1, -1, 67, 68, -1, ! -1, -1, 72, -1, 74, 75, -1, -1, -1, 79, ! 80, -1, -1, 83, 84, -1, -1, 87, 88, -1, ! 90, 3, 92, 93, -1, 95, -1, 9, 10, -1, ! 12, -1, -1, 4, 5, 6, 7, 8, -1, -1, ! 11, -1, 13, 14, 15, -1, -1, -1, 30, -1, ! 32, -1, 34, 35, 36, 37, 38, -1, 29, -1, ! 42, -1, -1, -1, -1, -1, 48, -1, -1, 51, ! -1, -1, -1, -1, 56, 57, 58, -1, -1, -1, ! 62, 63, 53, -1, -1, 67, 68, -1, -1, -1, ! 72, -1, 74, -1, -1, -1, -1, 79, -1, -1, ! -1, -1, -1, -1, 75, -1, 88, -1, -1, 80, ! 92, 93, -1, 95, 3, 4, -1, -1, 7, 8, ! -1, -1, -1, 12, 13, 14, 15, 16, 17, 18, ! 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, ! 29, 30, 3, 4, 5, 6, 7, 8, 9, 10, ! -1, 12, 13, 14, 15, -1, -1, 46, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, 29, 30, ! 31, 32, -1, 34, 35, 36, 37, 38, -1, -1, ! -1, 42, -1, -1, -1, -1, 75, 48, -1, -1, ! 51, 80, 53, -1, -1, 56, 57, 58, -1, -1, ! -1, 62, 63, -1, -1, 94, 67, 68, -1, -1, ! -1, 72, -1, 74, 75, -1, -1, -1, 79, 80, ! -1, -1, -1, -1, -1, -1, -1, 88, -1, 3, ! 4, 92, 93, 7, 8, 9, 10, -1, 12, 13, ! 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, 29, 30, 31, 32, -1, ! 34, 35, 36, 37, 38, -1, -1, -1, 42, -1, ! -1, -1, -1, -1, 48, -1, -1, 51, -1, 53, ! -1, -1, 56, 57, 58, -1, -1, -1, 62, 63, ! -1, -1, -1, 67, 68, -1, -1, -1, 72, -1, ! 74, 75, 3, 4, -1, 79, 80, -1, 9, 10, ! -1, 12, -1, -1, 88, -1, -1, -1, 92, 93, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, 30, ! -1, 32, -1, 34, 35, 36, 37, 38, -1, -1, ! -1, 42, -1, -1, -1, -1, -1, 48, -1, -1, ! 51, -1, -1, -1, -1, 56, 57, 58, -1, -1, ! -1, 62, 63, -1, -1, -1, 67, 68, -1, -1, ! 3, 72, -1, 74, 75, -1, 9, 10, 79, 12, ! -1, -1, -1, -1, -1, -1, -1, 88, -1, -1, ! -1, 92, 93, -1, -1, -1, -1, 30, -1, 32, ! -1, 34, 35, 36, 37, 38, -1, -1, -1, 42, ! -1, -1, -1, -1, -1, 48, -1, -1, 51, -1, ! -1, -1, -1, 56, 57, 58, -1, -1, -1, 62, ! 63, -1, -1, -1, 67, 68, 3, -1, -1, 72, ! -1, 74, 9, 10, -1, 12, 79, -1, -1, -1, ! -1, -1, -1, -1, -1, 88, -1, 90, -1, 92, ! 93, -1, -1, 30, -1, 32, -1, 34, 35, 36, ! 37, 38, -1, -1, -1, 42, -1, -1, -1, -1, ! -1, 48, -1, -1, 51, -1, -1, -1, -1, 56, ! 57, 58, -1, -1, -1, 62, 63, -1, -1, -1, ! 67, 68, 3, -1, -1, 72, -1, 74, 9, 10, ! -1, 12, 79, -1, -1, -1, -1, -1, -1, -1, ! -1, 88, -1, 90, -1, 92, 93, -1, -1, 30, ! -1, 32, -1, 34, 35, 36, 37, 38, -1, -1, ! -1, 42, -1, -1, -1, -1, -1, 48, -1, -1, ! 51, -1, -1, -1, -1, 56, 57, 58, -1, -1, ! -1, 62, 63, -1, -1, -1, 67, 68, 3, -1, ! -1, 72, -1, 74, 9, 10, -1, 12, 79, -1, ! -1, -1, -1, -1, -1, -1, -1, 88, -1, -1, ! -1, 92, 93, -1, -1, 30, -1, 32, -1, 34, ! 35, 36, 37, 38, -1, -1, -1, 42, -1, -1, ! -1, -1, -1, 48, -1, -1, 51, -1, -1, -1, ! -1, 56, 57, 58, -1, -1, -1, 62, 63, -1, ! -1, -1, 67, 68, 3, -1, -1, 72, -1, 74, ! 9, 10, -1, 12, 79, -1, -1, -1, -1, -1, ! -1, -1, -1, 88, -1, -1, -1, 92, 93, -1, ! -1, 30, -1, 32, -1, 34, 35, 36, 37, 38, ! -1, -1, -1, 42, -1, -1, -1, -1, -1, 48, ! -1, -1, 51, -1, -1, -1, -1, 56, 57, 58, ! -1, -1, -1, 62, 63, -1, -1, -1, 67, 68, ! 3, -1, -1, 72, -1, 74, 9, 10, -1, 12, ! 79, -1, -1, -1, -1, -1, -1, -1, -1, 88, ! -1, -1, -1, 92, 93, -1, -1, 30, -1, 32, ! -1, 34, 35, 36, 37, 38, -1, -1, -1, 42, ! -1, -1, -1, -1, 1, 48, -1, 4, 51, -1, ! 7, 8, -1, 56, 57, 58, 13, 14, 15, 62, ! 63, -1, -1, -1, 67, 68, -1, -1, -1, 72, ! -1, 74, 29, -1, 31, -1, 79, -1, -1, -1, ! 1, -1, -1, 4, -1, 88, 7, 8, -1, 92, ! 93, -1, 13, 14, 15, -1, 53, -1, -1, 1, ! -1, -1, 4, -1, -1, 7, 8, -1, 29, -1, ! 31, 13, 14, 15, -1, -1, -1, -1, 75, 76, ! 77, 78, -1, 80, -1, -1, -1, 29, -1, 31, ! 32, -1, 53, 90, 91, 1, -1, 3, 4, 5, ! 6, 7, 8, -1, -1, -1, -1, 13, 14, 15, ! -1, 53, -1, -1, 75, 76, 77, 78, -1, 80, ! -1, -1, 28, 29, -1, 31, 32, -1, -1, 90, ! 91, -1, -1, 75, -1, -1, -1, -1, 80, -1, ! -1, -1, -1, -1, -1, -1, -1, 53, 90, 91, ! 56, 57, 58, -1, -1, -1, -1, -1, -1, -1, ! -1, 67, -1, 69, 70, 71, -1, -1, -1, 75, ! -1, -1, -1, 79, 80, 81, 82, -1, -1, -1, ! -1, -1, -1, 1, 90, 3, 4, 5, 6, 7, ! 8, -1, -1, 11, -1, 13, 14, 15, -1, -1, 1, -1, -1, 4, 5, 6, 7, 8, -1, -1, ! 11, 29, 13, 14, 15, 4, 5, 6, 7, 8, ! -1, -1, -1, -1, 13, 14, 15, -1, 29, -1, ! -1, -1, -1, -1, -1, 53, -1, -1, -1, -1, ! 29, -1, 31, -1, -1, 4, 5, 6, 7, 8, ! -1, -1, 53, -1, 13, 14, 15, 75, -1, -1, ! -1, -1, 80, -1, 53, -1, -1, -1, -1, -1, ! 29, 89, 31, -1, 75, -1, -1, -1, -1, 80, ! -1, -1, -1, -1, -1, -1, 75, -1, 89, -1, ! -1, 80, -1, -1, 53, 4, 5, 6, 7, 8, ! -1, 90, -1, -1, 13, 14, 15, -1, 4, 5, ! 6, 7, 8, -1, -1, -1, 75, 13, 14, 15, ! 29, 80, -1, -1, -1, 4, 5, 6, 7, 8, ! -1, 90, -1, 29, 13, 14, 15, -1, -1, -1, ! -1, -1, -1, -1, 53, -1, -1, -1, -1, -1, ! 29, -1, -1, -1, -1, -1, -1, 53, 4, 5, ! 6, 7, 8, -1, -1, -1, 75, 13, 14, 15, ! -1, 80, -1, -1, 53, -1, 11, -1, -1, 75, ! -1, 90, -1, 29, 80, 31, -1, -1, -1, -1, ! -1, -1, -1, -1, 90, -1, 75, -1, -1, -1, ! -1, 80, -1, -1, -1, -1, -1, 53, 43, 44, ! 45, 90, 47, 48, 49, 50, 51, 52, 53, 54, ! 55, 56, 57, 58, 59, 60, 3, 4, -1, 75, ! 7, 8, -1, -1, 80, 12, 13, 14, 15, 16, ! 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, ! 27, 28, 29, 30, -1, -1, -1, -1, -1, -1, ! -1, 96, 3, 4, -1, -1, 7, 8, -1, 46, ! -1, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, ! 67, -1, -1, -1, -1, -1, -1, -1, 75, -1, ! -1, -1, -1, 80, -1, 46, 3, 4, -1, -1, ! 7, 8, -1, -1, -1, 12, 13, 14, 15, 16, ! 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, ! 27, 28, 29, 30, 75, -1, -1, -1, -1, 80, ! -1, 4, 5, 6, 7, 8, -1, -1, -1, 46, ! 13, 14, 15, -1, 4, 5, 6, 7, 8, -1, ! -1, -1, -1, 13, 14, 15, 29, -1, 31, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, 75, 29, ! -1, 31, -1, 80, 4, 5, 6, 7, 8, -1, ! 53, -1, -1, 13, 14, 15, 4, 5, 6, 7, ! 8, -1, -1, 53, -1, 13, 14, 15, -1, 29, ! -1, 31, 75, -1, -1, -1, -1, 80, -1, -1, ! -1, 29, -1, 31, -1, 75, -1, -1, -1, -1, ! 80, -1, -1, 53, -1, -1, -1, 4, 5, 6, ! 7, 8, -1, -1, -1, 53, 13, 14, 15, -1, ! -1, -1, -1, -1, -1, 75, -1, -1, -1, -1, ! 80, -1, 29, -1, -1, -1, -1, 75, -1, -1, ! -1, -1, 80, 4, 5, 6, 7, 8, -1, -1, ! -1, -1, 13, 14, 15, -1, 53, -1, -1, -1, ! 4, 5, 6, 7, 8, -1, -1, -1, 29, 13, ! 14, 15, -1, -1, -1, -1, -1, -1, 75, -1, ! -1, -1, -1, 80, -1, 29, 4, 5, 6, 7, ! 8, -1, 53, -1, -1, 13, 14, 15, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, 53, ! -1, 29, -1, -1, 75, -1, -1, -1, -1, 80, ! -1, -1, -1, 4, 5, 6, 7, 8, -1, -1, ! -1, 75, 13, 14, 15, 53, 80, -1, -1, -1, ! 4, -1, -1, 7, 8, -1, -1, -1, 29, 13, ! 14, 15, -1, -1, -1, -1, -1, 75, -1, -1, ! 4, -1, 80, 7, 8, 29, -1, 31, -1, 13, ! 14, 15, 53, 4, -1, -1, 7, 8, -1, -1, ! -1, -1, 13, 14, 15, 29, -1, 31, -1, 53, ! -1, -1, 4, -1, 75, 7, 8, -1, 29, 80, ! -1, 13, 14, 15, -1, -1, -1, -1, -1, 53, ! -1, 75, -1, -1, -1, -1, 80, 29, -1, -1, ! -1, -1, 53, -1, -1, -1, -1, -1, -1, -1, ! -1, 75, -1, -1, -1, -1, 80, -1, -1, -1, ! -1, 53, -1, -1, 75, -1, -1, -1, -1, 80, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, 75, -1, 43, 44, 45, 80, 47, ! 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, ! 58, 59, 60, 43, 44, 45, -1, 47, 48, 49, ! 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, ! 60, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, 43, 44, 45, 96, 47, ! 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, ! 58, 59, 60, 43, 44, 45, 96, 47, 48, 49, ! 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, ! 60, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, 43, 44, 45, 96, 47, ! 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, ! 58, 59, 60, 43, 44, 45, 96, 47, 48, 49, ! 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, ! 60, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, 43, 44, 45, 94, 47, 48, 49, ! 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, ! 60, 43, 44, 45, 94, 47, 48, 49, 50, 51, ! 52, 53, 54, 55, 56, 57, 58, 59, 60, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, 31, -1, 94, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, 43, 44, 45, 89, 47, 48, ! 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, ! 59, 60, 43, 44, 45, 46, 47, 48, 49, 50, ! 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, ! 43, 44, 45, -1, 47, 48, 49, 50, 51, 52, ! 53, 54, 55, 56, 57, 58, 59, 60 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ #line 3 "/usr/share/bison/bison.simple" --- 928,2209 ---- error. */ static const short yydefact[] = { ! 12, 12, 3, 5, 0, 0, 0, 281, 315, 314, ! 278, 140, 371, 367, 369, 0, 61, 0, 598, 0, ! 639, 640, 0, 0, 604, 624, 0, 0, 0, 19, ! 4, 8, 7, 0, 0, 225, 226, 227, 228, 217, ! 218, 219, 220, 229, 230, 231, 232, 221, 222, 223, ! 224, 132, 132, 0, 148, 155, 275, 277, 276, 146, ! 299, 172, 0, 0, 0, 280, 279, 0, 9, 0, ! 11, 600, 601, 599, 602, 284, 641, 603, 6, 17, ! 18, 283, 372, 368, 370, 565, 0, 565, 0, 32, ! 33, 34, 605, 0, 610, 610, 282, 625, 624, 0, ! 0, 0, 0, 366, 273, 297, 0, 289, 0, 141, ! 153, 159, 143, 175, 142, 154, 160, 176, 144, 165, ! 170, 147, 182, 145, 166, 171, 183, 149, 151, 157, ! 156, 193, 150, 152, 158, 194, 161, 163, 168, 167, ! 208, 162, 164, 169, 209, 173, 191, 200, 179, 177, ! 174, 192, 201, 178, 180, 206, 215, 186, 184, 181, ! 207, 216, 185, 187, 189, 198, 197, 195, 188, 190, ! 199, 196, 202, 204, 213, 212, 210, 203, 205, 214, ! 211, 0, 0, 16, 300, 392, 383, 392, 384, 381, ! 385, 546, 10, 0, 0, 0, 302, 0, 626, 0, ! 0, 0, 624, 0, 616, 621, 623, 607, 0, 88, ! 89, 90, 59, 60, 0, 0, 0, 0, 0, 91, ! 0, 0, 35, 37, 36, 0, 38, 39, 0, 0, ! 0, 0, 0, 116, 40, 41, 0, 0, 62, 0, ! 0, 64, 42, 48, 253, 254, 255, 256, 249, 250, ! 251, 252, 417, 0, 0, 0, 112, 113, 114, 115, ! 245, 246, 247, 248, 274, 0, 0, 298, 13, 297, ! 31, 564, 297, 273, 0, 365, 545, 297, 351, 273, ! 297, 0, 287, 0, 345, 346, 0, 0, 0, 0, ! 0, 373, 0, 376, 0, 379, 665, 666, 688, 689, ! 690, 685, 669, 670, 671, 672, 673, 674, 675, 676, ! 677, 678, 679, 680, 681, 682, 683, 684, 686, 687, ! 0, 693, 667, 637, 654, 658, 662, 668, 663, 547, ! 563, 0, 305, 606, 609, 0, 613, 0, 612, 644, ! 608, 57, 58, 0, 0, 0, 0, 52, 49, 0, ! 478, 0, 0, 709, 708, 707, 0, 0, 0, 0, ! 51, 0, 285, 0, 53, 0, 55, 0, 0, 81, ! 79, 77, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 110, 111, 0, 0, 44, 0, ! 419, 286, 0, 0, 474, 0, 467, 468, 0, 50, ! 364, 0, 0, 133, 590, 362, 273, 274, 0, 0, ! 480, 0, 480, 124, 0, 296, 0, 0, 15, 297, ! 23, 0, 297, 297, 349, 14, 27, 0, 0, 297, ! 400, 394, 245, 246, 247, 248, 241, 242, 243, 244, ! 132, 132, 391, 0, 392, 297, 392, 414, 415, 388, ! 412, 0, 693, 699, 695, 0, 638, 642, 656, 660, ! 0, 664, 0, 565, 312, 313, 310, 0, 303, 306, ! 311, 624, 612, 620, 627, 617, 646, 0, 0, 0, ! 0, 0, 0, 0, 95, 94, 0, 0, 700, 0, ! 701, 702, 716, 711, 0, 712, 713, 0, 0, 43, ! 0, 0, 87, 86, 0, 0, 0, 0, 75, 76, ! 74, 73, 72, 70, 71, 65, 66, 67, 68, 69, ! 109, 108, 0, 45, 46, 0, 273, 297, 418, 420, ! 425, 424, 426, 434, 97, 596, 0, 477, 449, 476, ! 480, 480, 480, 480, 0, 458, 0, 0, 444, 453, ! 469, 96, 363, 290, 544, 0, 0, 0, 0, 436, ! 0, 464, 29, 126, 125, 122, 237, 238, 233, 234, ! 239, 240, 235, 236, 132, 132, 294, 350, 0, 0, ! 480, 293, 348, 480, 0, 375, 397, 0, 393, 401, ! 0, 378, 0, 0, 389, 0, 388, 0, 691, 694, ! 692, 0, 0, 0, 657, 693, 697, 543, 305, 0, ! 44, 618, 614, 629, 622, 650, 0, 645, 0, 104, ! 0, 106, 0, 102, 100, 92, 63, 704, 706, 0, ! 710, 0, 703, 715, 717, 0, 714, 719, 718, 54, ! 56, 0, 0, 80, 78, 98, 0, 107, 428, 566, ! 433, 297, 432, 470, 0, 450, 445, 454, 451, 446, ! 455, 0, 447, 456, 452, 448, 457, 459, 475, 88, ! 281, 465, 465, 465, 465, 465, 0, 0, 0, 0, ! 0, 0, 553, 624, 0, 480, 480, 522, 473, 480, ! 0, 131, 132, 132, 0, 466, 537, 510, 511, 512, ! 513, 514, 538, 535, 525, 484, 485, 519, 0, 0, ! 594, 574, 132, 132, 592, 0, 575, 577, 591, 0, ! 0, 0, 437, 435, 0, 129, 0, 130, 0, 0, ! 347, 288, 544, 21, 291, 25, 395, 0, 297, 396, ! 402, 0, 297, 398, 404, 297, 297, 416, 413, 297, ! 0, 0, 653, 658, 0, 643, 471, 661, 225, 226, ! 227, 228, 217, 218, 219, 220, 229, 230, 231, 232, ! 221, 222, 223, 224, 132, 132, 659, 0, 304, 565, ! 88, 0, 644, 644, 632, 630, 631, 611, 633, 0, ! 647, 0, 132, 132, 0, 0, 0, 0, 0, 705, ! 82, 85, 47, 427, 429, 0, 0, 566, 431, 597, ! 480, 480, 480, 0, 0, 0, 541, 515, 516, 517, ! 0, 0, 0, 554, 564, 524, 0, 0, 0, 0, ! 509, 0, 0, 138, 479, 480, 536, 139, 572, 589, ! 421, 421, 568, 569, 0, 0, 593, 438, 439, 30, ! 0, 0, 319, 317, 316, 295, 0, 0, 0, 297, ! 0, 406, 297, 297, 0, 409, 297, 374, 377, 382, ! 297, 698, 655, 472, 421, 421, 0, 301, 0, 307, ! 309, 646, 646, 0, 651, 0, 0, 99, 0, 105, ! 117, 0, 332, 0, 0, 329, 0, 331, 0, 386, ! 322, 328, 0, 333, 0, 0, 430, 567, 0, 0, ! 494, 500, 0, 0, 539, 518, 0, 520, 0, 523, ! 532, 0, 297, 0, 136, 339, 0, 137, 342, 0, ! 356, 273, 297, 297, 352, 353, 297, 586, 422, 425, ! 273, 297, 297, 588, 297, 576, 578, 595, 127, 128, ! 0, 22, 292, 26, 408, 297, 0, 411, 297, 0, ! 380, 297, 297, 581, 297, 583, 696, 0, 619, 615, ! 635, 636, 0, 0, 0, 0, 0, 101, 335, 42, ! 0, 326, 93, 0, 321, 0, 0, 334, 336, 325, ! 83, 480, 480, 495, 501, 503, 0, 480, 0, 0, ! 521, 0, 530, 0, 542, 134, 0, 135, 0, 534, ! 428, 566, 584, 297, 355, 297, 358, 585, 423, 428, ! 566, 587, 570, 0, 407, 403, 410, 405, 579, 580, ! 582, 308, 634, 649, 648, 652, 103, 118, 0, 0, ! 338, 0, 0, 323, 324, 0, 0, 0, 0, 465, ! 502, 480, 507, 540, 0, 549, 533, 0, 480, 480, ! 359, 360, 0, 354, 357, 0, 318, 119, 0, 330, ! 327, 486, 465, 494, 481, 0, 500, 0, 494, 565, ! 555, 0, 0, 531, 526, 340, 343, 361, 571, 337, ! 481, 489, 492, 493, 495, 480, 497, 504, 500, 465, ! 0, 0, 550, 556, 557, 565, 0, 0, 0, 0, ! 480, 465, 465, 465, 483, 482, 498, 505, 0, 508, ! 548, 0, 555, 0, 0, 0, 0, 528, 341, 344, ! 488, 487, 481, 490, 491, 496, 0, 494, 0, 551, ! 558, 0, 527, 529, 480, 480, 495, 565, 0, 0, ! 0, 465, 0, 552, 561, 564, 0, 506, 0, 0, ! 559, 499, 0, 562, 564, 560, 0, 0, 0 }; static const short yydefgoto[] = { ! 1166, 1, 4, 5, 30, 2, 31, 32, 421, 856, ! 427, 858, 274, 724, 896, 236, 351, 522, 523, 238, ! 239, 240, 33, 241, 242, 507, 506, 504, 905, 505, ! 243, 798, 797, 891, 410, 411, 412, 565, 538, 34, ! 402, 691, 244, 245, 246, 247, 248, 249, 250, 251, ! 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, ! 712, 713, 440, 264, 252, 53, 265, 54, 55, 56, ! 57, 58, 281, 106, 282, 857, 107, 729, 403, 267, ! 60, 467, 468, 469, 61, 855, 950, 898, 899, 900, ! 1042, 901, 980, 902, 903, 904, 924, 1006, 1108, 927, ! 1008, 1109, 732, 284, 933, 934, 935, 285, 62, 63, ! 64, 65, 444, 446, 451, 294, 66, 984, 595, 289, ! 290, 442, 739, 743, 740, 744, 449, 450, 253, 390, ! 528, 937, 938, 530, 531, 532, 275, 539, 540, 541, ! 542, 543, 544, 413, 1074, 395, 396, 397, 755, 695, ! 398, 546, 254, 756, 414, 1095, 1091, 1114, 1115, 1047, ! 1092, 1093, 697, 993, 1049, 698, 699, 1116, 1136, 996, ! 997, 1077, 1118, 700, 701, 1078, 702, 1082, 1083, 1056, ! 703, 1002, 836, 704, 705, 706, 276, 277, 68, 707, ! 1054, 824, 1102, 1103, 1104, 1153, 1105, 86, 194, 650, ! 806, 714, 944, 1065, 715, 716, 776, 717, 840, 405, ! 555, 718, 719, 536, 255, 70, 93, 71, 72, 202, ! 475, 73, 472, 783, 338, 782, 74, 339, 96, 75, ! 613, 788, 883, 972, 457, 76, 77, 193, 602, 476, ! 616, 1035, 617, 789, 973, 323, 458, 459, 604, 324, ! 325, 326, 327, 600, 454, 455, 328, 489, 490, 628, ! 491, 356, 256, 494, 495, 496, 257, 258, 259 }; static const short yypact[] = { ! 126, 194,-32768,-32768, 3887, 3887, 471, 165,-32768,-32768, ! -32768,-32768, 168, 168, 168, 88,-32768, 119,-32768, 129, ! -32768,-32768, 129, 129,-32768, 165, 129, 129, 129,-32768, ! -32768,-32768,-32768, 238, 391, 1663, 4046, 3304, 4065, 324, ! 382, 706, 767, 3991, 4086, 4012, 4107, 810, 977, 909, ! 1270,-32768,-32768, 173,-32768,-32768,-32768,-32768,-32768, 168, ! -32768,-32768, 115, 153, 187,-32768,-32768, 223,-32768, 3887, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, + -32768,-32768, 168, 168, 168,-32768, 258,-32768, 284,-32768, + -32768,-32768,-32768, 183, 312, 393,-32768,-32768, 204, 396, + 414, 129, 3291,-32768, 234, 168, 427,-32768, 2663,-32768, + -32768,-32768, 168,-32768,-32768,-32768,-32768,-32768,-32768,-32768, + -32768, 168,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, + 168,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 168, + -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 168,-32768, + -32768,-32768,-32768,-32768,-32768,-32768,-32768, 168,-32768,-32768, + -32768,-32768,-32768,-32768,-32768,-32768, 168,-32768,-32768,-32768, + -32768,-32768,-32768,-32768,-32768, 168,-32768,-32768,-32768,-32768, + -32768, 297, 391,-32768,-32768, 301, 293, 301, 316,-32768, + 361,-32768,-32768, 4182, 376, 394,-32768, 399,-32768, 129, + 129, 129, 165, 129,-32768,-32768,-32768,-32768, 443,-32768, + -32768,-32768,-32768,-32768, 3555, 3555, 476, 482, 485,-32768, + 520, 129,-32768,-32768,-32768, 3555,-32768,-32768, 1455, 3357, + 525, 536, 545,-32768,-32768,-32768, 3555, 586,-32768, 3621, + 3687,-32768, 4743, 685, 3919, 2198, 4499, 2324, 538, 729, + 566, 823,-32768, 444, 2009, 3555,-32768,-32768,-32768,-32768, + 333, 606, 412, 626,-32768, 391, 391, 168,-32768, 168, + -32768,-32768, 168, 470, 1650,-32768,-32768, 168,-32768, 234, + 168, 442,-32768, 1557, 623, 640, 452, 2693, 581, 544, + 3837,-32768, 565,-32768, 145,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! 203,-32768,-32768, 489,-32768, 4215, 613,-32768,-32768,-32768, ! -32768, 590, 490,-32768,-32768, 604,-32768, 607, 582,-32768, ! -32768,-32768,-32768, 3555, 3119, 2548, 3094,-32768,-32768, 609, ! -32768, 624, 617,-32768,-32768, 635, 4250, 4283, 4528, 129, ! -32768, 3555,-32768, 1455,-32768, 1455,-32768, 3555, 3555, 686, ! -32768,-32768, 3555, 3555, 3555, 3555, 3555, 3555, 3555, 3555, ! 3555, 3555, 3555, 3555,-32768,-32768, 129, 129, 3555, 3555, ! 68,-32768, 641, 129,-32768, 2263, 639,-32768, 643,-32768, ! 640, 315, 391,-32768,-32768,-32768, 234, 747, 2738, 673, ! -32768, 1819, 71,-32768, 4414, 719, 297, 297,-32768, 168, ! -32768, 1650, 168, 168,-32768,-32768,-32768, 1650, 690, 168, ! -32768,-32768, 3919, 2198, 4499, 2324, 538, 729, 566, 823, ! -32768, 630, 681, 2223, 301, 168, 301,-32768, 727, 687, ! -32768, 145,-32768,-32768, 1929, 693,-32768,-32768,-32768, 696, ! 613,-32768, 261,-32768,-32768,-32768,-32768, 649,-32768, 739, ! -32768, 165, 582,-32768,-32768,-32768, 455, 1936, 718, 4637, ! 722, 741, 744, 752,-32768,-32768, 3050, 3555, 774, 751, ! 4250,-32768,-32768, 804, 761, 4283,-32768, 763, 770, 4743, ! 772, 789, 4743, 4743, 3555, 814, 3555, 3555, 1632, 820, ! 1498, 1043, 1282, 891, 891, 628, 628,-32768,-32768,-32768, ! -32768,-32768, 801, 812, 4743, 281, 234, 168,-32768,-32768, ! -32768,-32768, 710,-32768,-32768,-32768, 498, 673,-32768,-32768, ! 84, 85, 96, 107, 904,-32768, 821, 2896,-32768,-32768, ! -32768,-32768,-32768,-32768, 286, 1840, 3555, 3555, 2804,-32768, ! 1737,-32768,-32768,-32768,-32768,-32768, 1423, 4443, 1004, 1396, ! 4140, 4448, 1236, 1757, 825, 831,-32768, 623, 335, 297, ! -32768, 867,-32768,-32768, 827,-32768, 584, 227,-32768,-32768, ! 833,-32768, 839, 3555, 129, 846, 687, 847,-32768,-32768, ! -32768, 4215, 72, 4311,-32768,-32768,-32768,-32768, 490, 851, ! 3753,-32768,-32768, 568,-32768,-32768, 3972,-32768, 4528,-32768, ! 3555,-32768, 4528,-32768,-32768,-32768,-32768, 812,-32768, 3555, ! -32768, 774,-32768,-32768,-32768, 804,-32768,-32768,-32768, 859, ! 859, 226, 3555, 1334, 1846,-32768, 3555,-32768, 68, 68, ! -32768, 168,-32768,-32768, 129,-32768,-32768,-32768,-32768,-32768, ! -32768, 2984,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 899, ! 292,-32768,-32768,-32768,-32768,-32768, 3555, 908, 869, 871, ! 3423, 106, 946, 408, 3489,-32768,-32768,-32768,-32768,-32768, ! 510,-32768,-32768,-32768, 875, 121,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768, 879,-32768,-32768,-32768,-32768, 3207, 877, ! -32768,-32768,-32768,-32768,-32768, 880, 521,-32768,-32768, 698, ! 4539, 4557,-32768,-32768, 72,-32768, 297,-32768, 391, 1256, ! -32768,-32768, 942,-32768,-32768,-32768,-32768, 3555, 99, 882, ! -32768, 3555, 389, 883,-32768, 168, 168, 4743,-32768, 168, ! 887, 129,-32768, 4215, 885,-32768,-32768,-32768, 1423, 4443, ! 4360, 4475, 1004, 1396, 1621, 1960, 4140, 4448, 4365, 4504, ! 1236, 1757, 2445, 2449,-32768,-32768,-32768, 884,-32768,-32768, ! 700, 888,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 4182, ! -32768, 391,-32768,-32768, 896, 4657, 898, 129, 2354,-32768, ! -32768, 4759, 4743,-32768,-32768, 902, 1861,-32768,-32768,-32768, ! -32768,-32768,-32768, 929, 931, 4707,-32768,-32768,-32768,-32768, ! 530, 3555, 911,-32768,-32768,-32768, 555, 885, 933, 956, ! -32768, 297, 391,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! 304, 255,-32768,-32768, 4330, 999,-32768,-32768,-32768,-32768, ! 561, 570,-32768,-32768, 4743,-32768, 72, 1256, 72, 4688, ! 3555,-32768, 168, 4688, 3555,-32768, 168,-32768,-32768,-32768, ! 168,-32768,-32768,-32768, 304, 255, 129,-32768, 3555,-32768, ! -32768, 457, 539, 3797,-32768, 297, 391,-32768, 3555,-32768, ! -32768, 318,-32768, 129, 3357,-32768, 958, 4743, 916, 915, ! -32768,-32768, 348,-32768, 2504, 3555,-32768,-32768, 941, 947, ! -32768, 3207, 3555, 3555,-32768,-32768, 577,-32768, 948,-32768, ! -32768, 3555, 168, 580,-32768, 488, 583,-32768, 637, 885, ! -32768, 234, 168, 168, 728, 731, 267,-32768,-32768, 168, ! 234, 168, 267,-32768, 168,-32768,-32768,-32768,-32768,-32768, ! 2354,-32768,-32768,-32768,-32768, 4688, 584,-32768, 4688, 227, ! -32768, 168, 267,-32768, 267,-32768,-32768, 709,-32768,-32768, ! -32768,-32768, 928, 110, 4606, 129, 3555,-32768,-32768, 1122, ! 2354,-32768,-32768, 2435,-32768, 2573, 3555,-32768,-32768,-32768, ! 4759,-32768,-32768,-32768, 635,-32768, 930,-32768, 712, 4725, ! -32768, 394,-32768, 721,-32768,-32768, 1650,-32768, 1650,-32768, ! 304, 310,-32768, 168,-32768, 168,-32768,-32768, 168, 255, ! 255,-32768,-32768, 934,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 409, 3555, ! -32768, 935, 2573,-32768,-32768, 1122, 3555, 924, 937,-32768, ! -32768,-32768,-32768,-32768, 940, 980, 950, 885,-32768,-32768, ! 728, 731, 383,-32768,-32768, 1861,-32768,-32768, 4588,-32768, ! -32768, 635,-32768,-32768,-32768, 1015, 3555, 951,-32768,-32768, ! 116, 969, 944,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768, 1030, 1031,-32768,-32768,-32768,-32768, 3555,-32768, ! 963, 129, 1011, 967,-32768,-32768, 4394, 2111, 885, 885, ! 196,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 968,-32768, ! -32768, 965, 116, 116, 995, 971, 978,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768, 1003,-32768, 394, 1025, ! -32768, 3555,-32768,-32768, 984,-32768,-32768,-32768, 394, 730, ! 982,-32768, 1006, 987,-32768,-32768, 988,-32768, 3555, 394, ! -32768,-32768, 736,-32768,-32768,-32768, 1104, 1105,-32768 }; static const short yypgoto[] = { ! -32768,-32768,-32768,-32768, 73, 1106, 493,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768, 148,-32768, -25, 502, -431, 608, ! -32768,-32768,-32768, -112, 1331,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768, -378, 701,-32768,-32768, -59, 587, ! -392, -656, 0, 2, 24, 46, 76, 78, 19, 21, ! -367, -340, -600, -566, -335, -307, -550, -546, -516, -486, ! 703, 704,-32768, -257,-32768, -485, -238, 1009, 1150, 1158, ! 1184,-32768, -650, -167, 540,-32768, 713,-32768, 411, -3, ! 39,-32768, 512,-32768, 1044, 264,-32768, -798,-32768, 139, ! -32768, -808,-32768,-32768, 222, 224,-32768,-32768,-32768,-32768, ! -32768,-32768, -168, 441, 254, 122, -144, 20,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 533, -128, ! -32768, -395,-32768,-32768, 175, 176, 688, 546, 54,-32768, ! -32768, -482, -360, -495, -578,-32768, 202,-32768,-32768,-32768, ! -32768,-32768,-32768, -320, -534,-32768,-32768, 746, -657,-32768, ! -635,-32768,-32768, -525, 425, -974, -920, -303, -290, -927, ! -32768, -223, 34, -811, -980,-32768,-32768,-32768,-32768, -844, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768, 157, -271,-32768,-32768, ! -32768,-32768, 23,-32768, 25,-32768, -178, -17, -79, 495, ! -32768, -742,-32768,-32768,-32768,-32768, -786,-32768, 437, -409, ! -32768,-32768,-32768,-32768, 15,-32768, 865,-32768,-32768, 1056, ! 682,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -43, 14, ! -32768,-32768,-32768,-32768,-32768, -458,-32768,-32768,-32768, 118, ! -32768,-32768,-32768,-32768,-32768, 366, 405,-32768,-32768, 558, ! 562, -262,-32768,-32768,-32768, -384, -280,-32768,-32768, 554, ! 677,-32768,-32768,-32768,-32768, 694,-32768,-32768,-32768 }; ! #define YYLAST 4818 static const short yytable[] = { ! 88, 59, 59, 768, 35, 35, 36, 36, 196, 82, ! 83, 84, 422, 283, 582, 286, 407, 331, 615, 69, ! 69, 81, 696, 41, 41, 42, 42, 579, 37, 37, ! 529, 692, 112, 441, 121, 408, 130, 769, 139, 97, ! 148, 416, 157, 580, 166, 461, 175, 570, 589, 583, ! 38, 38, 837, 772, 108, 205, 627, 773, 946, 292, ! 834, 693, 694, 460, 907, 1048, 59, 849, 597, 35, ! 804, 36, -121, 754, 571, 545, 850, 237, 78, 572, ! 39, 39, 40, 40, 69, -460, -461, 774, 41, 85, ! 42, 563, 548, 37, 488, 493, 989, -462, 184, 59, ! 792, 59, 341, 342, 260, 549, 261, 573, -463, 89, ! 90, 1033, 97, 348, 1113, 38, 1110, 775, 89, 90, ! 87, 184, 184, 184, 360, 526, -1, 330, 262, 1075, ! 793, 17, 89, 90, 527, 273, 696, 810, 811, 812, ! 813, 814, 192, 399, 860, 39, 447, 40, 89, 90, ! 263, 184, 1023, 803, -564, 393, 89, 90, 1144, 336, ! 184, 67, 67, 821, -121, 688, 1151, 92, 556, 184, ! 94, 95, -440, -441, 98, 92, 101, 1044, 184, 1119, ! 91, 923, 1041, 1101, -442, -564, 441, 184, 570, 91, ! 89, 90, 692, 1135, -2, -443, 184, 1034, 627, 951, ! 17, 953, 287, 91, 355, 184, 89, 90, 185, 394, ! 186, 188, 190, 671, 184, 571, 97, 19, 1150, 91, ! 572, 777, 693, 694, 667, 59, 67, 91, 631, 873, ! 103, 1157, 1097, 635, 1070, 198, 766, 656, 659, 662, ! 665, 112, 11, 121, 768, 130, 187, 139, 573, 208, ! 657, 660, 663, 666, 1117, 995, 19, 112, 103, 121, ! 183, 91, 1094, 767, 89, 90, 17, 1099, 770, 452, ! 59, 800, 741, 260, 199, 261, 59, 91, 769, 260, ! 189, 261, 352, 1130, 104, 400, 401, 59, 648, 805, ! 432, -605, 433, 105, 772, -605, 771, 262, 773, 17, ! 103, 278, 920, 262, 102, 443, 184, 103, 930, 438, ! 191, 439, 940, 103, 434, 271, 590, 361, 592, 263, ! 1125, 941, 273, 1088, 195, 263, 1146, 605, 774, 8, ! 9, 10, 127, 272, 273, 91, 435, -33, 12, 13, ! 14, 109, 59, 59, 19, 939, 939, 333, 334, 335, ! 197, 337, 272, 273, 279, 59, 17, 200, 775, 943, ! 59, 931, 59, 280, 525, 17, 436, 931, 437, 347, ! 932, 273, 361, 288, 626, 647, 932, 273, 201, 939, ! 939, 272, 273, 975, 607, 976, 291, 8, 9, 10, ! 132, 985, 963, 965, 103, 692, 12, 13, 14, 481, ! 483, 423, 273, 59, 1009, 330, 260, 552, 261, 293, ! 977, -261, 497, 893, 566, 986, 567, 500, 738, 501, ! 118, 17, 554, 615, 615, 693, 694, 730, 611, 112, ! 262, 121, 804, 130, 864, 139, 400, 401, 200, 570, ! 59, 804, 448, 432, 17, 433, 348, 967, 104, 1015, ! 273, 59, 263, -34, 295, 272, 273, 105, 443, 203, ! 19, 422, 438, 329, 439, 332, 571, 434, 453, -262, ! 956, 572, 1127, 461, 959, 1087, 406, 766, 11, 641, ! 466, 655, 658, 206, 664, 97, 424, 199, 971, 435, ! 568, 460, 569, 89, 90, 8, 9, 464, 465, 573, ! 361, 207, 17, 1067, 767, 199, 768, 498, 599, 770, ! 20, 21, 20, 21, 268, 803, 266, 271, 269, 436, ! -544, 437, 690, 59, 803, 614, 260, 968, 261, 418, ! 340, -544, 1084, 419, 520, 521, 391, 771, 1090, 425, ! 769, 535, 343, 269, 59, 10, 127, 35, 344, 36, ! 262, 345, 12, 13, 14, 566, 772, 567, 79, 80, ! 773, 851, 708, 112, 91, 130, 41, 148, 42, 166, ! 17, 37, 263, 10, 136, -544, 456, 1132, 1132, -544, ! 12, 13, 14, 1128, 1129, 653, 346, 103, 278, 654, ! 774, 357, 533, 38, 20, 21, 399, 830, 17, 448, ! 59, 361, 358, 758, 1063, 759, 1064, 742, 843, 969, ! 606, 359, 844, 59, 114, 59, 35, 915, 36, 59, ! 775, 361, 764, 39, 765, 40, 441, 760, 1058, 737, ! 1059, 568, 429, 569, 123, 41, 690, 42, 181, 182, ! 37, 279, 919, 784, 785, 786, 361, 428, 948, 761, ! 280, 805, 419, 445, 422, 820, 787, 949, 462, 826, ! 805, 269, 38, 925, 1000, 926, 271, 1005, 361, -544, ! 1007, 419, 794, 393, 269, 474, 796, 361, 362, 762, ! -544, 763, 463, 404, 81, 381, 382, 383, 415, 423, ! 273, 417, 39, 1010, 40, 689, 471, 97, 570, 473, ! 877, 484, 1019, 272, 273, 59, 272, 273, 35, 486, ! 36, 8, 9, 10, 136, 361, 485, -399, -399, 286, ! 12, 13, 14, 708, -544, 571, 361, 41, -544, 42, ! 572, -84, 37, 534, 652, 551, 10, 132, 17, 766, ! 608, 609, 448, 12, 13, 14, 384, 385, 554, 386, ! 387, 388, 389, 557, 38, 112, 466, 121, 573, 130, ! 561, 139, 576, 148, 584, 157, 767, 166, 588, 175, ! 593, 770, 8, 9, 10, 141, 651, 273, 594, 424, ! 424, 12, 13, 14, 39, 601, 40, 603, 738, 845, ! 846, 878, 879, -263, 1013, 273, 916, 1015, 273, 771, ! 646, 1031, 809, 361, 1052, 610, 566, 918, 567, 689, ! 619, 554, 361, 1057, 621, 8, 9, 10, 163, 629, ! 547, 361, 1155, 1055, 12, 13, 14, 361, 1164, 822, ! 10, 141, 622, 581, 404, 562, 623, 12, 13, 14, ! 585, 59, 17, 624, 758, 630, 759, 364, 366, 633, ! 533, 533, 928, 634, -264, 637, 591, 577, 578, 642, ! 936, 942, 638, 764, 639, 765, 1061, 1062, 760, 355, ! 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, ! 59, 640, 568, 432, 569, 433, 994, 998, 1133, 1134, ! 761, 99, 100, 645, 962, 964, 1003, -269, 443, 871, ! 881, 882, 438, 646, 439, 409, 554, 434, 59, 668, ! 734, 35, 725, 36, 8, 9, 10, 172, 727, 736, ! 762, 745, 763, 12, 13, 14, 708, 746, 59, 435, ! 41, 260, 42, 261, 749, 37, 1018, 59, 649, 751, ! 260, 17, 261, 779, -32, 890, 379, 380, 381, 382, ! 383, 1038, 625, 816, 823, 262, 817, 38, 818, 436, ! 1147, 437, 833, 835, 262, 547, 547, 661, 547, 838, ! 1154, 271, 842, 862, 866, 870, 876, 263, 688, 742, ! 880, 1163, 8, 9, 10, 168, 263, 39, 887, 40, ! 889, 12, 13, 14, 906, 911, -271, 912, 917, 921, ! 1100, 922, 947, 981, 982, 733, 983, 991, 735, 8, ! 9, 10, 127, 992, 1001, 1032, 1072, 1050, 12, 13, ! 14, 1071, 1066, 1069, 966, 1080, 1124, 586, 587, 1073, ! 400, 401, 1079, 1081, 1096, 1106, 17, 1107, 1098, 400, ! 401, 978, 533, 533, 110, 115, 119, 124, 1111, 1112, ! 1120, 994, 146, 151, 155, 160, 1122, 184, 1123, 1138, ! 1137, 1141, 807, 1142, -270, 566, 1143, 567, 1152, 1145, ! 1148, 1130, 1158, 994, 1156, 1161, 533, 533, 1159, 113, ! 117, 122, 126, 131, 135, 140, 144, 149, 153, 158, ! 162, 167, 171, 176, 180, 376, 377, 378, 379, 380, ! 381, 382, 383, 59, 1167, 1168, 758, 3, 759, 790, ! 827, 828, 781, 564, 829, 553, 1149, 574, 575, 731, ! 778, 952, 1043, 1037, 987, 764, 988, 765, 961, 750, ! 760, 1025, 1060, 1162, 1039, 1027, 1014, 1016, 1160, 596, ! 748, 568, 550, 569, 1131, 1139, 808, 1165, 1140, 861, ! 841, 204, 761, 865, 612, 884, 867, 868, 872, 752, ! 869, 726, 728, 753, 367, 368, 369, 632, 370, 371, ! 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, ! 382, 383, 762, 799, 763, 111, 116, 120, 125, 636, ! 0, 0, 0, 147, 152, 156, 161, 128, 133, 137, ! 142, 0, 0, 791, 0, 164, 169, 173, 178, 0, ! 0, 0, 533, 533, 0, 0, 1040, 0, 0, 0, ! 0, 533, 533, 129, 134, 138, 143, 0, 0, 0, ! 0, 165, 170, 174, 179, 908, 909, 910, 0, 0, ! 0, 8, 9, 10, 163, 0, 0, 0, 0, 1121, ! 12, 13, 14, 110, 115, 119, 124, 852, 0, 209, ! 929, 0, 1014, 1016, 1016, 0, 210, 211, 17, 212, ! 954, 0, 0, 0, 957, 8, 9, 10, 177, 831, ! 832, 960, 0, 0, 12, 13, 14, 213, 0, 18, ! 0, 214, 215, 216, 217, 218, 219, 220, 0, 839, ! 839, 0, 0, 221, 0, 0, 222, 0, 0, 0, ! 0, 223, 224, 225, 0, 0, 0, 226, 227, 0, ! 0, 0, 228, 229, 0, 0, 0, 230, 0, 231, ! 0, 0, 0, 1004, 232, 377, 378, 379, 380, 381, ! 382, 383, 233, 1011, 1012, 234, 235, 1017, 0, 853, ! 0, 0, 1020, 1021, 0, 1022, 0, -272, 0, 0, ! 0, 874, 875, 0, 0, 0, 1024, 0, 0, 1026, ! 0, 0, 1028, 1029, 0, 1030, 470, 0, 0, 885, ! 886, 371, 372, 373, 374, 375, 376, 377, 378, 379, ! 380, 381, 382, 383, 111, 116, 120, 125, 0, 0, ! 0, 8, 9, 10, 132, 0, 128, 133, 137, 142, ! 12, 13, 14, 0, 0, 0, 1046, 1046, 0, 0, ! 0, 0, 1051, 0, 404, 0, 404, 7, 8, 9, ! 10, 109, 129, 134, 138, 143, 0, 12, 13, 14, ! 0, 110, 115, 119, 124, 0, 0, 0, 0, 0, ! 0, 0, 0, 16, 0, 17, 349, 0, 209, 7, ! 0, 0, 10, 11, 0, 210, 211, 0, 212, 12, ! 13, 14, 0, 0, 0, 19, 1076, 0, 0, 0, ! 0, 0, 0, 1085, 1086, 16, 213, 17, 18, 0, ! 214, 215, 216, 217, 218, 219, 220, 25, 0, 0, ! 0, 0, 221, 0, 0, 222, 0, 19, 0, 0, ! 223, 224, 225, 0, 0, 0, 226, 227, 0, 0, ! 661, 228, 229, 0, 0, 0, 230, 0, 231, 25, ! 0, 0, 0, 232, 0, 661, 0, 0, 0, 0, ! 0, 233, 0, 0, 234, 235, 0, 0, 350, 375, ! 376, 377, 378, 379, 380, 381, 382, 383, 420, 0, ! 0, -20, -20, -20, -20, -20, 0, 0, 0, 661, ! 1046, -20, -20, -20, 0, 110, 115, 0, 0, 146, ! 151, 0, 111, 116, 120, 125, 271, -20, 0, -544, ! 0, 0, 0, 0, 128, 133, 137, 142, 0, 0, ! -544, 0, 0, 0, 0, 0, 0, 0, 0, -20, ! 113, 117, 131, 135, 149, 153, 167, 171, 0, 0, ! 129, 134, 138, 143, 0, 0, 8, 9, 10, 136, ! 0, -20, 0, 0, 0, 12, 13, 14, 0, 0, ! 0, 0, 0, 0, -544, 0, 0, 0, -544, 0, ! -20, 409, 470, 17, -480, -480, -480, -480, -480, 0, ! 0, 0, 0, 0, -480, -480, -480, 7, 8, 9, ! 10, 109, 0, 0, 477, 479, 0, 12, 13, 14, ! -480, 373, 374, 375, 376, 377, 378, 379, 380, 381, ! 382, 383, 499, 16, 0, 17, 0, 0, 502, 503, ! 0, 0, -480, 508, 509, 510, 511, 512, 513, 514, ! 515, 516, 517, 518, 519, 19, 111, 116, 0, 524, ! 147, 152, 0, 0, -480, 0, 128, 133, 0, 0, ! 164, 169, 0, 0, 0, 0, 0, 25, 0, 560, ! 0, 0, 0, -120, 0, 0, 0, 0, 0, 0, ! -257, 0, 129, 134, 0, 0, 165, 170, 0, 0, ! 0, 0, 8, 9, 10, 168, 0, 110, 115, 119, ! 124, 12, 13, 14, 0, 146, 151, 155, 160, 367, ! 368, 369, 0, 370, 371, 372, 373, 374, 375, 376, ! 377, 378, 379, 380, 381, 382, 383, 0, 0, 0, ! 0, 0, 113, 117, 122, 126, 131, 135, 140, 144, ! 149, 153, 158, 162, 167, 171, 176, 180, 524, 0, ! 409, 0, 0, -123, -123, -123, -123, -123, 0, 0, ! 0, 723, 0, -123, -123, -123, 0, 643, 644, 0, ! 0, 709, 0, 710, 7, 8, 9, 10, 11, -123, ! 0, 0, 711, 0, 12, 13, 14, 0, 0, 0, ! 0, 0, 709, 0, 0, 7, 8, 9, 10, 11, ! 16, -123, 0, 711, 0, 12, 13, 14, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 720, 721, 0, ! 0, 16, 19, -123, 372, 373, 374, 375, 376, 377, ! 378, 379, 380, 381, 382, 383, 0, 0, 111, 116, ! 120, 125, -123, 19, 25, 0, 147, 152, 156, 161, ! 128, 133, 137, 142, 747, 0, 0, 0, 164, 169, ! 173, 178, -573, 7, 0, 25, 10, 11, 598, 0, ! 0, 524, 0, 12, 13, 14, 129, 134, 138, 143, ! 0, 795, 0, -573, 165, 170, 174, 179, 0, 16, ! 524, 17, 0, 0, 0, 8, 9, 10, 141, 0, ! 0, 0, 0, 801, 12, 13, 14, 802, 367, 368, ! 369, 19, 370, 371, 372, 373, 374, 375, 376, 377, ! 378, 379, 380, 381, 382, 383, 0, 0, 0, 0, ! 0, 0, 0, 25, 0, 0, 0, 815, 0, 0, ! 392, 0, -466, -466, -466, -466, -466, -466, 0, -466, ! -466, 0, -466, -466, -466, -466, -466, 618, -466, -466, ! -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, ! -466, -466, -466, 393, -466, -466, -466, -466, -466, -466, ! -466, 0, 0, 0, 0, 0, -466, 0, 0, -466, ! 854, -466, 0, 0, -466, -466, -466, 0, 859, 0, ! -466, -466, 863, 0, 0, -466, -466, 0, 0, 0, ! -466, 0, -466, -466, 0, 0, 0, -466, 0, 0, ! -466, -466, 0, 0, -466, -466, -466, 394, -466, -466, ! 0, 0, -466, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 1126, 0, -466, -466, -466, -466, -466, -466, ! 0, -466, -466, 0, -466, -466, -466, -466, -466, 897, ! -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, ! -466, -466, -466, -466, -466, 393, -466, -466, -466, -466, ! -466, -466, -466, 0, 0, 0, 0, 0, -466, 0, ! 0, -466, 0, -466, 0, 0, -466, -466, -466, 0, ! 0, 0, -466, -466, 0, 0, 0, -466, -466, 0, ! 0, 0, -466, 0, -466, -466, 0, 0, 854, -466, ! 0, 955, -466, -466, 0, 958, -466, -466, -466, 394, ! -466, -466, 7, 0, -466, 10, 114, 0, 0, 524, ! 0, 0, 12, 13, 14, 0, 0, 0, 0, 974, ! 0, 0, 0, 0, 430, 979, 0, 7, 16, 0, ! 10, 11, 0, 0, 0, 897, 990, 12, 13, 14, ! 0, 0, 0, 0, 999, 0, 0, 0, 0, 0, ! 19, 0, 0, 16, 0, 17, 18, 0, 0, 0, ! 0, 0, 0, 0, 537, 0, -480, -480, -480, -480, ! -480, -480, 25, -480, -480, 19, -480, -480, -480, -480, ! -480, 897, -480, -480, -480, -480, -480, -480, -480, -480, ! -480, -480, -480, -480, -480, -480, -480, 25, -480, -480, ! -480, -480, -480, -480, -480, 0, 0, 0, 0, 0, ! -480, 897, 0, -480, 897, -480, 897, 1045, -480, -480, ! -480, 0, 0, 0, -480, -480, 0, 0, 7, -480, ! -480, 10, 123, 0, -480, 0, -480, -480, 12, 13, ! 14, -480, 0, 0, -480, -480, 0, 0, -480, -480, ! -480, 0, -480, -480, 16, 892, -480, 669, 90, 0, ! 0, 0, 0, 0, 210, 211, 0, 212, 0, 0, ! 1068, 0, 0, 897, 0, 0, 19, 0, 0, 0, ! 0, 0, 0, 0, 0, 213, 0, 18, 0, 214, ! 215, 216, 217, 218, 219, 220, 0, 0, 25, 0, ! 0, 221, 0, 0, 222, 0, 0, 0, 0, 223, ! 224, 225, 0, 0, 0, 226, 227, 0, 0, 893, ! 228, 894, 0, 0, 0, 230, 0, 231, 91, 0, ! 0, 0, 232, 0, 0, 0, 892, 0, 669, 90, ! 233, 0, -320, 234, 235, 210, 211, 895, 212, 0, ! 8, 9, 10, 172, 8, 9, 10, 177, 0, 12, ! 13, 14, 0, 12, 13, 14, 213, 0, 18, 0, ! 214, 215, 216, 217, 218, 219, 220, 17, 0, 0, ! 0, 0, 221, 0, 0, 222, 0, 0, 0, 0, ! 223, 224, 225, 0, 0, 0, 226, 227, 0, 0, ! 893, 228, 894, 0, 0, 892, 230, 209, 231, 91, ! 0, 0, 0, 232, 210, 211, 0, 212, 0, 0, ! 0, 233, 0, -387, 234, 235, 0, 0, 895, 0, ! 0, 0, 0, 0, 0, 213, 0, 18, 0, 214, ! 215, 216, 217, 218, 219, 220, 0, -336, 0, 480, ! 0, 221, 7, 0, 222, 10, 11, 0, 0, 223, ! 224, 225, 12, 13, 14, 226, 227, 0, 0, -336, ! 228, 229, 0, 0, 892, 230, 209, 231, 16, 0, ! 17, 0, 232, 210, 211, 0, 212, 0, 0, 0, ! 233, 0, 0, 234, 235, 0, 0, 895, 0, 0, ! 19, 0, 0, 0, 213, 0, 18, 0, 214, 215, ! 216, 217, 218, 219, 220, 0, 0, 0, 0, 0, ! 221, 0, 25, 222, 0, 0, 0, 0, 223, 224, ! 225, 0, 0, 0, 226, 227, 0, 0, 0, 228, ! 229, 0, 0, 0, 230, 0, 231, 0, 0, 0, ! 0, 232, 0, 0, 0, 0, 0, 0, 0, 233, ! 0, 0, 234, 235, 270, 0, 895, -28, -28, -28, ! -28, -28, 0, 0, 0, 0, 0, -28, -28, -28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 271, -28, 426, -544, 0, -24, -24, -24, ! -24, -24, 0, 0, 0, 0, -544, -24, -24, -24, ! 0, 0, 0, 0, 0, -28, 0, 0, 0, 0, ! 0, 0, 271, -24, 0, -544, 0, 0, 0, 272, ! 273, 0, 0, 0, 0, 0, -544, -28, 0, 0, ! 0, 209, 0, 0, 0, -24, 0, 0, 210, 211, ! -544, 212, 0, 0, -544, 0, -28, 0, 0, 272, ! 273, 0, 0, 0, 0, 0, 0, -24, 0, 213, ! 0, 18, 0, 214, 215, 216, 217, 218, 219, 220, ! -544, 0, 0, 0, -544, 221, -24, 0, 222, 0, ! 0, 0, 0, 223, 224, 558, 0, 0, 0, 226, ! 227, 0, 0, 0, 228, 229, 0, 209, 0, 230, ! 0, 231, 0, 0, 210, 211, 232, 212, 0, 0, ! 0, 0, 0, 0, 233, 0, 0, 234, 235, 0, ! 0, 0, 559, 0, 0, 213, 0, 18, 0, 214, ! 215, 216, 217, 218, 219, 220, 0, 0, 0, 0, ! 0, 221, 0, 0, 222, 0, 0, 0, 0, 223, ! 224, 225, 0, 0, 0, 226, 227, 0, 0, 0, ! 228, 229, 0, 0, 0, 230, 0, 231, 0, 0, ! 0, 0, 232, 0, 0, 0, 0, 0, 0, 0, ! 233, 0, 0, 234, 235, 0, 0, 0, 722, 669, ! 670, 8, 9, 10, 11, 0, 210, 211, 0, 212, ! 12, 13, 14, 671, 0, 672, 673, 674, 675, 676, ! 677, 678, 679, 680, 681, 682, 16, 213, 17, 18, ! 0, 214, 215, 216, 217, 218, 219, 220, 0, 0, ! 0, 0, 0, 221, 0, 0, 222, 0, 19, 0, ! 0, 223, 224, 225, 0, 0, 0, 226, 227, 0, ! 0, 0, 228, 229, 0, 0, 0, 230, 0, 231, ! 683, 0, 0, 0, 232, 0, 0, 684, 685, 0, ! 0, 686, 233, 687, 0, 234, 235, 669, 90, 688, ! 0, 0, 0, 0, 210, 211, 0, 212, 0, 0, ! 0, 671, 0, 672, 673, 674, 675, 676, 677, 678, ! 679, 680, 681, 682, 0, 213, 0, 18, 0, 214, ! 215, 216, 217, 218, 219, 220, 0, 0, 0, 0, ! 0, 221, 0, 0, 222, 0, 0, 0, 0, 223, ! 224, 225, 0, 0, 0, 226, 227, 0, 0, 0, ! 228, 229, 0, 209, 0, 230, 0, 231, 91, 0, ! 210, 211, 232, 212, 0, 684, 685, 0, 0, 686, ! 233, 687, 0, 234, 235, 0, 0, 688, 0, 0, ! 0, 213, 0, 18, 0, 214, 215, 216, 217, 218, ! 219, 220, 0, 0, 0, 482, 0, 221, 7, 0, ! 222, 10, 11, 0, 0, 223, 224, 225, 12, 13, ! 14, 226, 227, 0, 0, 0, 228, 229, 0, 0, ! 478, 230, 209, 231, 16, 0, 17, 0, 232, 210, ! 211, 0, 212, 0, 0, 0, 233, 0, 0, 234, ! 235, 0, 0, 625, 0, 0, 19, 0, 0, 0, ! 213, 0, 18, 0, 214, 215, 216, 217, 218, 219, ! 220, 0, 0, 0, 0, 0, 221, 0, 25, 222, ! 0, 0, 0, 0, 223, 224, 225, 0, 0, 0, ! 226, 227, 0, 0, 0, 228, 229, 0, 0, 0, ! 230, 0, 231, 0, 0, 0, 0, 232, 0, 0, ! 0, 0, 0, 0, 0, 233, 0, 0, 234, 235, ! 209, 7, 8, 9, 10, 11, 0, 210, 211, 0, ! 212, 12, 13, 14, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 16, 213, 17, ! 18, 0, 214, 215, 216, 217, 218, 219, 220, 0, ! 0, 0, 0, 0, 221, 0, 0, 222, 0, 19, ! 0, 0, 223, 224, 225, 0, 0, 0, 226, 227, ! 0, 0, 0, 228, 229, 0, 0, 0, 230, 0, ! 231, 25, 0, 0, 0, 232, 0, 0, 0, 0, ! 0, 0, 0, 233, 209, 7, 234, 235, 10, 11, ! 0, 210, 211, 0, 212, 12, 13, 14, 7, 8, ! 9, 10, 118, 0, 0, 0, 0, 0, 12, 13, ! 14, 16, 213, 17, 18, 0, 214, 215, 216, 217, ! 218, 219, 220, 0, 16, 0, 17, 0, 221, 0, ! 0, 222, 0, 19, 0, 0, 223, 224, 225, 0, ! 0, 0, 226, 227, 0, 0, 19, 228, 229, 0, ! 209, 353, 230, 0, 231, 25, 0, 210, 211, 232, ! 212, 0, 0, 0, 0, 0, 0, 233, 25, 0, ! 234, 235, 0, 0, 0, 0, 0, 0, 213, 0, ! 18, -259, 214, 215, 216, 217, 218, 219, 220, 0, ! 0, 0, 0, 0, 221, 0, 0, 222, 0, 0, ! 0, 0, 223, 224, 225, 0, 0, 0, 226, 227, ! 0, 0, 0, 228, 229, 0, 209, 0, 230, 0, ! 231, 354, 0, 210, 211, 232, 212, 0, 0, 0, ! 0, 0, 0, 233, 0, 0, 234, 235, 0, 0, ! 0, 0, 0, 0, 213, 0, 18, 0, 214, 215, ! 216, 217, 218, 219, 220, 0, 0, 0, 0, 0, ! 221, 0, 0, 222, 0, 0, 0, 0, 223, 224, ! 225, 0, 0, 0, 226, 227, 0, 0, 0, 228, ! 229, 0, 209, 0, 230, 0, 231, 0, 0, 210, ! 211, 232, 212, 0, 0, 0, 0, 0, 0, 233, ! 819, 0, 234, 235, 0, 0, 0, 0, 0, 0, ! 213, 0, 18, 0, 214, 215, 216, 217, 218, 219, ! 220, 0, 0, 0, 0, 0, 221, 0, 0, 222, ! 0, 0, 0, 0, 223, 224, 225, 0, 0, 0, ! 226, 227, 0, 0, 0, 228, 229, 0, 209, 0, ! 230, 0, 231, 0, 0, 210, 211, 232, 212, 0, ! 0, 0, 0, 0, 0, 233, 825, 0, 234, 235, ! 0, 0, 0, 0, 0, 0, 213, 0, 18, 0, ! 214, 215, 216, 217, 218, 219, 220, 0, 0, 0, ! 0, 0, 221, 0, 0, 222, 0, 0, 0, 0, ! 223, 224, 225, 0, 0, 0, 226, 227, 0, 0, ! 0, 228, 229, 0, 209, 0, 230, 0, 231, 0, ! 0, 210, 211, 232, 212, 0, 0, 0, 0, 0, ! 0, 233, 0, 0, 234, 235, 0, 0, 0, 0, ! 0, 0, 213, 0, 18, 0, 214, 215, 216, 217, ! 218, 219, 220, 0, 0, 0, 0, 0, 221, 0, ! 0, 222, 0, 0, 0, 0, 223, 224, 225, 0, ! 0, 0, 226, 227, 0, 0, 0, 363, 229, 0, ! 209, 0, 230, 0, 231, 0, 0, 210, 211, 232, ! 212, 0, 0, 0, 0, 0, 0, 233, 0, 0, ! 234, 235, 0, 0, 0, 0, 0, 0, 213, 0, ! 18, 0, 214, 215, 216, 217, 218, 219, 220, 0, ! 0, 0, 0, 0, 221, 0, 0, 222, 0, 0, ! 0, 0, 223, 224, 225, 0, 0, 0, 226, 227, ! 0, 0, 0, 365, 229, 0, 780, 0, 230, 0, ! 231, 0, 0, 210, 211, 232, 212, 0, 0, 0, ! 0, 0, 0, 233, 0, 0, 234, 235, 0, 0, ! 0, 0, 0, 0, 213, 0, 18, 0, 214, 215, ! 216, 217, 218, 219, 220, 0, 0, 0, 430, 0, ! 221, 7, 0, 222, 10, 11, 0, 0, 223, 224, ! 225, 12, 13, 14, 226, 227, 0, 0, 0, 228, ! 229, 0, 0, 0, 230, 0, 231, 16, 0, 17, ! 18, 232, 0, 0, 0, 0, 0, 0, 430, 233, ! 0, 7, 234, 235, 10, 11, 0, 0, 0, 19, ! 0, 12, 13, 14, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 16, 0, 17, ! 18, 25, -628, -628, -628, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 970, -628, 0, 0, 6, 19, ! -132, 7, 8, 9, 10, 11, 0, 0, 0, 0, ! 0, 12, 13, 14, 0, 0, 0, 0, 0, 0, ! 0, 25, 0, 0, 0, 0, 15, 16, 0, 17, ! 18, 0, 0, 7, 431, -390, 10, 109, 0, 0, ! 0, 0, 0, 12, 13, 14, 0, 0, 0, 19, ! 0, 0, 20, 21, -132, 0, 0, 0, 0, 16, ! 0, 17, 0, -132, 0, 22, 23, 24, 0, 0, ! 0, 25, 0, 0, 0, 26, 27, 28, 0, 0, ! 0, 19, 0, 6, 29, -132, 7, 8, 9, 10, ! 11, 0, 0, 0, 0, 0, 12, 13, 14, 0, ! 0, 0, 0, 25, 0, 7, 8, 9, 10, 145, ! 0, 0, 16, 0, 17, 12, 13, 14, 0, 0, ! 0, 0, 0, 0, 0, 0, 7, 8, 9, 10, ! 154, 16, 0, 17, 19, 0, 12, 13, 14, -132, ! 0, 0, 0, 0, 0, 0, 0, 0, -132, 0, ! 0, 0, 16, 19, 17, 0, 25, 0, 0, 0, ! 7, 8, 9, 10, 114, 0, 0, 0, 0, 29, ! 12, 13, 14, 0, 19, 25, 0, 0, 0, 7, ! 8, 9, 10, 123, 0, 0, 16, 0, -265, 12, ! 13, 14, 0, 0, 0, 0, 25, 0, 0, 0, ! 7, 8, 9, 10, 150, 16, 0, 0, 19, -267, ! 12, 13, 14, 0, 0, 0, 0, 0, 0, 0, ! 0, 7, 8, 9, 10, 159, 16, 19, 0, 0, ! 25, 12, 13, 14, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, -258, 0, 0, 0, 16, 19, 25, ! 0, 0, 0, 0, 7, 8, 9, 10, 145, 0, ! 0, 0, -260, 0, 12, 13, 14, 0, 0, 19, ! 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 16, 0, 17, -266, 0, 0, 0, 0, 0, 0, ! 0, 25, 0, 0, 0, 296, 297, 0, 0, 298, ! 299, 300, 19, 0, -268, 301, 302, 303, 304, 305, ! 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, ! 316, 317, 318, 319, 25, 0, 0, 0, 296, 297, ! 0, 0, 298, 299, 300, 0, 0, 320, 301, 302, ! 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, ! 313, 314, 315, 316, 317, 318, 319, 0, 321, 0, ! 0, 0, 0, 296, 297, 0, 322, 298, 299, 300, ! 320, 0, 0, 301, 302, 303, 304, 305, 306, 307, ! 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, ! 318, 319, 0, 0, 0, 0, 296, 297, 0, 322, ! 298, 299, 300, 0, 0, 487, 301, 302, 303, 304, ! 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, ! 315, 316, 317, 318, 319, 7, 8, 9, 10, 11, ! 0, 0, 0, 757, 322, 12, 13, 14, 492, 0, ! 0, 0, 0, 0, 7, 8, 9, 10, 11, 0, ! 0, 16, 945, 17, 12, 13, 14, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 322, 0, 0, ! 16, 0, 17, 19, 7, 8, 9, 10, 118, 7, ! 8, 9, 10, 154, 12, 13, 14, 0, 0, 12, ! 13, 14, 19, 0, 0, 25, 0, 0, 0, 0, ! 16, 0, 17, 0, 0, 16, 0, 17, 7, 8, ! 9, 10, 11, 0, 25, 0, 0, 0, 12, 13, ! 14, 0, 19, 0, 0, 0, 0, 19, 7, 8, ! 9, 10, 11, 0, 16, 0, 17, 0, 12, 13, ! 14, 0, 0, 0, 25, 0, 0, 0, 0, 25, ! 0, 0, 0, 0, 16, 0, 19, 7, 8, 9, ! 10, 114, 7, 8, 9, 10, 150, 12, 13, 14, ! 0, 0, 12, 13, 14, 0, 19, 0, 25, 0, ! 0, 0, 0, 16, 0, 0, 0, 0, 16, 7, ! 8, 9, 10, 123, 0, 0, 0, 0, 25, 12, ! 13, 14, 0, 0, 0, 19, 0, 0, 0, 0, ! 19, 0, 0, 7, 0, 16, 10, 118, 7, 8, ! 9, 10, 159, 12, 13, 14, 0, 25, 12, 13, ! 14, 0, 25, 0, 0, 0, 0, 19, 0, 16, ! 0, 17, 7, 0, 16, 10, 11, 0, 0, 0, ! 0, 0, 12, 13, 14, 0, 0, 0, 0, 25, ! 0, 19, 0, 0, 0, 0, 19, 0, 16, 0, ! 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 25, 0, 0, 0, 0, 25, 0, ! 19, 367, 368, 369, 0, 370, 371, 372, 373, 374, ! 375, 376, 377, 378, 379, 380, 381, 382, 383, 367, ! 368, 369, 25, 370, 371, 372, 373, 374, 375, 376, ! 377, 378, 379, 380, 381, 382, 383, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 367, 368, 369, 847, 370, 371, 372, 373, 374, 375, ! 376, 377, 378, 379, 380, 381, 382, 383, 367, 368, ! 369, 848, 370, 371, 372, 373, 374, 375, 376, 377, ! 378, 379, 380, 381, 382, 383, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, ! 368, 369, 1089, 370, 371, 372, 373, 374, 375, 376, ! 377, 378, 379, 380, 381, 382, 383, 0, 1036, 367, ! 368, 369, 0, 370, 371, 372, 373, 374, 375, 376, ! 377, 378, 379, 380, 381, 382, 383, 0, 0, 913, ! 17, 0, 0, 0, 0, 0, 0, 0, 620, 0, ! 367, 368, 369, 0, 370, 371, 372, 373, 374, 375, ! 376, 377, 378, 379, 380, 381, 382, 383, 888, 367, ! 368, 369, 914, 370, 371, 372, 373, 374, 375, 376, ! 377, 378, 379, 380, 381, 382, 383, 367, 368, 369, ! 1053, 370, 371, 372, 373, 374, 375, 376, 377, 378, ! 379, 380, 381, 382, 383, 367, 368, 369, 0, 370, ! 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, ! 381, 382, 383, 369, 0, 370, 371, 372, 373, 374, ! 375, 376, 377, 378, 379, 380, 381, 382, 383 }; static const short yycheck[] = { ! 17, 4, 5, 603, 4, 5, 4, 5, 87, 12, ! 13, 14, 283, 181, 423, 182, 273, 195, 476, 4, ! 5, 7, 547, 4, 5, 4, 5, 419, 4, 5, ! 390, 547, 35, 290, 37, 273, 39, 603, 41, 25, ! 43, 279, 45, 421, 47, 325, 49, 414, 443, 427, ! 4, 5, 708, 603, 34, 98, 487, 603, 844, 187, ! 695, 547, 547, 325, 806, 992, 69, 724, 452, 69, ! 648, 69, 1, 1, 414, 395, 726, 102, 5, 414, ! 4, 5, 4, 5, 69, 1, 1, 603, 69, 1, ! 69, 411, 395, 69, 356, 357, 904, 1, 59, 102, ! 616, 104, 214, 215, 104, 395, 104, 414, 1, 3, ! 4, 1, 98, 225, 1094, 69, 1090, 603, 3, 4, ! 1, 82, 83, 84, 236, 57, 0, 11, 104, 1049, ! 616, 32, 3, 4, 66, 67, 661, 671, 672, 673, ! 674, 675, 69, 255, 45, 69, 1, 69, 3, 4, ! 104, 112, 950, 648, 66, 34, 3, 4, 1132, 202, ! 121, 4, 5, 57, 93, 93, 1146, 19, 406, 130, ! 22, 23, 88, 88, 26, 27, 28, 985, 139, 1099, ! 74, 831, 980, 67, 88, 66, 443, 148, 555, 74, ! 3, 4, 708, 1113, 0, 88, 157, 87, 629, 856, ! 32, 858, 182, 74, 229, 166, 3, 4, 93, 88, ! 62, 63, 64, 17, 175, 555, 202, 52, 1145, 74, ! 555, 605, 708, 708, 544, 228, 69, 74, 490, 754, ! 3, 1151, 1076, 495, 1042, 52, 603, 540, 541, 542, ! 543, 244, 8, 246, 844, 248, 93, 250, 555, 101, ! 540, 541, 542, 543, 1098, 911, 52, 260, 3, 262, ! 87, 74, 1073, 603, 3, 4, 32, 1078, 603, 66, ! 273, 45, 45, 273, 91, 273, 279, 74, 844, 279, ! 93, 279, 228, 87, 57, 265, 266, 290, 526, 649, ! 290, 87, 290, 66, 844, 91, 603, 273, 844, 32, ! 3, 4, 827, 279, 66, 290, 267, 3, 4, 290, ! 87, 290, 57, 3, 290, 29, 444, 91, 446, 273, ! 1106, 66, 67, 1065, 66, 279, 1137, 66, 844, 5, ! 6, 7, 8, 66, 67, 74, 290, 45, 14, 15, ! 16, 8, 345, 346, 52, 840, 841, 199, 200, 201, ! 66, 203, 66, 67, 57, 358, 32, 45, 844, 841, ! 363, 57, 365, 66, 389, 32, 290, 57, 290, 221, ! 66, 67, 91, 72, 486, 94, 66, 67, 66, 874, ! 875, 66, 67, 65, 463, 67, 93, 5, 6, 7, ! 8, 43, 874, 875, 3, 911, 14, 15, 16, 345, ! 346, 66, 67, 406, 929, 11, 406, 92, 406, 93, ! 92, 87, 358, 65, 414, 67, 414, 363, 586, 365, ! 8, 32, 402, 881, 882, 911, 911, 92, 471, 432, ! 406, 434, 1010, 436, 45, 438, 416, 417, 45, 806, ! 443, 1019, 294, 443, 32, 443, 558, 878, 57, 66, ! 67, 454, 406, 45, 93, 66, 67, 66, 443, 66, ! 52, 732, 443, 87, 443, 66, 806, 443, 320, 87, ! 862, 806, 1107, 753, 866, 92, 6, 844, 8, 504, ! 332, 540, 541, 87, 543, 471, 284, 91, 883, 443, ! 414, 753, 414, 3, 4, 5, 6, 7, 8, 806, ! 91, 87, 32, 94, 844, 91, 1106, 359, 454, 844, ! 55, 56, 55, 56, 87, 1010, 105, 29, 91, 443, ! 32, 443, 547, 526, 1019, 70, 526, 70, 526, 87, ! 87, 43, 1057, 91, 386, 387, 92, 844, 1072, 87, ! 1106, 393, 66, 91, 547, 7, 8, 547, 66, 547, ! 526, 66, 14, 15, 16, 555, 1106, 555, 87, 88, ! 1106, 728, 547, 566, 74, 568, 547, 570, 547, 572, ! 32, 547, 526, 7, 8, 87, 87, 1111, 1112, 91, ! 14, 15, 16, 1108, 1109, 87, 66, 3, 4, 91, ! 1106, 66, 390, 547, 55, 56, 708, 87, 32, 451, ! 603, 91, 66, 603, 1013, 603, 1015, 587, 87, 70, ! 462, 66, 91, 616, 8, 618, 616, 87, 616, 622, ! 1106, 91, 603, 547, 603, 547, 883, 603, 1006, 45, ! 1008, 555, 88, 555, 8, 616, 661, 616, 51, 52, ! 616, 57, 87, 75, 76, 77, 91, 66, 87, 603, ! 66, 1011, 91, 88, 925, 680, 88, 87, 45, 684, ! 1020, 91, 616, 831, 87, 832, 29, 87, 91, 32, ! 87, 91, 618, 34, 91, 93, 622, 91, 92, 603, ! 43, 603, 92, 272, 670, 57, 58, 59, 277, 66, ! 67, 280, 616, 931, 616, 547, 92, 683, 1065, 92, ! 779, 92, 940, 66, 67, 708, 66, 67, 708, 92, ! 708, 5, 6, 7, 8, 91, 92, 87, 88, 886, ! 14, 15, 16, 708, 87, 1065, 91, 708, 91, 708, ! 1065, 45, 708, 92, 532, 92, 7, 8, 32, 1106, ! 91, 92, 594, 14, 15, 16, 61, 62, 728, 64, ! 65, 66, 67, 6, 708, 758, 608, 760, 1065, 762, ! 87, 764, 43, 766, 74, 768, 1106, 770, 87, 772, ! 43, 1106, 5, 6, 7, 8, 66, 67, 91, 577, ! 578, 14, 15, 16, 708, 92, 708, 91, 956, 91, ! 92, 91, 92, 87, 66, 67, 821, 66, 67, 1106, ! 91, 92, 654, 91, 92, 66, 806, 824, 806, 661, ! 92, 791, 91, 92, 92, 5, 6, 7, 8, 45, ! 395, 91, 92, 1001, 14, 15, 16, 91, 92, 681, ! 7, 8, 91, 422, 423, 410, 92, 14, 15, 16, ! 429, 844, 32, 91, 844, 94, 844, 239, 240, 45, ! 648, 649, 832, 92, 87, 92, 445, 416, 417, 45, ! 840, 841, 92, 844, 92, 844, 1010, 1011, 844, 894, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, ! 883, 92, 806, 883, 806, 883, 911, 912, 1111, 1112, ! 844, 26, 27, 92, 874, 875, 921, 87, 883, 751, ! 782, 783, 883, 91, 883, 1, 886, 883, 911, 88, ! 43, 911, 87, 911, 5, 6, 7, 8, 87, 92, ! 844, 88, 844, 14, 15, 16, 911, 88, 931, 883, ! 911, 931, 911, 931, 88, 911, 939, 940, 527, 92, ! 940, 32, 940, 92, 45, 797, 55, 56, 57, 58, ! 59, 976, 93, 45, 8, 931, 87, 911, 87, 883, ! 1138, 883, 87, 84, 940, 540, 541, 542, 543, 92, ! 1148, 29, 92, 91, 91, 88, 92, 931, 93, 959, ! 92, 1159, 5, 6, 7, 8, 940, 911, 92, 911, ! 92, 14, 15, 16, 92, 66, 87, 66, 87, 66, ! 1079, 45, 3, 45, 88, 580, 91, 66, 583, 5, ! 6, 7, 8, 66, 66, 87, 92, 87, 14, 15, ! 16, 1046, 88, 88, 876, 45, 1105, 440, 441, 92, ! 1010, 1011, 92, 83, 19, 66, 32, 93, 87, 1019, ! 1020, 893, 840, 841, 35, 36, 37, 38, 18, 18, ! 87, 1076, 43, 44, 45, 46, 45, 1018, 91, 94, ! 92, 66, 651, 92, 87, 1065, 88, 1065, 1147, 66, ! 45, 87, 66, 1098, 92, 87, 874, 875, 91, 35, ! 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, ! 46, 47, 48, 49, 50, 52, 53, 54, 55, 56, ! 57, 58, 59, 1106, 0, 0, 1106, 1, 1106, 616, ! 685, 686, 610, 412, 689, 402, 1141, 414, 414, 579, ! 608, 857, 983, 975, 902, 1106, 902, 1106, 874, 596, ! 1106, 956, 1010, 1158, 12, 959, 934, 935, 1155, 451, ! 594, 1065, 396, 1065, 1110, 1122, 651, 1164, 1123, 738, ! 713, 95, 1106, 742, 472, 789, 745, 746, 753, 601, ! 749, 574, 575, 601, 42, 43, 44, 490, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, ! 58, 59, 1106, 629, 1106, 35, 36, 37, 38, 495, ! -1, -1, -1, 43, 44, 45, 46, 39, 40, 41, ! 42, -1, -1, 616, -1, 47, 48, 49, 50, -1, ! -1, -1, 1010, 1011, -1, -1, 94, -1, -1, -1, ! -1, 1019, 1020, 39, 40, 41, 42, -1, -1, -1, ! -1, 47, 48, 49, 50, 810, 811, 812, -1, -1, ! -1, 5, 6, 7, 8, -1, -1, -1, -1, 1101, ! 14, 15, 16, 244, 245, 246, 247, 1, -1, 3, ! 835, -1, 1060, 1061, 1062, -1, 10, 11, 32, 13, ! 859, -1, -1, -1, 863, 5, 6, 7, 8, 692, ! 693, 870, -1, -1, 14, 15, 16, 31, -1, 33, ! -1, 35, 36, 37, 38, 39, 40, 41, -1, 712, ! 713, -1, -1, 47, -1, -1, 50, -1, -1, -1, ! -1, 55, 56, 57, -1, -1, -1, 61, 62, -1, ! -1, -1, 66, 67, -1, -1, -1, 71, -1, 73, ! -1, -1, -1, 922, 78, 53, 54, 55, 56, 57, ! 58, 59, 86, 932, 933, 89, 90, 936, -1, 93, ! -1, -1, 941, 942, -1, 944, -1, 87, -1, -1, ! -1, 774, 775, -1, -1, -1, 955, -1, -1, 958, ! -1, -1, 961, 962, -1, 964, 332, -1, -1, 792, ! 793, 47, 48, 49, 50, 51, 52, 53, 54, 55, ! 56, 57, 58, 59, 244, 245, 246, 247, -1, -1, ! -1, 5, 6, 7, 8, -1, 248, 249, 250, 251, ! 14, 15, 16, -1, -1, -1, 991, 992, -1, -1, ! -1, -1, 997, -1, 1013, -1, 1015, 4, 5, 6, ! 7, 8, 248, 249, 250, 251, -1, 14, 15, 16, ! -1, 432, 433, 434, 435, -1, -1, -1, -1, -1, ! -1, -1, -1, 30, -1, 32, 1, -1, 3, 4, ! -1, -1, 7, 8, -1, 10, 11, -1, 13, 14, ! 15, 16, -1, -1, -1, 52, 1051, -1, -1, -1, ! -1, -1, -1, 1058, 1059, 30, 31, 32, 33, -1, ! 35, 36, 37, 38, 39, 40, 41, 74, -1, -1, ! -1, -1, 47, -1, -1, 50, -1, 52, -1, -1, ! 55, 56, 57, -1, -1, -1, 61, 62, -1, -1, ! 1095, 66, 67, -1, -1, -1, 71, -1, 73, 74, ! -1, -1, -1, 78, -1, 1110, -1, -1, -1, -1, ! -1, 86, -1, -1, 89, 90, -1, -1, 93, 51, ! 52, 53, 54, 55, 56, 57, 58, 59, 1, -1, ! -1, 4, 5, 6, 7, 8, -1, -1, -1, 1144, ! 1145, 14, 15, 16, -1, 566, 567, -1, -1, 570, ! 571, -1, 432, 433, 434, 435, 29, 30, -1, 32, ! -1, -1, -1, -1, 436, 437, 438, 439, -1, -1, ! 43, -1, -1, -1, -1, -1, -1, -1, -1, 52, ! 566, 567, 568, 569, 570, 571, 572, 573, -1, -1, ! 436, 437, 438, 439, -1, -1, 5, 6, 7, 8, ! -1, 74, -1, -1, -1, 14, 15, 16, -1, -1, ! -1, -1, -1, -1, 87, -1, -1, -1, 91, -1, ! 93, 1, 608, 32, 4, 5, 6, 7, 8, -1, ! -1, -1, -1, -1, 14, 15, 16, 4, 5, 6, ! 7, 8, -1, -1, 343, 344, -1, 14, 15, 16, ! 30, 49, 50, 51, 52, 53, 54, 55, 56, 57, ! 58, 59, 361, 30, -1, 32, -1, -1, 367, 368, ! -1, -1, 52, 372, 373, 374, 375, 376, 377, 378, ! 379, 380, 381, 382, 383, 52, 566, 567, -1, 388, ! 570, 571, -1, -1, 74, -1, 568, 569, -1, -1, ! 572, 573, -1, -1, -1, -1, -1, 74, -1, 408, ! -1, -1, -1, 93, -1, -1, -1, -1, -1, -1, ! 87, -1, 568, 569, -1, -1, 572, 573, -1, -1, ! -1, -1, 5, 6, 7, 8, -1, 758, 759, 760, ! 761, 14, 15, 16, -1, 766, 767, 768, 769, 42, ! 43, 44, -1, 46, 47, 48, 49, 50, 51, 52, ! 53, 54, 55, 56, 57, 58, 59, -1, -1, -1, ! -1, -1, 758, 759, 760, 761, 762, 763, 764, 765, ! 766, 767, 768, 769, 770, 771, 772, 773, 487, -1, 1, -1, -1, 4, 5, 6, 7, 8, -1, -1, ! -1, 94, -1, 14, 15, 16, -1, 506, 507, -1, ! -1, 1, -1, 3, 4, 5, 6, 7, 8, 30, ! -1, -1, 12, -1, 14, 15, 16, -1, -1, -1, ! -1, -1, 1, -1, -1, 4, 5, 6, 7, 8, ! 30, 52, -1, 12, -1, 14, 15, 16, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, 556, 557, -1, ! -1, 30, 52, 74, 48, 49, 50, 51, 52, 53, ! 54, 55, 56, 57, 58, 59, -1, -1, 758, 759, ! 760, 761, 93, 52, 74, -1, 766, 767, 768, 769, ! 762, 763, 764, 765, 593, -1, -1, -1, 770, 771, ! 772, 773, 92, 4, -1, 74, 7, 8, 9, -1, ! -1, 610, -1, 14, 15, 16, 762, 763, 764, 765, ! -1, 620, -1, 92, 770, 771, 772, 773, -1, 30, ! 629, 32, -1, -1, -1, 5, 6, 7, 8, -1, ! -1, -1, -1, 642, 14, 15, 16, 646, 42, 43, ! 44, 52, 46, 47, 48, 49, 50, 51, 52, 53, ! 54, 55, 56, 57, 58, 59, -1, -1, -1, -1, ! -1, -1, -1, 74, -1, -1, -1, 676, -1, -1, ! 1, -1, 3, 4, 5, 6, 7, 8, -1, 10, ! 11, -1, 13, 14, 15, 16, 17, 91, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, ! 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, ! 41, -1, -1, -1, -1, -1, 47, -1, -1, 50, ! 729, 52, -1, -1, 55, 56, 57, -1, 737, -1, ! 61, 62, 741, -1, -1, 66, 67, -1, -1, -1, ! 71, -1, 73, 74, -1, -1, -1, 78, -1, -1, ! 81, 82, -1, -1, 85, 86, 87, 88, 89, 90, ! -1, -1, 93, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, 1, -1, 3, 4, 5, 6, 7, 8, ! -1, 10, 11, -1, 13, 14, 15, 16, 17, 798, ! 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, ! 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, ! 39, 40, 41, -1, -1, -1, -1, -1, 47, -1, ! -1, 50, -1, 52, -1, -1, 55, 56, 57, -1, ! -1, -1, 61, 62, -1, -1, -1, 66, 67, -1, ! -1, -1, 71, -1, 73, 74, -1, -1, 857, 78, ! -1, 860, 81, 82, -1, 864, 85, 86, 87, 88, ! 89, 90, 4, -1, 93, 7, 8, -1, -1, 878, ! -1, -1, 14, 15, 16, -1, -1, -1, -1, 888, ! -1, -1, -1, -1, 1, 894, -1, 4, 30, -1, ! 7, 8, -1, -1, -1, 904, 905, 14, 15, 16, ! -1, -1, -1, -1, 913, -1, -1, -1, -1, -1, ! 52, -1, -1, 30, -1, 32, 33, -1, -1, -1, ! -1, -1, -1, -1, 1, -1, 3, 4, 5, 6, ! 7, 8, 74, 10, 11, 52, 13, 14, 15, 16, ! 17, 950, 19, 20, 21, 22, 23, 24, 25, 26, ! 27, 28, 29, 30, 31, 32, 33, 74, 35, 36, ! 37, 38, 39, 40, 41, -1, -1, -1, -1, -1, ! 47, 980, -1, 50, 983, 52, 985, 986, 55, 56, ! 57, -1, -1, -1, 61, 62, -1, -1, 4, 66, ! 67, 7, 8, -1, 71, -1, 73, 74, 14, 15, ! 16, 78, -1, -1, 81, 82, -1, -1, 85, 86, ! 87, -1, 89, 90, 30, 1, 93, 3, 4, -1, ! -1, -1, -1, -1, 10, 11, -1, 13, -1, -1, ! 1039, -1, -1, 1042, -1, -1, 52, -1, -1, -1, ! -1, -1, -1, -1, -1, 31, -1, 33, -1, 35, ! 36, 37, 38, 39, 40, 41, -1, -1, 74, -1, ! -1, 47, -1, -1, 50, -1, -1, -1, -1, 55, ! 56, 57, -1, -1, -1, 61, 62, -1, -1, 65, ! 66, 67, -1, -1, -1, 71, -1, 73, 74, -1, ! -1, -1, 78, -1, -1, -1, 1, -1, 3, 4, ! 86, -1, 88, 89, 90, 10, 11, 93, 13, -1, ! 5, 6, 7, 8, 5, 6, 7, 8, -1, 14, ! 15, 16, -1, 14, 15, 16, 31, -1, 33, -1, ! 35, 36, 37, 38, 39, 40, 41, 32, -1, -1, ! -1, -1, 47, -1, -1, 50, -1, -1, -1, -1, ! 55, 56, 57, -1, -1, -1, 61, 62, -1, -1, ! 65, 66, 67, -1, -1, 1, 71, 3, 73, 74, ! -1, -1, -1, 78, 10, 11, -1, 13, -1, -1, ! -1, 86, -1, 88, 89, 90, -1, -1, 93, -1, ! -1, -1, -1, -1, -1, 31, -1, 33, -1, 35, ! 36, 37, 38, 39, 40, 41, -1, 43, -1, 1, ! -1, 47, 4, -1, 50, 7, 8, -1, -1, 55, ! 56, 57, 14, 15, 16, 61, 62, -1, -1, 65, ! 66, 67, -1, -1, 1, 71, 3, 73, 30, -1, ! 32, -1, 78, 10, 11, -1, 13, -1, -1, -1, ! 86, -1, -1, 89, 90, -1, -1, 93, -1, -1, ! 52, -1, -1, -1, 31, -1, 33, -1, 35, 36, ! 37, 38, 39, 40, 41, -1, -1, -1, -1, -1, ! 47, -1, 74, 50, -1, -1, -1, -1, 55, 56, ! 57, -1, -1, -1, 61, 62, -1, -1, -1, 66, ! 67, -1, -1, -1, 71, -1, 73, -1, -1, -1, ! -1, 78, -1, -1, -1, -1, -1, -1, -1, 86, ! -1, -1, 89, 90, 1, -1, 93, 4, 5, 6, ! 7, 8, -1, -1, -1, -1, -1, 14, 15, 16, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, 29, 30, 1, 32, -1, 4, 5, 6, ! 7, 8, -1, -1, -1, -1, 43, 14, 15, 16, ! -1, -1, -1, -1, -1, 52, -1, -1, -1, -1, ! -1, -1, 29, 30, -1, 32, -1, -1, -1, 66, ! 67, -1, -1, -1, -1, -1, 43, 74, -1, -1, ! -1, 3, -1, -1, -1, 52, -1, -1, 10, 11, ! 87, 13, -1, -1, 91, -1, 93, -1, -1, 66, ! 67, -1, -1, -1, -1, -1, -1, 74, -1, 31, ! -1, 33, -1, 35, 36, 37, 38, 39, 40, 41, ! 87, -1, -1, -1, 91, 47, 93, -1, 50, -1, ! -1, -1, -1, 55, 56, 57, -1, -1, -1, 61, ! 62, -1, -1, -1, 66, 67, -1, 3, -1, 71, ! -1, 73, -1, -1, 10, 11, 78, 13, -1, -1, ! -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, ! -1, -1, 94, -1, -1, 31, -1, 33, -1, 35, ! 36, 37, 38, 39, 40, 41, -1, -1, -1, -1, ! -1, 47, -1, -1, 50, -1, -1, -1, -1, 55, ! 56, 57, -1, -1, -1, 61, 62, -1, -1, -1, ! 66, 67, -1, -1, -1, 71, -1, 73, -1, -1, ! -1, -1, 78, -1, -1, -1, -1, -1, -1, -1, ! 86, -1, -1, 89, 90, -1, -1, -1, 94, 3, ! 4, 5, 6, 7, 8, -1, 10, 11, -1, 13, ! 14, 15, 16, 17, -1, 19, 20, 21, 22, 23, ! 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, ! -1, 35, 36, 37, 38, 39, 40, 41, -1, -1, ! -1, -1, -1, 47, -1, -1, 50, -1, 52, -1, ! -1, 55, 56, 57, -1, -1, -1, 61, 62, -1, ! -1, -1, 66, 67, -1, -1, -1, 71, -1, 73, ! 74, -1, -1, -1, 78, -1, -1, 81, 82, -1, ! -1, 85, 86, 87, -1, 89, 90, 3, 4, 93, ! -1, -1, -1, -1, 10, 11, -1, 13, -1, -1, ! -1, 17, -1, 19, 20, 21, 22, 23, 24, 25, ! 26, 27, 28, 29, -1, 31, -1, 33, -1, 35, ! 36, 37, 38, 39, 40, 41, -1, -1, -1, -1, ! -1, 47, -1, -1, 50, -1, -1, -1, -1, 55, ! 56, 57, -1, -1, -1, 61, 62, -1, -1, -1, ! 66, 67, -1, 3, -1, 71, -1, 73, 74, -1, ! 10, 11, 78, 13, -1, 81, 82, -1, -1, 85, ! 86, 87, -1, 89, 90, -1, -1, 93, -1, -1, ! -1, 31, -1, 33, -1, 35, 36, 37, 38, 39, ! 40, 41, -1, -1, -1, 1, -1, 47, 4, -1, ! 50, 7, 8, -1, -1, 55, 56, 57, 14, 15, ! 16, 61, 62, -1, -1, -1, 66, 67, -1, -1, ! 1, 71, 3, 73, 30, -1, 32, -1, 78, 10, ! 11, -1, 13, -1, -1, -1, 86, -1, -1, 89, ! 90, -1, -1, 93, -1, -1, 52, -1, -1, -1, ! 31, -1, 33, -1, 35, 36, 37, 38, 39, 40, ! 41, -1, -1, -1, -1, -1, 47, -1, 74, 50, ! -1, -1, -1, -1, 55, 56, 57, -1, -1, -1, ! 61, 62, -1, -1, -1, 66, 67, -1, -1, -1, ! 71, -1, 73, -1, -1, -1, -1, 78, -1, -1, ! -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, ! 3, 4, 5, 6, 7, 8, -1, 10, 11, -1, ! 13, 14, 15, 16, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, 30, 31, 32, ! 33, -1, 35, 36, 37, 38, 39, 40, 41, -1, ! -1, -1, -1, -1, 47, -1, -1, 50, -1, 52, ! -1, -1, 55, 56, 57, -1, -1, -1, 61, 62, ! -1, -1, -1, 66, 67, -1, -1, -1, 71, -1, ! 73, 74, -1, -1, -1, 78, -1, -1, -1, -1, ! -1, -1, -1, 86, 3, 4, 89, 90, 7, 8, ! -1, 10, 11, -1, 13, 14, 15, 16, 4, 5, ! 6, 7, 8, -1, -1, -1, -1, -1, 14, 15, ! 16, 30, 31, 32, 33, -1, 35, 36, 37, 38, ! 39, 40, 41, -1, 30, -1, 32, -1, 47, -1, ! -1, 50, -1, 52, -1, -1, 55, 56, 57, -1, ! -1, -1, 61, 62, -1, -1, 52, 66, 67, -1, ! 3, 4, 71, -1, 73, 74, -1, 10, 11, 78, ! 13, -1, -1, -1, -1, -1, -1, 86, 74, -1, ! 89, 90, -1, -1, -1, -1, -1, -1, 31, -1, ! 33, 87, 35, 36, 37, 38, 39, 40, 41, -1, ! -1, -1, -1, -1, 47, -1, -1, 50, -1, -1, ! -1, -1, 55, 56, 57, -1, -1, -1, 61, 62, ! -1, -1, -1, 66, 67, -1, 3, -1, 71, -1, ! 73, 74, -1, 10, 11, 78, 13, -1, -1, -1, ! -1, -1, -1, 86, -1, -1, 89, 90, -1, -1, ! -1, -1, -1, -1, 31, -1, 33, -1, 35, 36, ! 37, 38, 39, 40, 41, -1, -1, -1, -1, -1, ! 47, -1, -1, 50, -1, -1, -1, -1, 55, 56, ! 57, -1, -1, -1, 61, 62, -1, -1, -1, 66, ! 67, -1, 3, -1, 71, -1, 73, -1, -1, 10, ! 11, 78, 13, -1, -1, -1, -1, -1, -1, 86, ! 87, -1, 89, 90, -1, -1, -1, -1, -1, -1, ! 31, -1, 33, -1, 35, 36, 37, 38, 39, 40, ! 41, -1, -1, -1, -1, -1, 47, -1, -1, 50, ! -1, -1, -1, -1, 55, 56, 57, -1, -1, -1, ! 61, 62, -1, -1, -1, 66, 67, -1, 3, -1, ! 71, -1, 73, -1, -1, 10, 11, 78, 13, -1, ! -1, -1, -1, -1, -1, 86, 87, -1, 89, 90, ! -1, -1, -1, -1, -1, -1, 31, -1, 33, -1, ! 35, 36, 37, 38, 39, 40, 41, -1, -1, -1, ! -1, -1, 47, -1, -1, 50, -1, -1, -1, -1, ! 55, 56, 57, -1, -1, -1, 61, 62, -1, -1, ! -1, 66, 67, -1, 3, -1, 71, -1, 73, -1, ! -1, 10, 11, 78, 13, -1, -1, -1, -1, -1, ! -1, 86, -1, -1, 89, 90, -1, -1, -1, -1, ! -1, -1, 31, -1, 33, -1, 35, 36, 37, 38, ! 39, 40, 41, -1, -1, -1, -1, -1, 47, -1, ! -1, 50, -1, -1, -1, -1, 55, 56, 57, -1, ! -1, -1, 61, 62, -1, -1, -1, 66, 67, -1, ! 3, -1, 71, -1, 73, -1, -1, 10, 11, 78, ! 13, -1, -1, -1, -1, -1, -1, 86, -1, -1, ! 89, 90, -1, -1, -1, -1, -1, -1, 31, -1, ! 33, -1, 35, 36, 37, 38, 39, 40, 41, -1, ! -1, -1, -1, -1, 47, -1, -1, 50, -1, -1, ! -1, -1, 55, 56, 57, -1, -1, -1, 61, 62, ! -1, -1, -1, 66, 67, -1, 3, -1, 71, -1, ! 73, -1, -1, 10, 11, 78, 13, -1, -1, -1, ! -1, -1, -1, 86, -1, -1, 89, 90, -1, -1, ! -1, -1, -1, -1, 31, -1, 33, -1, 35, 36, ! 37, 38, 39, 40, 41, -1, -1, -1, 1, -1, ! 47, 4, -1, 50, 7, 8, -1, -1, 55, 56, ! 57, 14, 15, 16, 61, 62, -1, -1, -1, 66, ! 67, -1, -1, -1, 71, -1, 73, 30, -1, 32, ! 33, 78, -1, -1, -1, -1, -1, -1, 1, 86, ! -1, 4, 89, 90, 7, 8, -1, -1, -1, 52, ! -1, 14, 15, 16, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, 30, -1, 32, ! 33, 74, 75, 76, 77, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, 87, 88, -1, -1, 1, 52, ! 3, 4, 5, 6, 7, 8, -1, -1, -1, -1, ! -1, 14, 15, 16, -1, -1, -1, -1, -1, -1, ! -1, 74, -1, -1, -1, -1, 29, 30, -1, 32, ! 33, -1, -1, 4, 87, 88, 7, 8, -1, -1, ! -1, -1, -1, 14, 15, 16, -1, -1, -1, 52, ! -1, -1, 55, 56, 57, -1, -1, -1, -1, 30, ! -1, 32, -1, 66, -1, 68, 69, 70, -1, -1, ! -1, 74, -1, -1, -1, 78, 79, 80, -1, -1, ! -1, 52, -1, 1, 87, 3, 4, 5, 6, 7, ! 8, -1, -1, -1, -1, -1, 14, 15, 16, -1, ! -1, -1, -1, 74, -1, 4, 5, 6, 7, 8, ! -1, -1, 30, -1, 32, 14, 15, 16, -1, -1, ! -1, -1, -1, -1, -1, -1, 4, 5, 6, 7, ! 8, 30, -1, 32, 52, -1, 14, 15, 16, 57, ! -1, -1, -1, -1, -1, -1, -1, -1, 66, -1, ! -1, -1, 30, 52, 32, -1, 74, -1, -1, -1, ! 4, 5, 6, 7, 8, -1, -1, -1, -1, 87, ! 14, 15, 16, -1, 52, 74, -1, -1, -1, 4, ! 5, 6, 7, 8, -1, -1, 30, -1, 87, 14, ! 15, 16, -1, -1, -1, -1, 74, -1, -1, -1, ! 4, 5, 6, 7, 8, 30, -1, -1, 52, 87, ! 14, 15, 16, -1, -1, -1, -1, -1, -1, -1, ! -1, 4, 5, 6, 7, 8, 30, 52, -1, -1, ! 74, 14, 15, 16, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, 87, -1, -1, -1, 30, 52, 74, ! -1, -1, -1, -1, 4, 5, 6, 7, 8, -1, ! -1, -1, 87, -1, 14, 15, 16, -1, -1, 52, ! 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! 30, -1, 32, 87, -1, -1, -1, -1, -1, -1, ! -1, 74, -1, -1, -1, 3, 4, -1, -1, 7, ! 8, 9, 52, -1, 87, 13, 14, 15, 16, 17, ! 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, ! 28, 29, 30, 31, 74, -1, -1, -1, 3, 4, ! -1, -1, 7, 8, 9, -1, -1, 45, 13, 14, ! 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, ! 25, 26, 27, 28, 29, 30, 31, -1, 66, -1, ! -1, -1, -1, 3, 4, -1, 74, 7, 8, 9, ! 45, -1, -1, 13, 14, 15, 16, 17, 18, 19, ! 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, ! 30, 31, -1, -1, -1, -1, 3, 4, -1, 74, ! 7, 8, 9, -1, -1, 45, 13, 14, 15, 16, ! 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, ! 27, 28, 29, 30, 31, 4, 5, 6, 7, 8, ! -1, -1, -1, 12, 74, 14, 15, 16, 45, -1, ! -1, -1, -1, -1, 4, 5, 6, 7, 8, -1, ! -1, 30, 12, 32, 14, 15, 16, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, 74, -1, -1, ! 30, -1, 32, 52, 4, 5, 6, 7, 8, 4, ! 5, 6, 7, 8, 14, 15, 16, -1, -1, 14, ! 15, 16, 52, -1, -1, 74, -1, -1, -1, -1, ! 30, -1, 32, -1, -1, 30, -1, 32, 4, 5, ! 6, 7, 8, -1, 74, -1, -1, -1, 14, 15, ! 16, -1, 52, -1, -1, -1, -1, 52, 4, 5, ! 6, 7, 8, -1, 30, -1, 32, -1, 14, 15, ! 16, -1, -1, -1, 74, -1, -1, -1, -1, 74, ! -1, -1, -1, -1, 30, -1, 52, 4, 5, 6, ! 7, 8, 4, 5, 6, 7, 8, 14, 15, 16, ! -1, -1, 14, 15, 16, -1, 52, -1, 74, -1, ! -1, -1, -1, 30, -1, -1, -1, -1, 30, 4, ! 5, 6, 7, 8, -1, -1, -1, -1, 74, 14, ! 15, 16, -1, -1, -1, 52, -1, -1, -1, -1, ! 52, -1, -1, 4, -1, 30, 7, 8, 4, 5, ! 6, 7, 8, 14, 15, 16, -1, 74, 14, 15, ! 16, -1, 74, -1, -1, -1, -1, 52, -1, 30, ! -1, 32, 4, -1, 30, 7, 8, -1, -1, -1, ! -1, -1, 14, 15, 16, -1, -1, -1, -1, 74, ! -1, 52, -1, -1, -1, -1, 52, -1, 30, -1, ! 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, 74, -1, -1, -1, -1, 74, -1, ! 52, 42, 43, 44, -1, 46, 47, 48, 49, 50, ! 51, 52, 53, 54, 55, 56, 57, 58, 59, 42, ! 43, 44, 74, 46, 47, 48, 49, 50, 51, 52, ! 53, 54, 55, 56, 57, 58, 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! 42, 43, 44, 94, 46, 47, 48, 49, 50, 51, ! 52, 53, 54, 55, 56, 57, 58, 59, 42, 43, ! 44, 94, 46, 47, 48, 49, 50, 51, 52, 53, ! 54, 55, 56, 57, 58, 59, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, 42, ! 43, 44, 94, 46, 47, 48, 49, 50, 51, 52, ! 53, 54, 55, 56, 57, 58, 59, -1, 92, 42, ! 43, 44, -1, 46, 47, 48, 49, 50, 51, 52, ! 53, 54, 55, 56, 57, 58, 59, -1, -1, 12, ! 32, -1, -1, -1, -1, -1, -1, -1, 91, -1, ! 42, 43, 44, -1, 46, 47, 48, 49, 50, 51, ! 52, 53, 54, 55, 56, 57, 58, 59, 91, 42, ! 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, ! 53, 54, 55, 56, 57, 58, 59, 42, 43, 44, ! 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, ! 55, 56, 57, 58, 59, 42, 43, 44, -1, 46, ! 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, ! 57, 58, 59, 44, -1, 46, 47, 48, 49, 50, ! 51, 52, 53, 54, 55, 56, 57, 58, 59 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ #line 3 "/usr/share/bison/bison.simple" *************** yyreduce: *** 2976,5427 **** switch (yyn) { case 1: ! #line 343 "objc/objc-parse.y" { if (pedantic) pedwarn ("ISO C forbids an empty source file"); ; break;} case 3: ! #line 354 "objc/objc-parse.y" ! {yyval.ttype = NULL_TREE; ; break;} case 5: ! #line 355 "objc/objc-parse.y" ! {yyval.ttype = NULL_TREE; ggc_collect(); ; break;} ! case 7: ! #line 360 "objc/objc-parse.y" ! { parsing_iso_function_signature = false; ; break;} ! case 11: ! #line 368 "objc/objc-parse.y" ! { STRIP_NOPS (yyvsp[-2].ttype); ! if ((TREE_CODE (yyvsp[-2].ttype) == ADDR_EXPR ! && TREE_CODE (TREE_OPERAND (yyvsp[-2].ttype, 0)) == STRING_CST) ! || TREE_CODE (yyvsp[-2].ttype) == STRING_CST) ! assemble_asm (yyvsp[-2].ttype); ! else ! error ("argument of `asm' is not a constant string"); ; break;} case 12: ! #line 376 "objc/objc-parse.y" ! { RESTORE_EXT_FLAGS (yyvsp[-1].itype); ; break;} case 13: ! #line 381 "objc/objc-parse.y" ! { if (pedantic) ! error ("ISO C forbids data definition with no type or storage class"); ! else ! warning ("data definition has no type or storage class"); ! POP_DECLSPEC_STACK; ; break;} case 14: ! #line 388 "objc/objc-parse.y" { POP_DECLSPEC_STACK; ; break;} case 15: ! #line 390 "objc/objc-parse.y" { POP_DECLSPEC_STACK; ; break;} case 16: ! #line 392 "objc/objc-parse.y" ! { shadow_tag (yyvsp[-1].ttype); ; break;} case 19: ! #line 396 "objc/objc-parse.y" { if (pedantic) ! pedwarn ("ISO C does not allow extra `;' outside of a function"); ; break;} case 20: ! #line 402 "objc/objc-parse.y" ! { if (! start_function (current_declspecs, yyvsp[0].ttype, ! all_prefix_attributes)) YYERROR1; ; break;} case 21: ! #line 407 "objc/objc-parse.y" { DECL_SOURCE_LOCATION (current_function_decl) = yyvsp[0].location; store_parm_decls (); ; break;} case 22: ! #line 410 "objc/objc-parse.y" { finish_function (); POP_DECLSPEC_STACK; ; break;} case 23: ! #line 413 "objc/objc-parse.y" { POP_DECLSPEC_STACK; ; break;} case 24: ! #line 415 "objc/objc-parse.y" ! { if (! start_function (current_declspecs, yyvsp[0].ttype, ! all_prefix_attributes)) YYERROR1; ; break;} case 25: ! #line 420 "objc/objc-parse.y" { DECL_SOURCE_LOCATION (current_function_decl) = yyvsp[0].location; store_parm_decls (); ; break;} case 26: ! #line 423 "objc/objc-parse.y" { finish_function (); POP_DECLSPEC_STACK; ; break;} case 27: ! #line 426 "objc/objc-parse.y" { POP_DECLSPEC_STACK; ; break;} case 28: ! #line 428 "objc/objc-parse.y" ! { if (! start_function (NULL_TREE, yyvsp[0].ttype, ! all_prefix_attributes)) YYERROR1; ; break;} case 29: ! #line 433 "objc/objc-parse.y" { DECL_SOURCE_LOCATION (current_function_decl) = yyvsp[0].location; store_parm_decls (); ; break;} case 30: ! #line 436 "objc/objc-parse.y" { finish_function (); POP_DECLSPEC_STACK; ; break;} case 31: ! #line 439 "objc/objc-parse.y" { POP_DECLSPEC_STACK; ; break;} ! case 36: ! #line 450 "objc/objc-parse.y" { yyval.code = ADDR_EXPR; ; break;} ! case 37: ! #line 452 "objc/objc-parse.y" { yyval.code = NEGATE_EXPR; ; break;} ! case 38: ! #line 454 "objc/objc-parse.y" { yyval.code = CONVERT_EXPR; ; break;} ! case 39: ! #line 457 "objc/objc-parse.y" { yyval.code = PREINCREMENT_EXPR; ; break;} ! case 40: ! #line 459 "objc/objc-parse.y" { yyval.code = PREDECREMENT_EXPR; ; break;} ! case 41: ! #line 461 "objc/objc-parse.y" { yyval.code = BIT_NOT_EXPR; ; break;} ! case 42: ! #line 463 "objc/objc-parse.y" { yyval.code = TRUTH_NOT_EXPR; ; break;} case 43: ! #line 467 "objc/objc-parse.y" ! { yyval.ttype = build_compound_expr (yyvsp[0].ttype); ; break;} case 44: ! #line 472 "objc/objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 46: ! #line 478 "objc/objc-parse.y" ! { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} case 47: ! #line 480 "objc/objc-parse.y" ! { chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} case 49: ! #line 486 "objc/objc-parse.y" ! { yyval.ttype = build_indirect_ref (yyvsp[0].ttype, "unary *"); ; break;} case 50: ! #line 489 "objc/objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; RESTORE_EXT_FLAGS (yyvsp[-1].itype); ; break;} case 51: ! #line 492 "objc/objc-parse.y" ! { yyval.ttype = build_unary_op (yyvsp[-1].code, yyvsp[0].ttype, 0); ! overflow_warning (yyval.ttype); ; break;} case 52: ! #line 496 "objc/objc-parse.y" ! { yyval.ttype = finish_label_address_expr (yyvsp[0].ttype); ; break;} case 53: ! #line 498 "objc/objc-parse.y" { skip_evaluation--; ! if (TREE_CODE (yyvsp[0].ttype) == COMPONENT_REF ! && DECL_C_BIT_FIELD (TREE_OPERAND (yyvsp[0].ttype, 1))) ! error ("`sizeof' applied to a bit-field"); ! yyval.ttype = c_sizeof (TREE_TYPE (yyvsp[0].ttype)); ; break;} case 54: ! #line 504 "objc/objc-parse.y" { skip_evaluation--; ! yyval.ttype = c_sizeof (groktypename (yyvsp[-1].ttype)); ; break;} case 55: ! #line 507 "objc/objc-parse.y" { skip_evaluation--; ! yyval.ttype = c_alignof_expr (yyvsp[0].ttype); ; break;} case 56: ! #line 510 "objc/objc-parse.y" { skip_evaluation--; ! yyval.ttype = c_alignof (groktypename (yyvsp[-1].ttype)); ; break;} case 57: ! #line 513 "objc/objc-parse.y" ! { yyval.ttype = build_unary_op (REALPART_EXPR, yyvsp[0].ttype, 0); ; break;} case 58: ! #line 515 "objc/objc-parse.y" ! { yyval.ttype = build_unary_op (IMAGPART_EXPR, yyvsp[0].ttype, 0); ; break;} case 59: ! #line 519 "objc/objc-parse.y" ! { skip_evaluation++; ; break;} case 60: ! #line 523 "objc/objc-parse.y" ! { skip_evaluation++; ; break;} case 61: ! #line 527 "objc/objc-parse.y" ! { skip_evaluation++; ; break;} case 63: ! #line 533 "objc/objc-parse.y" ! { yyval.ttype = c_cast_expr (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 65: ! #line 539 "objc/objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 66: ! #line 541 "objc/objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 67: ! #line 543 "objc/objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 68: ! #line 545 "objc/objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 69: ! #line 547 "objc/objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 70: ! #line 549 "objc/objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 71: ! #line 551 "objc/objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 72: ! #line 553 "objc/objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 73: ! #line 555 "objc/objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 74: ! #line 557 "objc/objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 75: ! #line 559 "objc/objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 76: ! #line 561 "objc/objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 77: ! #line 563 "objc/objc-parse.y" ! { yyvsp[-1].ttype = c_common_truthvalue_conversion ! (default_conversion (yyvsp[-1].ttype)); ! skip_evaluation += yyvsp[-1].ttype == truthvalue_false_node; ; break;} case 78: ! #line 567 "objc/objc-parse.y" ! { skip_evaluation -= yyvsp[-3].ttype == truthvalue_false_node; ! yyval.ttype = parser_build_binary_op (TRUTH_ANDIF_EXPR, yyvsp[-3].ttype, yyvsp[0].ttype); ; break;} case 79: ! #line 570 "objc/objc-parse.y" ! { yyvsp[-1].ttype = c_common_truthvalue_conversion ! (default_conversion (yyvsp[-1].ttype)); ! skip_evaluation += yyvsp[-1].ttype == truthvalue_true_node; ; break;} case 80: ! #line 574 "objc/objc-parse.y" ! { skip_evaluation -= yyvsp[-3].ttype == truthvalue_true_node; ! yyval.ttype = parser_build_binary_op (TRUTH_ORIF_EXPR, yyvsp[-3].ttype, yyvsp[0].ttype); ; break;} case 81: ! #line 577 "objc/objc-parse.y" ! { yyvsp[-1].ttype = c_common_truthvalue_conversion ! (default_conversion (yyvsp[-1].ttype)); ! skip_evaluation += yyvsp[-1].ttype == truthvalue_false_node; ; break;} case 82: ! #line 581 "objc/objc-parse.y" ! { skip_evaluation += ((yyvsp[-4].ttype == truthvalue_true_node) ! - (yyvsp[-4].ttype == truthvalue_false_node)); ; break;} case 83: ! #line 584 "objc/objc-parse.y" ! { skip_evaluation -= yyvsp[-6].ttype == truthvalue_true_node; ! yyval.ttype = build_conditional_expr (yyvsp[-6].ttype, yyvsp[-3].ttype, yyvsp[0].ttype); ; break;} case 84: ! #line 587 "objc/objc-parse.y" { if (pedantic) pedwarn ("ISO C forbids omitting the middle term of a ?: expression"); /* Make sure first operand is calculated only once. */ ! yyvsp[0].ttype = save_expr (yyvsp[-1].ttype); ! yyvsp[-1].ttype = c_common_truthvalue_conversion ! (default_conversion (yyvsp[0].ttype)); ! skip_evaluation += yyvsp[-1].ttype == truthvalue_true_node; ; break;} case 85: ! #line 595 "objc/objc-parse.y" ! { skip_evaluation -= yyvsp[-4].ttype == truthvalue_true_node; ! yyval.ttype = build_conditional_expr (yyvsp[-4].ttype, yyvsp[-3].ttype, yyvsp[0].ttype); ; break;} case 86: ! #line 598 "objc/objc-parse.y" ! { char class; ! yyval.ttype = build_modify_expr (yyvsp[-2].ttype, NOP_EXPR, yyvsp[0].ttype); ! class = TREE_CODE_CLASS (TREE_CODE (yyval.ttype)); ! if (IS_EXPR_CODE_CLASS (class)) ! C_SET_EXP_ORIGINAL_CODE (yyval.ttype, MODIFY_EXPR); ; break;} case 87: ! #line 605 "objc/objc-parse.y" ! { char class; ! yyval.ttype = build_modify_expr (yyvsp[-2].ttype, yyvsp[-1].code, yyvsp[0].ttype); ! /* This inhibits warnings in ! c_common_truthvalue_conversion. */ ! class = TREE_CODE_CLASS (TREE_CODE (yyval.ttype)); ! if (IS_EXPR_CODE_CLASS (class)) ! C_SET_EXP_ORIGINAL_CODE (yyval.ttype, ERROR_MARK); ; break;} case 88: ! #line 617 "objc/objc-parse.y" { if (yychar == YYEMPTY) yychar = YYLEX; ! yyval.ttype = build_external_ref (yyvsp[0].ttype, yychar == '('); ; break;} case 91: ! #line 625 "objc/objc-parse.y" ! { yyval.ttype = fname_decl (C_RID_CODE (yyval.ttype), yyval.ttype); ; break;} case 92: ! #line 627 "objc/objc-parse.y" { start_init (NULL_TREE, NULL, 0); ! yyvsp[-2].ttype = groktypename (yyvsp[-2].ttype); ! really_start_incremental_init (yyvsp[-2].ttype); ; break;} case 93: ! #line 631 "objc/objc-parse.y" ! { tree constructor = pop_init_level (0); ! tree type = yyvsp[-5].ttype; finish_init (); ! if (pedantic && ! flag_isoc99) pedwarn ("ISO C90 forbids compound literals"); ! yyval.ttype = build_compound_literal (type, constructor); ; break;} case 94: ! #line 640 "objc/objc-parse.y" ! { char class = TREE_CODE_CLASS (TREE_CODE (yyvsp[-1].ttype)); ! if (IS_EXPR_CODE_CLASS (class)) ! C_SET_EXP_ORIGINAL_CODE (yyvsp[-1].ttype, ERROR_MARK); ! yyval.ttype = yyvsp[-1].ttype; ; break;} case 95: ! #line 645 "objc/objc-parse.y" ! { yyval.ttype = error_mark_node; ; break;} case 96: ! #line 647 "objc/objc-parse.y" ! { tree saved_last_tree; ! ! if (pedantic) ! pedwarn ("ISO C forbids braced-groups within expressions"); ! saved_last_tree = COMPOUND_BODY (yyvsp[-2].ttype); ! RECHAIN_STMTS (yyvsp[-2].ttype, COMPOUND_BODY (yyvsp[-2].ttype)); ! last_tree = saved_last_tree; ! TREE_CHAIN (last_tree) = NULL_TREE; ! if (!last_expr_type) ! last_expr_type = void_type_node; ! yyval.ttype = build1 (STMT_EXPR, last_expr_type, yyvsp[-2].ttype); ! TREE_SIDE_EFFECTS (yyval.ttype) = 1; ; break;} case 97: ! #line 661 "objc/objc-parse.y" ! { ! last_tree = COMPOUND_BODY (yyvsp[-2].ttype); ! TREE_CHAIN (last_tree) = NULL_TREE; ! yyval.ttype = error_mark_node; ; break;} case 98: ! #line 667 "objc/objc-parse.y" ! { yyval.ttype = build_function_call (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 99: ! #line 669 "objc/objc-parse.y" ! { yyval.ttype = build_va_arg (yyvsp[-3].ttype, groktypename (yyvsp[-1].ttype)); ; break;} case 100: ! #line 672 "objc/objc-parse.y" ! { ! tree c; ! ! c = fold (yyvsp[-5].ttype); ! STRIP_NOPS (c); ! if (TREE_CODE (c) != INTEGER_CST) ! error ("first argument to __builtin_choose_expr not a constant"); ! yyval.ttype = integer_zerop (c) ? yyvsp[-1].ttype : yyvsp[-3].ttype; ; break;} case 101: ! #line 682 "objc/objc-parse.y" ! { ! tree e1, e2; ! ! e1 = TYPE_MAIN_VARIANT (groktypename (yyvsp[-3].ttype)); ! e2 = TYPE_MAIN_VARIANT (groktypename (yyvsp[-1].ttype)); ! ! yyval.ttype = comptypes (e1, e2, COMPARE_STRICT) ! ? build_int_2 (1, 0) : build_int_2 (0, 0); ! ; break;} case 102: ! #line 692 "objc/objc-parse.y" ! { yyval.ttype = build_array_ref (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 103: ! #line 694 "objc/objc-parse.y" { ! if (!is_public (yyvsp[-2].ttype, yyvsp[0].ttype)) ! yyval.ttype = error_mark_node; ! else ! yyval.ttype = build_component_ref (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 104: ! #line 701 "objc/objc-parse.y" { ! tree expr = build_indirect_ref (yyvsp[-2].ttype, "->"); ! if (!is_public (expr, yyvsp[0].ttype)) ! yyval.ttype = error_mark_node; ! else ! yyval.ttype = build_component_ref (expr, yyvsp[0].ttype); ; break;} - case 105: - #line 710 "objc/objc-parse.y" - { yyval.ttype = build_unary_op (POSTINCREMENT_EXPR, yyvsp[-1].ttype, 0); ; - break;} case 106: ! #line 712 "objc/objc-parse.y" ! { yyval.ttype = build_unary_op (POSTDECREMENT_EXPR, yyvsp[-1].ttype, 0); ; break;} case 107: ! #line 714 "objc/objc-parse.y" ! { yyval.ttype = build_message_expr (yyvsp[0].ttype); ; break;} case 108: ! #line 716 "objc/objc-parse.y" ! { yyval.ttype = build_selector_expr (yyvsp[0].ttype); ; break;} case 109: ! #line 718 "objc/objc-parse.y" ! { yyval.ttype = build_protocol_expr (yyvsp[0].ttype); ; break;} case 110: ! #line 720 "objc/objc-parse.y" ! { yyval.ttype = build_encode_expr (yyvsp[0].ttype); ; break;} case 111: ! #line 722 "objc/objc-parse.y" ! { yyval.ttype = build_objc_string_object (yyvsp[0].ttype); ; break;} case 112: ! #line 727 "objc/objc-parse.y" ! { ! parsing_iso_function_signature = false; /* Reset after decls. */ ! ; break;} case 113: ! #line 734 "objc/objc-parse.y" ! { ! if (warn_traditional && !in_system_header ! && parsing_iso_function_signature) ! warning ("traditional C rejects ISO C style function definitions"); ! if (warn_old_style_definition && !in_system_header ! && !parsing_iso_function_signature) ! warning ("old-style parameter declaration"); ! parsing_iso_function_signature = false; /* Reset after warning. */ ! ; break;} case 114: ! #line 744 "objc/objc-parse.y" ! { ! if (warn_old_style_definition && !in_system_header) ! warning ("old-style parameter declaration"); ! ; break;} case 115: ! #line 755 "objc/objc-parse.y" ! { ; break;} ! case 120: ! #line 771 "objc/objc-parse.y" ! { POP_DECLSPEC_STACK; ; break;} ! case 121: ! #line 773 "objc/objc-parse.y" ! { POP_DECLSPEC_STACK; ; break;} ! case 122: ! #line 775 "objc/objc-parse.y" ! { shadow_tag_warned (yyvsp[-1].ttype, 1); ! pedwarn ("empty declaration"); ; break;} ! case 123: ! #line 778 "objc/objc-parse.y" ! { pedwarn ("empty declaration"); ; break;} ! case 124: ! #line 787 "objc/objc-parse.y" { ; break;} - case 125: - #line 795 "objc/objc-parse.y" - { pending_xref_error (); - PUSH_DECLSPEC_STACK; - split_specs_attrs (yyvsp[0].ttype, - ¤t_declspecs, &prefix_attributes); - all_prefix_attributes = prefix_attributes; ; - break;} - case 126: - #line 806 "objc/objc-parse.y" - { all_prefix_attributes = chainon (yyvsp[0].ttype, prefix_attributes); ; - break;} case 127: ! #line 811 "objc/objc-parse.y" { POP_DECLSPEC_STACK; ; break;} case 128: ! #line 813 "objc/objc-parse.y" { POP_DECLSPEC_STACK; ; break;} case 129: ! #line 815 "objc/objc-parse.y" ! { POP_DECLSPEC_STACK; ; break;} case 130: ! #line 817 "objc/objc-parse.y" ! { POP_DECLSPEC_STACK; ; break;} case 131: ! #line 819 "objc/objc-parse.y" ! { shadow_tag (yyvsp[-1].ttype); ; break;} case 132: ! #line 821 "objc/objc-parse.y" ! { RESTORE_EXT_FLAGS (yyvsp[-1].itype); ; break;} case 133: ! #line 878 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 134: ! #line 881 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 135: ! #line 884 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 136: ! #line 890 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; break;} case 137: ! #line 896 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 138: ! #line 899 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 139: ! #line 905 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, NULL_TREE); ! TREE_STATIC (yyval.ttype) = 0; ; break;} case 140: ! #line 908 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; break;} case 141: ! #line 914 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 142: ! #line 917 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 143: ! #line 920 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 144: ! #line 923 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 145: ! #line 926 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 146: ! #line 929 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 147: ! #line 932 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 148: ! #line 938 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 149: ! #line 941 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; break;} case 150: ! #line 944 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 151: ! #line 947 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 152: ! #line 950 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 153: ! #line 953 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 154: #line 959 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 155: ! #line 962 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 156: ! #line 965 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 157: #line 968 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 158: ! #line 971 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 159: ! #line 974 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 160: ! #line 980 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; break;} case 161: ! #line 983 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 162: ! #line 986 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 163: ! #line 989 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 164: ! #line 992 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 165: ! #line 998 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ! TREE_STATIC (yyval.ttype) = 0; ; break;} case 166: ! #line 1001 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 167: ! #line 1004 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 168: ! #line 1007 "objc/objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) ! warning ("`%s' is not at beginning of declaration", ! IDENTIFIER_POINTER (yyvsp[0].ttype)); ! yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; break;} case 169: ! #line 1013 "objc/objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) ! warning ("`%s' is not at beginning of declaration", ! IDENTIFIER_POINTER (yyvsp[0].ttype)); ! yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; break;} case 170: ! #line 1019 "objc/objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) ! warning ("`%s' is not at beginning of declaration", ! IDENTIFIER_POINTER (yyvsp[0].ttype)); ! yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; break;} case 171: ! #line 1025 "objc/objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) ! warning ("`%s' is not at beginning of declaration", ! IDENTIFIER_POINTER (yyvsp[0].ttype)); ! yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; break;} case 172: ! #line 1034 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; break;} case 173: ! #line 1040 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 174: ! #line 1043 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 175: ! #line 1046 "objc/objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) ! warning ("`%s' is not at beginning of declaration", ! IDENTIFIER_POINTER (yyvsp[0].ttype)); ! yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; break;} case 176: ! #line 1052 "objc/objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) ! warning ("`%s' is not at beginning of declaration", ! IDENTIFIER_POINTER (yyvsp[0].ttype)); ! yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; break;} case 177: ! #line 1058 "objc/objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) ! warning ("`%s' is not at beginning of declaration", ! IDENTIFIER_POINTER (yyvsp[0].ttype)); ! yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; break;} case 178: ! #line 1064 "objc/objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) ! warning ("`%s' is not at beginning of declaration", ! IDENTIFIER_POINTER (yyvsp[0].ttype)); ! yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; break;} case 179: ! #line 1073 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; break;} case 180: ! #line 1079 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 181: ! #line 1082 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 182: ! #line 1085 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 183: ! #line 1088 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 184: ! #line 1091 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 185: ! #line 1094 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 186: ! #line 1097 "objc/objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) ! warning ("`%s' is not at beginning of declaration", ! IDENTIFIER_POINTER (yyvsp[0].ttype)); ! yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; break;} case 187: ! #line 1103 "objc/objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) ! warning ("`%s' is not at beginning of declaration", ! IDENTIFIER_POINTER (yyvsp[0].ttype)); ! yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; break;} case 188: ! #line 1109 "objc/objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) ! warning ("`%s' is not at beginning of declaration", ! IDENTIFIER_POINTER (yyvsp[0].ttype)); ! yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; break;} case 189: ! #line 1115 "objc/objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) ! warning ("`%s' is not at beginning of declaration", ! IDENTIFIER_POINTER (yyvsp[0].ttype)); ! yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; break;} case 190: ! #line 1124 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; break;} case 191: ! #line 1127 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 192: ! #line 1130 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 193: ! #line 1133 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 194: ! #line 1136 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 195: ! #line 1142 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 196: ! #line 1145 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 197: ! #line 1148 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 198: ! #line 1151 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 199: ! #line 1154 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 200: ! #line 1157 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 201: ! #line 1160 "objc/objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) ! warning ("`%s' is not at beginning of declaration", ! IDENTIFIER_POINTER (yyvsp[0].ttype)); ! yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; break;} case 202: ! #line 1166 "objc/objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) ! warning ("`%s' is not at beginning of declaration", ! IDENTIFIER_POINTER (yyvsp[0].ttype)); ! yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; break;} case 203: ! #line 1172 "objc/objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) ! warning ("`%s' is not at beginning of declaration", ! IDENTIFIER_POINTER (yyvsp[0].ttype)); ! yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; break;} case 204: ! #line 1178 "objc/objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) ! warning ("`%s' is not at beginning of declaration", ! IDENTIFIER_POINTER (yyvsp[0].ttype)); ! yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; break;} case 205: ! #line 1187 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; break;} case 206: ! #line 1190 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 207: ! #line 1193 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 208: ! #line 1196 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 209: ! #line 1199 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} ! case 266: ! #line 1287 "objc/objc-parse.y" ! { yyval.ttype = NULL_TREE; ; break;} ! case 267: ! #line 1289 "objc/objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 271: ! #line 1324 "objc/objc-parse.y" ! { OBJC_NEED_RAW_IDENTIFIER (1); ; break;} ! case 274: ! #line 1334 "objc/objc-parse.y" ! { /* For a typedef name, record the meaning, not the name. ! In case of `foo foo, bar;'. */ ! yyval.ttype = lookup_name (yyvsp[0].ttype); ; break;} ! case 275: ! #line 1338 "objc/objc-parse.y" ! { yyval.ttype = get_static_reference (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 276: ! #line 1340 "objc/objc-parse.y" ! { yyval.ttype = get_object_reference (yyvsp[0].ttype); ; break;} ! case 277: ! #line 1345 "objc/objc-parse.y" ! { yyval.ttype = get_object_reference (yyvsp[0].ttype); ; break;} case 278: ! #line 1347 "objc/objc-parse.y" ! { skip_evaluation--; ! if (TREE_CODE (yyvsp[-1].ttype) == COMPONENT_REF ! && DECL_C_BIT_FIELD (TREE_OPERAND (yyvsp[-1].ttype, 1))) ! error ("`typeof' applied to a bit-field"); ! yyval.ttype = TREE_TYPE (yyvsp[-1].ttype); ; break;} ! case 279: ! #line 1353 "objc/objc-parse.y" ! { skip_evaluation--; yyval.ttype = groktypename (yyvsp[-1].ttype); ; break;} case 284: ! #line 1370 "objc/objc-parse.y" ! { yyval.ttype = NULL_TREE; ; break;} case 285: ! #line 1372 "objc/objc-parse.y" ! { yyval.ttype = yyvsp[-1].ttype; ; break;} case 286: ! #line 1377 "objc/objc-parse.y" ! { yyval.ttype = start_decl (yyvsp[-3].ttype, current_declspecs, 1, chainon (yyvsp[-1].ttype, all_prefix_attributes)); start_init (yyval.ttype, yyvsp[-2].ttype, global_bindings_p ()); ; break;} ! case 287: ! #line 1382 "objc/objc-parse.y" { finish_init (); ! finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype); ; break;} ! case 288: ! #line 1385 "objc/objc-parse.y" ! { tree d = start_decl (yyvsp[-2].ttype, current_declspecs, 0, chainon (yyvsp[0].ttype, all_prefix_attributes)); ! finish_decl (d, NULL_TREE, yyvsp[-1].ttype); ; break;} ! case 289: ! #line 1393 "objc/objc-parse.y" ! { yyval.ttype = start_decl (yyvsp[-3].ttype, current_declspecs, 1, chainon (yyvsp[-1].ttype, all_prefix_attributes)); start_init (yyval.ttype, yyvsp[-2].ttype, global_bindings_p ()); ; break;} ! case 290: ! #line 1398 "objc/objc-parse.y" { finish_init (); ! finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype); ; break;} ! case 291: ! #line 1401 "objc/objc-parse.y" ! { tree d = start_decl (yyvsp[-2].ttype, current_declspecs, 0, chainon (yyvsp[0].ttype, all_prefix_attributes)); ! finish_decl (d, NULL_TREE, yyvsp[-1].ttype); ; break;} ! case 292: ! #line 1409 "objc/objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 293: ! #line 1411 "objc/objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 294: ! #line 1416 "objc/objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 295: ! #line 1418 "objc/objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 296: ! #line 1423 "objc/objc-parse.y" ! { yyval.ttype = yyvsp[-2].ttype; ; break;} ! case 297: ! #line 1428 "objc/objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 298: ! #line 1430 "objc/objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 299: ! #line 1435 "objc/objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 300: ! #line 1437 "objc/objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[0].ttype, NULL_TREE); ; break;} ! case 301: ! #line 1439 "objc/objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, build_tree_list (NULL_TREE, yyvsp[-1].ttype)); ; break;} ! case 302: ! #line 1441 "objc/objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-5].ttype, tree_cons (NULL_TREE, yyvsp[-3].ttype, yyvsp[-1].ttype)); ; break;} ! case 303: ! #line 1443 "objc/objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} ! case 311: ! #line 1466 "objc/objc-parse.y" { really_start_incremental_init (NULL_TREE); ; break;} ! case 312: ! #line 1468 "objc/objc-parse.y" ! { yyval.ttype = pop_init_level (0); ; break;} ! case 313: ! #line 1470 "objc/objc-parse.y" ! { yyval.ttype = error_mark_node; ; break;} ! case 314: ! #line 1476 "objc/objc-parse.y" { if (pedantic) pedwarn ("ISO C forbids empty initializer braces"); ; break;} ! case 318: ! #line 1490 "objc/objc-parse.y" ! { if (pedantic && ! flag_isoc99) pedwarn ("ISO C90 forbids specifying subobject to initialize"); ; break;} ! case 319: ! #line 1493 "objc/objc-parse.y" { if (pedantic) ! pedwarn ("obsolete use of designated initializer without `='"); ; break;} ! case 320: ! #line 1496 "objc/objc-parse.y" { set_init_label (yyvsp[-1].ttype); if (pedantic) ! pedwarn ("obsolete use of designated initializer with `:'"); ; break;} ! case 321: ! #line 1500 "objc/objc-parse.y" {; break;} ! case 323: ! #line 1506 "objc/objc-parse.y" { push_init_level (0); ; break;} ! case 324: ! #line 1508 "objc/objc-parse.y" { process_init_element (pop_init_level (0)); ; break;} ! case 325: ! #line 1510 "objc/objc-parse.y" ! { process_init_element (yyvsp[0].ttype); ; break;} ! case 329: ! #line 1521 "objc/objc-parse.y" { set_init_label (yyvsp[0].ttype); ; break;} ! case 330: ! #line 1523 "objc/objc-parse.y" ! { set_init_index (yyvsp[-3].ttype, yyvsp[-1].ttype); if (pedantic) pedwarn ("ISO C forbids specifying range of elements to initialize"); ; break;} ! case 331: ! #line 1527 "objc/objc-parse.y" ! { set_init_index (yyvsp[-1].ttype, NULL_TREE); ; break;} ! case 332: ! #line 1532 "objc/objc-parse.y" { if (pedantic) pedwarn ("ISO C forbids nested functions"); push_function_context (); ! if (! start_function (current_declspecs, yyvsp[0].ttype, ! all_prefix_attributes)) { pop_function_context (); YYERROR1; } - parsing_iso_function_signature = false; /* Don't warn about nested functions. */ ; break;} ! case 333: ! #line 1545 "objc/objc-parse.y" { tree decl = current_function_decl; DECL_SOURCE_LOCATION (decl) = yyvsp[0].location; store_parm_decls (); ; break;} ! case 334: ! #line 1555 "objc/objc-parse.y" { tree decl = current_function_decl; finish_function (); pop_function_context (); ! add_decl_stmt (decl); ; break;} ! case 335: ! #line 1563 "objc/objc-parse.y" { if (pedantic) pedwarn ("ISO C forbids nested functions"); push_function_context (); ! if (! start_function (current_declspecs, yyvsp[0].ttype, ! all_prefix_attributes)) { pop_function_context (); YYERROR1; } - parsing_iso_function_signature = false; /* Don't warn about nested functions. */ ; break;} ! case 336: ! #line 1576 "objc/objc-parse.y" { tree decl = current_function_decl; DECL_SOURCE_LOCATION (decl) = yyvsp[0].location; store_parm_decls (); ; break;} ! case 337: ! #line 1586 "objc/objc-parse.y" { tree decl = current_function_decl; finish_function (); pop_function_context (); ! add_decl_stmt (decl); ; ! break;} ! case 340: ! #line 1604 "objc/objc-parse.y" ! { yyval.ttype = yyvsp[-2].ttype ? tree_cons (yyvsp[-2].ttype, yyvsp[-1].ttype, NULL_TREE) : yyvsp[-1].ttype; ; ! break;} ! case 341: ! #line 1606 "objc/objc-parse.y" ! { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; ! break;} ! case 342: ! #line 1611 "objc/objc-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, yyvsp[-1].ttype, 0); ; break;} ! case 343: ! #line 1613 "objc/objc-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 348: ! #line 1629 "objc/objc-parse.y" ! { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 349: ! #line 1634 "objc/objc-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, yyvsp[-1].ttype, 0); ; break;} ! case 352: ! #line 1641 "objc/objc-parse.y" ! { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} ! case 353: ! #line 1646 "objc/objc-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, yyvsp[-1].ttype, 0); ; break;} case 354: ! #line 1648 "objc/objc-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 355: ! #line 1650 "objc/objc-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 356: ! #line 1652 "objc/objc-parse.y" ! { yyval.ttype = yyvsp[-2].ttype ? tree_cons (yyvsp[-2].ttype, yyvsp[-1].ttype, NULL_TREE) : yyvsp[-1].ttype; ; break;} case 357: ! #line 1660 "objc/objc-parse.y" ! { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 358: ! #line 1665 "objc/objc-parse.y" ! { yyval.ttype = yyvsp[-2].ttype ? tree_cons (yyvsp[-2].ttype, yyvsp[-1].ttype, NULL_TREE) : yyvsp[-1].ttype; ; break;} case 359: ! #line 1667 "objc/objc-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 360: ! #line 1669 "objc/objc-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, yyvsp[-1].ttype, 0); ; break;} case 362: ! #line 1675 "objc/objc-parse.y" ! { yyval.ttype = NULL_TREE; ; break;} case 363: ! #line 1677 "objc/objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; break;} case 364: ! #line 1682 "objc/objc-parse.y" ! { yyval.ttype = NULL_TREE; ; break;} case 365: ! #line 1684 "objc/objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; break;} case 366: ! #line 1689 "objc/objc-parse.y" ! { yyval.ttype = NULL_TREE; ; break;} case 367: ! #line 1691 "objc/objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; break;} case 368: ! #line 1702 "objc/objc-parse.y" ! { yyval.ttype = start_struct (RECORD_TYPE, yyvsp[-1].ttype); ! /* Start scope of tag before parsing components. */ ! ; break;} case 369: ! #line 1706 "objc/objc-parse.y" ! { yyval.ttype = finish_struct (yyvsp[-3].ttype, nreverse (yyvsp[-2].ttype), ! chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ; break;} case 370: ! #line 1709 "objc/objc-parse.y" ! { yyval.ttype = finish_struct (start_struct (RECORD_TYPE, NULL_TREE), ! nreverse (yyvsp[-2].ttype), chainon (yyvsp[-4].ttype, yyvsp[0].ttype)); ! ; break;} case 371: ! #line 1713 "objc/objc-parse.y" ! { yyval.ttype = start_struct (UNION_TYPE, yyvsp[-1].ttype); ; break;} case 372: ! #line 1715 "objc/objc-parse.y" ! { yyval.ttype = finish_struct (yyvsp[-3].ttype, nreverse (yyvsp[-2].ttype), ! chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ; break;} case 373: ! #line 1718 "objc/objc-parse.y" ! { yyval.ttype = finish_struct (start_struct (UNION_TYPE, NULL_TREE), ! nreverse (yyvsp[-2].ttype), chainon (yyvsp[-4].ttype, yyvsp[0].ttype)); ; break;} case 374: ! #line 1722 "objc/objc-parse.y" ! { yyval.ttype = start_enum (yyvsp[-1].ttype); ; break;} case 375: ! #line 1724 "objc/objc-parse.y" ! { yyval.ttype = finish_enum (yyvsp[-4].ttype, nreverse (yyvsp[-3].ttype), ! chainon (yyvsp[-7].ttype, yyvsp[0].ttype)); ; break;} case 376: ! #line 1727 "objc/objc-parse.y" ! { yyval.ttype = start_enum (NULL_TREE); ; break;} case 377: ! #line 1729 "objc/objc-parse.y" ! { yyval.ttype = finish_enum (yyvsp[-4].ttype, nreverse (yyvsp[-3].ttype), ! chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ; break;} case 378: ! #line 1735 "objc/objc-parse.y" ! { yyval.ttype = xref_tag (RECORD_TYPE, yyvsp[0].ttype); ; break;} case 379: ! #line 1737 "objc/objc-parse.y" ! { yyval.ttype = xref_tag (UNION_TYPE, yyvsp[0].ttype); ; break;} case 380: ! #line 1739 "objc/objc-parse.y" ! { yyval.ttype = xref_tag (ENUMERAL_TYPE, yyvsp[0].ttype); /* In ISO C, enumerated types can be referred to only if already defined. */ ! if (pedantic && !COMPLETE_TYPE_P (yyval.ttype)) ! pedwarn ("ISO C forbids forward references to `enum' types"); ; break;} ! case 384: ! #line 1754 "objc/objc-parse.y" ! { if (pedantic && ! flag_isoc99) pedwarn ("comma at end of enumerator list"); ; break;} ! case 385: ! #line 1772 "objc/objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 386: ! #line 1774 "objc/objc-parse.y" { yyval.ttype = chainon (yyvsp[0].ttype, yyvsp[-1].ttype); pedwarn ("no semicolon at end of struct or union"); ; break;} ! case 387: ! #line 1779 "objc/objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 388: ! #line 1781 "objc/objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[-2].ttype); ; break;} ! case 389: ! #line 1783 "objc/objc-parse.y" { if (pedantic) pedwarn ("extra semicolon in struct or union specified"); ; break;} ! case 390: ! #line 1787 "objc/objc-parse.y" ! { yyval.ttype = nreverse (get_class_ivars_from_name (yyvsp[-1].ttype)); ; break;} ! case 391: ! #line 1792 "objc/objc-parse.y" { yyval.ttype = yyvsp[0].ttype; POP_DECLSPEC_STACK; ; break;} ! case 392: ! #line 1795 "objc/objc-parse.y" { /* Support for unnamed structs or unions as members of structs or unions (which is [a] useful and [b] supports MS P-SDK). */ ! if (pedantic) ! pedwarn ("ISO C doesn't support unnamed structs/unions"); ! ! yyval.ttype = grokfield(NULL, current_declspecs, NULL_TREE); POP_DECLSPEC_STACK; ; break;} ! case 393: ! #line 1805 "objc/objc-parse.y" { yyval.ttype = yyvsp[0].ttype; POP_DECLSPEC_STACK; ; break;} ! case 394: ! #line 1808 "objc/objc-parse.y" { if (pedantic) pedwarn ("ISO C forbids member declarations with no members"); ! shadow_tag_warned (yyvsp[0].ttype, pedantic); yyval.ttype = NULL_TREE; ; break;} ! case 395: ! #line 1813 "objc/objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 396: ! #line 1815 "objc/objc-parse.y" { yyval.ttype = yyvsp[0].ttype; RESTORE_EXT_FLAGS (yyvsp[-1].itype); ; break;} ! case 398: ! #line 1822 "objc/objc-parse.y" { TREE_CHAIN (yyvsp[0].ttype) = yyvsp[-3].ttype; yyval.ttype = yyvsp[0].ttype; ; break;} ! case 400: ! #line 1828 "objc/objc-parse.y" { TREE_CHAIN (yyvsp[0].ttype) = yyvsp[-3].ttype; yyval.ttype = yyvsp[0].ttype; ; break;} ! case 401: ! #line 1833 "objc/objc-parse.y" ! { yyval.ttype = grokfield (yyvsp[-1].ttype, current_declspecs, NULL_TREE); decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ; break;} ! case 402: ! #line 1837 "objc/objc-parse.y" ! { yyval.ttype = grokfield (yyvsp[-3].ttype, current_declspecs, yyvsp[-1].ttype); decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ; break;} ! case 403: ! #line 1841 "objc/objc-parse.y" ! { yyval.ttype = grokfield (NULL_TREE, current_declspecs, yyvsp[-1].ttype); decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ; break;} ! case 404: ! #line 1848 "objc/objc-parse.y" ! { yyval.ttype = grokfield (yyvsp[-1].ttype, current_declspecs, NULL_TREE); decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ; break;} ! case 405: ! #line 1852 "objc/objc-parse.y" ! { yyval.ttype = grokfield (yyvsp[-3].ttype, current_declspecs, yyvsp[-1].ttype); decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ; break;} ! case 406: ! #line 1856 "objc/objc-parse.y" ! { yyval.ttype = grokfield (NULL_TREE, current_declspecs, yyvsp[-1].ttype); decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ; break;} ! case 408: ! #line 1867 "objc/objc-parse.y" { if (yyvsp[-2].ttype == error_mark_node) yyval.ttype = yyvsp[-2].ttype; else TREE_CHAIN (yyvsp[0].ttype) = yyvsp[-2].ttype, yyval.ttype = yyvsp[0].ttype; ; break;} ! case 409: ! #line 1872 "objc/objc-parse.y" { yyval.ttype = error_mark_node; ; break;} ! case 410: ! #line 1878 "objc/objc-parse.y" { yyval.ttype = build_enumerator (yyvsp[0].ttype, NULL_TREE); ; break;} - case 411: - #line 1880 "objc/objc-parse.y" - { yyval.ttype = build_enumerator (yyvsp[-2].ttype, yyvsp[0].ttype); ; - break;} - case 412: - #line 1885 "objc/objc-parse.y" - { pending_xref_error (); - yyval.ttype = yyvsp[0].ttype; ; - break;} - case 413: - #line 1888 "objc/objc-parse.y" - { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ; - break;} - case 414: - #line 1893 "objc/objc-parse.y" - { yyval.ttype = NULL_TREE; ; - break;} case 416: ! #line 1899 "objc/objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, ! NULL_TREE), ! all_prefix_attributes); ; break;} case 417: ! #line 1903 "objc/objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, ! yyvsp[0].ttype), ! all_prefix_attributes); ; break;} case 418: ! #line 1907 "objc/objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, ! yyvsp[-1].ttype), ! chainon (yyvsp[0].ttype, all_prefix_attributes)); ; ! break;} ! case 422: ! #line 1920 "objc/objc-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 423: ! #line 1925 "objc/objc-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); ; break;} ! case 424: ! #line 1927 "objc/objc-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 425: ! #line 1932 "objc/objc-parse.y" ! { yyval.ttype = yyvsp[-2].ttype ? tree_cons (yyvsp[-2].ttype, yyvsp[-1].ttype, NULL_TREE) : yyvsp[-1].ttype; ; break;} ! case 426: ! #line 1934 "objc/objc-parse.y" ! { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 427: ! #line 1936 "objc/objc-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, yyvsp[-1].ttype, 1); ; break;} case 428: ! #line 1938 "objc/objc-parse.y" ! { yyval.ttype = build_nt (CALL_EXPR, NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} case 429: ! #line 1940 "objc/objc-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, NULL_TREE, 1); ; break;} case 430: ! #line 1947 "objc/objc-parse.y" ! { yyval.ttype = build_array_declarator (yyvsp[-1].ttype, yyvsp[-2].ttype, 0, 0); ; break;} case 431: ! #line 1949 "objc/objc-parse.y" ! { yyval.ttype = build_array_declarator (NULL_TREE, yyvsp[-1].ttype, 0, 0); ; break;} case 432: ! #line 1951 "objc/objc-parse.y" ! { yyval.ttype = build_array_declarator (NULL_TREE, yyvsp[-2].ttype, 0, 1); ; break;} case 433: ! #line 1953 "objc/objc-parse.y" ! { yyval.ttype = build_array_declarator (yyvsp[-1].ttype, yyvsp[-2].ttype, 1, 0); ; break;} case 434: ! #line 1956 "objc/objc-parse.y" ! { yyval.ttype = build_array_declarator (yyvsp[-1].ttype, yyvsp[-3].ttype, 1, 0); ; break;} case 437: ! #line 1969 "objc/objc-parse.y" { error ("label at end of compound statement"); ; break;} ! case 445: ! #line 1986 "objc/objc-parse.y" { if ((pedantic && !flag_isoc99) || warn_declaration_after_statement) pedwarn_c90 ("ISO C90 forbids mixed declarations and code"); ; break;} - case 460: - #line 2019 "objc/objc-parse.y" - { pushlevel (0); - clear_last_expr (); - add_scope_stmt (/*begin_p=*/1, /*partial_p=*/0); - ; - break;} - case 461: - #line 2026 "objc/objc-parse.y" - { - if (c_dialect_objc ()) - objc_clear_super_receiver (); - yyval.ttype = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0); - ; - break;} - case 462: - #line 2035 "objc/objc-parse.y" - { if (flag_isoc99) - { - yyval.ttype = c_begin_compound_stmt (); - pushlevel (0); - clear_last_expr (); - add_scope_stmt (/*begin_p=*/1, /*partial_p=*/0); - } - else - yyval.ttype = NULL_TREE; - ; - break;} - case 463: - #line 2051 "objc/objc-parse.y" - { if (flag_isoc99) - { - tree scope_stmt = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0); - yyval.ttype = poplevel (KEEP_MAYBE, 0, 0); - SCOPE_STMT_BLOCK (TREE_PURPOSE (scope_stmt)) - = SCOPE_STMT_BLOCK (TREE_VALUE (scope_stmt)) - = yyval.ttype; - } - else - yyval.ttype = NULL_TREE; ; - break;} case 465: ! #line 2068 "objc/objc-parse.y" { if (pedantic) pedwarn ("ISO C forbids label declarations"); ; break;} ! case 468: ! #line 2079 "objc/objc-parse.y" { tree link; for (link = yyvsp[-1].ttype; link; link = TREE_CHAIN (link)) { tree label = declare_label (TREE_VALUE (link)); C_DECLARED_LABEL_FLAG (label) = 1; ! add_decl_stmt (label); } ; break;} - case 469: - #line 2093 "objc/objc-parse.y" - {; - break;} case 471: ! #line 2097 "objc/objc-parse.y" ! { compstmt_count++; ! yyval.ttype = c_begin_compound_stmt (); ; ! break;} ! case 472: ! #line 2102 "objc/objc-parse.y" ! { yyval.ttype = convert (void_type_node, integer_zero_node); ; break;} case 473: ! #line 2104 "objc/objc-parse.y" ! { yyval.ttype = poplevel (KEEP_MAYBE, 0, 0); ! SCOPE_STMT_BLOCK (TREE_PURPOSE (yyvsp[0].ttype)) ! = SCOPE_STMT_BLOCK (TREE_VALUE (yyvsp[0].ttype)) ! = yyval.ttype; ; break;} ! case 476: ! #line 2117 "objc/objc-parse.y" ! { if (last_tree == NULL) { ! error ("braced-group within expression allowed only inside a function"); YYERROR; } ! /* We must force a BLOCK for this level ! so that, if it is not expanded later, ! there is a way to turn off the entire subtree of blocks ! that are contained in it. */ ! keep_next_level (); ! compstmt_count++; ! yyval.ttype = add_stmt (build_stmt (COMPOUND_STMT, last_tree)); ! last_expr_type = NULL_TREE; ; break;} ! case 477: ! #line 2134 "objc/objc-parse.y" ! { RECHAIN_STMTS (yyvsp[-1].ttype, COMPOUND_BODY (yyvsp[-1].ttype)); ! last_expr_type = NULL_TREE; ! yyval.ttype = yyvsp[-1].ttype; ; ! break;} ! case 478: ! #line 2142 "objc/objc-parse.y" ! { c_finish_then (); ; break;} case 480: ! #line 2159 "objc/objc-parse.y" ! { yyval.ttype = c_begin_if_stmt (); ; ! break;} ! case 481: ! #line 2161 "objc/objc-parse.y" ! { c_expand_start_cond (c_common_truthvalue_conversion (yyvsp[-1].ttype), ! compstmt_count,yyvsp[-3].ttype); ! yyval.itype = stmt_count; ! if_stmt_locus = yyvsp[-6].location; ; ! break;} ! case 482: ! #line 2172 "objc/objc-parse.y" ! { stmt_count++; ! compstmt_count++; ! c_in_iteration_stmt++; ! yyval.ttype ! = add_stmt (build_stmt (DO_STMT, NULL_TREE, ! NULL_TREE)); ! /* In the event that a parse error prevents ! parsing the complete do-statement, set the ! condition now. Otherwise, we can get crashes at ! RTL-generation time. */ ! DO_COND (yyval.ttype) = error_mark_node; ; break;} case 483: ! #line 2184 "objc/objc-parse.y" ! { yyval.ttype = yyvsp[-2].ttype; ! RECHAIN_STMTS (yyval.ttype, DO_BODY (yyval.ttype)); ! c_in_iteration_stmt--; ; break;} case 484: ! #line 2194 "objc/objc-parse.y" ! { if (yychar == YYEMPTY) ! yychar = YYLEX; ! yyval.location = input_location; ; break;} case 487: ! #line 2207 "objc/objc-parse.y" ! { if (flag_isoc99) ! RECHAIN_STMTS (yyvsp[-2].ttype, COMPOUND_BODY (yyvsp[-2].ttype)); ; break;} case 488: ! #line 2213 "objc/objc-parse.y" ! { if (yyvsp[0].ttype) ! { ! STMT_LINENO (yyvsp[0].ttype) = yyvsp[-1].location.line; ! /* ??? We currently have no way of recording ! the filename for a statement. This probably ! matters little in practice at the moment, ! but I suspect that problems will occur when ! doing inlining at the tree level. */ ! } ! ; ! break;} ! case 489: ! #line 2227 "objc/objc-parse.y" ! { if (yyvsp[0].ttype) ! { ! STMT_LINENO (yyvsp[0].ttype) = yyvsp[-1].location.line; ! } ! ; break;} case 490: ! #line 2236 "objc/objc-parse.y" ! { c_expand_start_else (); ! yyvsp[-1].itype = stmt_count; ; break;} case 491: ! #line 2239 "objc/objc-parse.y" ! { c_finish_else (); ! c_expand_end_cond (); ! if (extra_warnings && stmt_count == yyvsp[-3].itype) ! warning ("empty body in an else-statement"); ; break;} case 492: ! #line 2244 "objc/objc-parse.y" ! { c_expand_end_cond (); ! /* This warning is here instead of in simple_if, because we ! do not want a warning if an empty if is followed by an ! else statement. Increment stmt_count so we don't ! give a second error if this is a nested `if'. */ ! if (extra_warnings && stmt_count++ == yyvsp[0].itype) ! warning ("%Hempty body in an if-statement", ! &if_stmt_locus); ; break;} case 493: ! #line 2256 "objc/objc-parse.y" ! { c_expand_end_cond (); ; break;} case 494: ! #line 2266 "objc/objc-parse.y" ! { stmt_count++; ! yyval.ttype = c_begin_while_stmt (); ; break;} case 495: ! #line 2269 "objc/objc-parse.y" ! { c_in_iteration_stmt++; ! yyvsp[-1].ttype = c_common_truthvalue_conversion (yyvsp[-1].ttype); ! c_finish_while_stmt_cond ! (c_common_truthvalue_conversion (yyvsp[-1].ttype), yyvsp[-3].ttype); ! yyval.ttype = add_stmt (yyvsp[-3].ttype); ; break;} case 496: ! #line 2275 "objc/objc-parse.y" ! { c_in_iteration_stmt--; ! RECHAIN_STMTS (yyvsp[-1].ttype, WHILE_BODY (yyvsp[-1].ttype)); ; break;} case 497: ! #line 2279 "objc/objc-parse.y" ! { DO_COND (yyvsp[-4].ttype) = c_common_truthvalue_conversion (yyvsp[-2].ttype); ; break;} case 498: ! #line 2281 "objc/objc-parse.y" ! { ; break;} case 499: ! #line 2283 "objc/objc-parse.y" ! { yyval.ttype = build_stmt (FOR_STMT, NULL_TREE, NULL_TREE, ! NULL_TREE, NULL_TREE); ! add_stmt (yyval.ttype); ; break;} case 500: ! #line 2287 "objc/objc-parse.y" ! { stmt_count++; ! RECHAIN_STMTS (yyvsp[-2].ttype, FOR_INIT_STMT (yyvsp[-2].ttype)); ; break;} case 501: ! #line 2290 "objc/objc-parse.y" ! { if (yyvsp[-1].ttype) ! FOR_COND (yyvsp[-5].ttype) ! = c_common_truthvalue_conversion (yyvsp[-1].ttype); ; break;} case 502: ! #line 2294 "objc/objc-parse.y" ! { c_in_iteration_stmt++; ! FOR_EXPR (yyvsp[-8].ttype) = yyvsp[-1].ttype; ; break;} case 503: ! #line 2297 "objc/objc-parse.y" ! { RECHAIN_STMTS (yyvsp[-10].ttype, FOR_BODY (yyvsp[-10].ttype)); ! c_in_iteration_stmt--;; break;} case 504: ! #line 2300 "objc/objc-parse.y" ! { stmt_count++; ! yyval.ttype = c_start_case (yyvsp[-1].ttype); ! c_in_case_stmt++; ; break;} case 505: ! #line 2304 "objc/objc-parse.y" ! { c_finish_case (); ! c_in_case_stmt--; ; break;} case 506: ! #line 2310 "objc/objc-parse.y" ! { add_stmt (build_stmt (EXPR_STMT, yyvsp[-1].ttype)); ; break;} case 507: ! #line 2312 "objc/objc-parse.y" ! { check_for_loop_decls (); ; break;} case 508: ! #line 2318 "objc/objc-parse.y" ! { stmt_count++; yyval.ttype = yyvsp[0].ttype; ; break;} case 509: ! #line 2320 "objc/objc-parse.y" ! { stmt_count++; ! yyval.ttype = c_expand_expr_stmt (yyvsp[-1].ttype); ; break;} case 510: ! #line 2323 "objc/objc-parse.y" ! { if (flag_isoc99) ! RECHAIN_STMTS (yyvsp[-2].ttype, COMPOUND_BODY (yyvsp[-2].ttype)); ! yyval.ttype = NULL_TREE; ; break;} case 511: ! #line 2327 "objc/objc-parse.y" ! { stmt_count++; ! if (!(c_in_iteration_stmt || c_in_case_stmt)) ! { ! error ("break statement not within loop or switch"); ! yyval.ttype = NULL_TREE; ! } ! else ! yyval.ttype = add_stmt (build_break_stmt ()); ; break;} case 512: ! #line 2336 "objc/objc-parse.y" ! { stmt_count++; ! if (!c_in_iteration_stmt) ! { ! error ("continue statement not within a loop"); ! yyval.ttype = NULL_TREE; ! } ! else ! yyval.ttype = add_stmt (build_continue_stmt ()); ; break;} case 513: ! #line 2345 "objc/objc-parse.y" ! { stmt_count++; ! yyval.ttype = c_expand_return (NULL_TREE); ; break;} case 514: ! #line 2348 "objc/objc-parse.y" ! { stmt_count++; ! yyval.ttype = c_expand_return (yyvsp[-1].ttype); ; break;} case 515: ! #line 2351 "objc/objc-parse.y" ! { stmt_count++; ! yyval.ttype = simple_asm_stmt (yyvsp[-2].ttype); ; break;} case 516: ! #line 2355 "objc/objc-parse.y" ! { stmt_count++; ! yyval.ttype = build_asm_stmt (yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE, NULL_TREE); ; break;} case 517: ! #line 2360 "objc/objc-parse.y" ! { stmt_count++; ! yyval.ttype = build_asm_stmt (yyvsp[-8].ttype, yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE); ; break;} case 518: ! #line 2365 "objc/objc-parse.y" ! { stmt_count++; ! yyval.ttype = build_asm_stmt (yyvsp[-10].ttype, yyvsp[-8].ttype, yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype); ; ! break;} ! case 519: ! #line 2368 "objc/objc-parse.y" ! { tree decl; ! stmt_count++; ! decl = lookup_label (yyvsp[-1].ttype); ! if (decl != 0) ! { ! TREE_USED (decl) = 1; ! yyval.ttype = add_stmt (build_stmt (GOTO_STMT, decl)); ! } ! else ! yyval.ttype = NULL_TREE; ! ; break;} case 520: ! #line 2380 "objc/objc-parse.y" ! { if (pedantic) ! pedwarn ("ISO C forbids `goto *expr;'"); ! stmt_count++; ! yyvsp[-1].ttype = convert (ptr_type_node, yyvsp[-1].ttype); ! yyval.ttype = add_stmt (build_stmt (GOTO_STMT, yyvsp[-1].ttype)); ; break;} case 521: ! #line 2386 "objc/objc-parse.y" ! { yyval.ttype = NULL_TREE; ; break;} case 522: ! #line 2388 "objc/objc-parse.y" ! { stmt_count++; ! yyval.ttype = objc_build_throw_stmt (yyvsp[-1].ttype); ! ; break;} case 523: ! #line 2392 "objc/objc-parse.y" ! { stmt_count++; ! yyval.ttype = objc_build_throw_stmt (NULL_TREE); ! ; break;} case 524: ! #line 2396 "objc/objc-parse.y" ! { objc_build_finally_prologue (); ; break;} case 525: ! #line 2398 "objc/objc-parse.y" ! { yyval.ttype = objc_build_try_catch_finally_stmt (yyvsp[-2].itype, yyvsp[0].itype); ; break;} case 526: ! #line 2400 "objc/objc-parse.y" ! { objc_build_synchronized_prologue (yyvsp[-1].ttype); ; break;} case 527: ! #line 2402 "objc/objc-parse.y" ! { yyval.ttype = objc_build_synchronized_epilogue (); ; break;} case 528: ! #line 2407 "objc/objc-parse.y" ! { objc_build_try_epilogue (1); ; break;} case 529: ! #line 2409 "objc/objc-parse.y" ! { objc_build_catch_epilogue (); yyval.itype = 1; ; break;} ! case 530: ! #line 2411 "objc/objc-parse.y" ! { objc_build_try_epilogue (0); yyval.itype = 0; ; break;} ! case 531: ! #line 2417 "objc/objc-parse.y" ! { objc_build_try_prologue (); ; break;} case 535: ! #line 2428 "objc/objc-parse.y" ! { objc_build_catch_stmt (yyvsp[-1].ttype); ; break;} case 536: ! #line 2430 "objc/objc-parse.y" ! { stmt_count++; ; break;} case 537: ! #line 2435 "objc/objc-parse.y" ! { yyval.itype = 1; ; ! break;} ! case 538: ! #line 2437 "objc/objc-parse.y" ! { yyval.itype = 0; ; break;} case 539: ! #line 2445 "objc/objc-parse.y" ! { stmt_count++; ! yyval.ttype = do_case (yyvsp[-1].ttype, NULL_TREE); ; break;} case 540: ! #line 2448 "objc/objc-parse.y" ! { stmt_count++; ! yyval.ttype = do_case (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 541: ! #line 2451 "objc/objc-parse.y" ! { stmt_count++; ! yyval.ttype = do_case (NULL_TREE, NULL_TREE); ; break;} case 542: ! #line 2454 "objc/objc-parse.y" { tree label = define_label (yyvsp[-2].location, yyvsp[-3].ttype); - stmt_count++; if (label) { decl_attributes (&label, yyvsp[0].ttype, 0); ! yyval.ttype = add_stmt (build_stmt (LABEL_STMT, label)); } else yyval.ttype = NULL_TREE; ; break;} case 543: ! #line 2470 "objc/objc-parse.y" ! { yyval.ttype = NULL_TREE; ; break;} case 544: ! #line 2472 "objc/objc-parse.y" ! { ; ! break;} ! case 545: ! #line 2477 "objc/objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 547: ! #line 2484 "objc/objc-parse.y" ! { yyval.ttype = NULL_TREE; ; break;} case 550: ! #line 2491 "objc/objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 551: ! #line 2496 "objc/objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (NULL_TREE, yyvsp[-3].ttype), yyvsp[-1].ttype); ; break;} case 552: ! #line 2498 "objc/objc-parse.y" ! { yyvsp[-5].ttype = build_string (IDENTIFIER_LENGTH (yyvsp[-5].ttype), ! IDENTIFIER_POINTER (yyvsp[-5].ttype)); ! yyval.ttype = build_tree_list (build_tree_list (yyvsp[-5].ttype, yyvsp[-3].ttype), yyvsp[-1].ttype); ; break;} case 553: ! #line 2505 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} case 554: ! #line 2507 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-2].ttype); ; break;} case 555: ! #line 2517 "objc/objc-parse.y" ! { pushlevel (0); ! declare_parm_level (); ; ! break;} ! case 556: ! #line 2520 "objc/objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! poplevel (0, 0, 0); ; break;} case 558: ! #line 2527 "objc/objc-parse.y" ! { mark_forward_parm_decls (); ; break;} case 559: ! #line 2529 "objc/objc-parse.y" ! { /* Dummy action so attributes are in known place ! on parser stack. */ ; break;} case 560: ! #line 2532 "objc/objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; break;} case 561: ! #line 2534 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, NULL_TREE); ; break;} case 562: ! #line 2540 "objc/objc-parse.y" ! { yyval.ttype = get_parm_info (0); ; break;} case 563: ! #line 2542 "objc/objc-parse.y" ! { yyval.ttype = get_parm_info (0); ! /* Gcc used to allow this as an extension. However, it does ! not work for all targets, and thus has been disabled. ! Also, since func (...) and func () are indistinguishable, ! it caused problems with the code in expand_builtin which ! tries to verify that BUILT_IN_NEXT_ARG is being used ! correctly. */ ! error ("ISO C requires a named argument before `...'"); ! parsing_iso_function_signature = true; ! ; break;} case 564: ! #line 2553 "objc/objc-parse.y" ! { yyval.ttype = get_parm_info (1); ! parsing_iso_function_signature = true; ! ; break;} case 565: ! #line 2557 "objc/objc-parse.y" ! { yyval.ttype = get_parm_info (0); ! parsing_iso_function_signature = true; ! ; break;} case 566: ! #line 2564 "objc/objc-parse.y" ! { push_parm_decl (yyvsp[0].ttype); ; break;} case 567: ! #line 2566 "objc/objc-parse.y" ! { push_parm_decl (yyvsp[0].ttype); ; break;} ! case 568: ! #line 2573 "objc/objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, ! yyvsp[-1].ttype), ! chainon (yyvsp[0].ttype, all_prefix_attributes)); POP_DECLSPEC_STACK; ; break;} ! case 569: ! #line 2578 "objc/objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, ! yyvsp[-1].ttype), ! chainon (yyvsp[0].ttype, all_prefix_attributes)); POP_DECLSPEC_STACK; ; break;} ! case 570: ! #line 2583 "objc/objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; POP_DECLSPEC_STACK; ; break;} ! case 571: ! #line 2586 "objc/objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, ! yyvsp[-1].ttype), ! chainon (yyvsp[0].ttype, all_prefix_attributes)); POP_DECLSPEC_STACK; ; break;} ! case 572: ! #line 2592 "objc/objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; POP_DECLSPEC_STACK; ; break;} ! case 573: ! #line 2600 "objc/objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, ! yyvsp[-1].ttype), ! chainon (yyvsp[0].ttype, all_prefix_attributes)); POP_DECLSPEC_STACK; ; break;} ! case 574: ! #line 2605 "objc/objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, ! yyvsp[-1].ttype), ! chainon (yyvsp[0].ttype, all_prefix_attributes)); POP_DECLSPEC_STACK; ; break;} ! case 575: ! #line 2610 "objc/objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; POP_DECLSPEC_STACK; ; break;} ! case 576: ! #line 2613 "objc/objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, ! yyvsp[-1].ttype), ! chainon (yyvsp[0].ttype, all_prefix_attributes)); POP_DECLSPEC_STACK; ; break;} ! case 577: ! #line 2619 "objc/objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; POP_DECLSPEC_STACK; ; break;} ! case 578: ! #line 2625 "objc/objc-parse.y" { prefix_attributes = chainon (prefix_attributes, yyvsp[-3].ttype); all_prefix_attributes = prefix_attributes; ; break;} ! case 579: ! #line 2634 "objc/objc-parse.y" ! { pushlevel (0); declare_parm_level (); ; break;} ! case 580: ! #line 2637 "objc/objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! poplevel (0, 0, 0); ; break;} ! case 582: ! #line 2644 "objc/objc-parse.y" ! { tree t; ! for (t = yyvsp[-1].ttype; t; t = TREE_CHAIN (t)) ! if (TREE_VALUE (t) == NULL_TREE) ! error ("`...' in old-style identifier list"); ! yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, yyvsp[-1].ttype); /* Make sure we have a parmlist after attributes. */ ! if (yyvsp[-3].ttype != 0 ! && (TREE_CODE (yyval.ttype) != TREE_LIST ! || TREE_PURPOSE (yyval.ttype) == 0 ! || TREE_CODE (TREE_PURPOSE (yyval.ttype)) != PARM_DECL)) YYERROR1; ; break;} ! case 583: ! #line 2662 "objc/objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 584: ! #line 2664 "objc/objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} ! case 585: ! #line 2670 "objc/objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 586: ! #line 2672 "objc/objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} ! case 587: ! #line 2677 "objc/objc-parse.y" ! { yyval.itype = SAVE_EXT_FLAGS(); pedantic = 0; warn_pointer_arith = 0; warn_traditional = 0; flag_iso = 0; ; break;} ! case 593: ! #line 2693 "objc/objc-parse.y" { ! if (objc_implementation_context) ! { ! finish_class (objc_implementation_context); ! objc_ivar_chain = NULL_TREE; ! objc_implementation_context = NULL_TREE; ! } ! else ! warning ("`@end' must appear in an implementation context"); ; break;} ! case 594: ! #line 2708 "objc/objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 595: ! #line 2710 "objc/objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} ! case 596: ! #line 2715 "objc/objc-parse.y" { objc_declare_class (yyvsp[-1].ttype); ; break;} ! case 597: ! #line 2722 "objc/objc-parse.y" { objc_declare_alias (yyvsp[-2].ttype, yyvsp[-1].ttype); ; break;} ! case 598: ! #line 2728 "objc/objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 599: ! #line 2729 "objc/objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 602: ! #line 2739 "objc/objc-parse.y" { ! objc_interface_context = objc_ivar_context ! = start_class (CLASS_INTERFACE_TYPE, yyvsp[-2].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ! objc_public_flag = 0; ; break;} ! case 603: ! #line 2745 "objc/objc-parse.y" { ! continue_class (objc_interface_context); ; break;} ! case 604: ! #line 2749 "objc/objc-parse.y" { ! finish_class (objc_interface_context); ! objc_interface_context = NULL_TREE; ; break;} ! case 605: ! #line 2755 "objc/objc-parse.y" { ! objc_implementation_context = objc_ivar_context ! = start_class (CLASS_IMPLEMENTATION_TYPE, yyvsp[-1].ttype, yyvsp[0].ttype, NULL_TREE); ! objc_public_flag = 0; ; break;} ! case 606: ! #line 2761 "objc/objc-parse.y" { ! objc_ivar_chain ! = continue_class (objc_implementation_context); ; break;} ! case 607: ! #line 2767 "objc/objc-parse.y" { ! objc_interface_context ! = start_class (CATEGORY_INTERFACE_TYPE, yyvsp[-4].ttype, yyvsp[-2].ttype, yyvsp[0].ttype); ! continue_class (objc_interface_context); ; break;} ! case 608: ! #line 2773 "objc/objc-parse.y" { ! finish_class (objc_interface_context); ! objc_interface_context = NULL_TREE; ; break;} ! case 609: ! #line 2779 "objc/objc-parse.y" { ! objc_implementation_context ! = start_class (CATEGORY_IMPLEMENTATION_TYPE, yyvsp[-3].ttype, yyvsp[-1].ttype, NULL_TREE); ! objc_ivar_chain ! = continue_class (objc_implementation_context); ; break;} ! case 610: ! #line 2789 "objc/objc-parse.y" { objc_pq_context = 1; ! objc_interface_context ! = start_protocol(PROTOCOL_INTERFACE_TYPE, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 611: ! #line 2795 "objc/objc-parse.y" { objc_pq_context = 0; ! finish_protocol(objc_interface_context); ! objc_interface_context = NULL_TREE; ; break;} ! case 612: ! #line 2804 "objc/objc-parse.y" { objc_declare_protocols (yyvsp[-1].ttype); ; break;} ! case 613: ! #line 2811 "objc/objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 615: ! #line 2819 "objc/objc-parse.y" { if (yyvsp[-2].code == LT_EXPR && yyvsp[0].code == GT_EXPR) yyval.ttype = yyvsp[-1].ttype; --- 2913,5233 ---- switch (yyn) { case 1: ! #line 364 "objc/objc-parse.y" { if (pedantic) pedwarn ("ISO C forbids an empty source file"); ; break;} case 3: ! #line 375 "objc/objc-parse.y" ! { yyval.dsptype = NULL; ; ! break;} ! case 4: ! #line 376 "objc/objc-parse.y" ! { obstack_free (&parser_obstack, yyvsp[-2].otype); ; break;} case 5: ! #line 378 "objc/objc-parse.y" ! { yyval.dsptype = NULL; ggc_collect (); ; break;} ! case 6: ! #line 379 "objc/objc-parse.y" ! { obstack_free (&parser_obstack, yyvsp[-2].otype); ; break;} ! case 10: ! #line 387 "objc/objc-parse.y" ! { RESTORE_EXT_FLAGS (yyvsp[-1].itype); ; break;} case 12: ! #line 394 "objc/objc-parse.y" ! { yyval.otype = obstack_alloc (&parser_obstack, 0); ; break;} case 13: ! #line 399 "objc/objc-parse.y" ! { pedwarn ("data definition has no type or storage class"); POP_DECLSPEC_STACK; ; break;} case 14: ! #line 402 "objc/objc-parse.y" { POP_DECLSPEC_STACK; ; break;} case 15: ! #line 404 "objc/objc-parse.y" { POP_DECLSPEC_STACK; ; break;} case 16: ! #line 406 "objc/objc-parse.y" ! { shadow_tag (finish_declspecs (yyvsp[-1].dsptype)); ; break;} case 19: ! #line 410 "objc/objc-parse.y" { if (pedantic) ! pedwarn ("ISO C does not allow extra %<;%> outside of a function"); ; break;} case 20: ! #line 416 "objc/objc-parse.y" ! { if (!start_function (current_declspecs, yyvsp[0].dtrtype, ! all_prefix_attributes)) YYERROR1; ; break;} case 21: ! #line 421 "objc/objc-parse.y" { DECL_SOURCE_LOCATION (current_function_decl) = yyvsp[0].location; store_parm_decls (); ; break;} case 22: ! #line 424 "objc/objc-parse.y" { finish_function (); POP_DECLSPEC_STACK; ; break;} case 23: ! #line 427 "objc/objc-parse.y" { POP_DECLSPEC_STACK; ; break;} case 24: ! #line 429 "objc/objc-parse.y" ! { if (!start_function (current_declspecs, yyvsp[0].dtrtype, ! all_prefix_attributes)) YYERROR1; ; break;} case 25: ! #line 434 "objc/objc-parse.y" { DECL_SOURCE_LOCATION (current_function_decl) = yyvsp[0].location; store_parm_decls (); ; break;} case 26: ! #line 437 "objc/objc-parse.y" { finish_function (); POP_DECLSPEC_STACK; ; break;} case 27: ! #line 440 "objc/objc-parse.y" { POP_DECLSPEC_STACK; ; break;} case 28: ! #line 442 "objc/objc-parse.y" ! { if (!start_function (current_declspecs, yyvsp[0].dtrtype, ! all_prefix_attributes)) YYERROR1; ; break;} case 29: ! #line 447 "objc/objc-parse.y" { DECL_SOURCE_LOCATION (current_function_decl) = yyvsp[0].location; store_parm_decls (); ; break;} case 30: ! #line 450 "objc/objc-parse.y" { finish_function (); POP_DECLSPEC_STACK; ; break;} case 31: ! #line 453 "objc/objc-parse.y" { POP_DECLSPEC_STACK; ; break;} ! case 35: ! #line 463 "objc/objc-parse.y" { yyval.code = ADDR_EXPR; ; break;} ! case 36: ! #line 465 "objc/objc-parse.y" { yyval.code = NEGATE_EXPR; ; break;} ! case 37: ! #line 467 "objc/objc-parse.y" { yyval.code = CONVERT_EXPR; ; break;} ! case 38: ! #line 470 "objc/objc-parse.y" { yyval.code = PREINCREMENT_EXPR; ; break;} ! case 39: ! #line 472 "objc/objc-parse.y" { yyval.code = PREDECREMENT_EXPR; ; break;} ! case 40: ! #line 474 "objc/objc-parse.y" { yyval.code = BIT_NOT_EXPR; ; break;} ! case 41: ! #line 476 "objc/objc-parse.y" { yyval.code = TRUTH_NOT_EXPR; ; break;} case 43: ! #line 481 "objc/objc-parse.y" ! { yyval.exprtype.value = build_compound_expr (yyvsp[-2].exprtype.value, yyvsp[0].exprtype.value); ! yyval.exprtype.original_code = COMPOUND_EXPR; ; break;} case 44: ! #line 487 "objc/objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 46: ! #line 493 "objc/objc-parse.y" ! { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].exprtype.value); ; break;} case 47: ! #line 495 "objc/objc-parse.y" ! { chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].exprtype.value)); ; break;} case 49: ! #line 501 "objc/objc-parse.y" ! { yyval.exprtype.value = build_indirect_ref (yyvsp[0].exprtype.value, "unary *"); ! yyval.exprtype.original_code = ERROR_MARK; ; break;} case 50: ! #line 505 "objc/objc-parse.y" ! { yyval.exprtype = yyvsp[0].exprtype; RESTORE_EXT_FLAGS (yyvsp[-1].itype); ; break;} case 51: ! #line 508 "objc/objc-parse.y" ! { yyval.exprtype.value = build_unary_op (yyvsp[-1].code, yyvsp[0].exprtype.value, 0); ! overflow_warning (yyval.exprtype.value); ! yyval.exprtype.original_code = ERROR_MARK; ; break;} case 52: ! #line 513 "objc/objc-parse.y" ! { yyval.exprtype.value = finish_label_address_expr (yyvsp[0].ttype); ! yyval.exprtype.original_code = ERROR_MARK; ; break;} case 53: ! #line 516 "objc/objc-parse.y" { skip_evaluation--; ! in_sizeof--; ! if (TREE_CODE (yyvsp[0].exprtype.value) == COMPONENT_REF ! && DECL_C_BIT_FIELD (TREE_OPERAND (yyvsp[0].exprtype.value, 1))) ! error ("% applied to a bit-field"); ! yyval.exprtype = c_expr_sizeof_expr (yyvsp[0].exprtype); ; break;} case 54: ! #line 523 "objc/objc-parse.y" { skip_evaluation--; ! in_sizeof--; ! yyval.exprtype = c_expr_sizeof_type (yyvsp[-1].typenametype); ; break;} case 55: ! #line 527 "objc/objc-parse.y" { skip_evaluation--; ! in_alignof--; ! yyval.exprtype.value = c_alignof_expr (yyvsp[0].exprtype.value); ! yyval.exprtype.original_code = ERROR_MARK; ; break;} case 56: ! #line 532 "objc/objc-parse.y" { skip_evaluation--; ! in_alignof--; ! yyval.exprtype.value = c_alignof (groktypename (yyvsp[-1].typenametype)); ! yyval.exprtype.original_code = ERROR_MARK; ; break;} case 57: ! #line 537 "objc/objc-parse.y" ! { yyval.exprtype.value = build_unary_op (REALPART_EXPR, yyvsp[0].exprtype.value, 0); ! yyval.exprtype.original_code = ERROR_MARK; ; break;} case 58: ! #line 540 "objc/objc-parse.y" ! { yyval.exprtype.value = build_unary_op (IMAGPART_EXPR, yyvsp[0].exprtype.value, 0); ! yyval.exprtype.original_code = ERROR_MARK; ; break;} case 59: ! #line 545 "objc/objc-parse.y" ! { skip_evaluation++; in_sizeof++; ; break;} case 60: ! #line 549 "objc/objc-parse.y" ! { skip_evaluation++; in_alignof++; ; break;} case 61: ! #line 553 "objc/objc-parse.y" ! { skip_evaluation++; in_typeof++; ; break;} case 63: ! #line 559 "objc/objc-parse.y" ! { yyval.exprtype.value = c_cast_expr (yyvsp[-2].typenametype, yyvsp[0].exprtype.value); ! yyval.exprtype.original_code = ERROR_MARK; ; break;} case 65: ! #line 566 "objc/objc-parse.y" ! { yyval.exprtype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].exprtype, yyvsp[0].exprtype); ; break;} case 66: ! #line 568 "objc/objc-parse.y" ! { yyval.exprtype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].exprtype, yyvsp[0].exprtype); ; break;} case 67: ! #line 570 "objc/objc-parse.y" ! { yyval.exprtype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].exprtype, yyvsp[0].exprtype); ; break;} case 68: ! #line 572 "objc/objc-parse.y" ! { yyval.exprtype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].exprtype, yyvsp[0].exprtype); ; break;} case 69: ! #line 574 "objc/objc-parse.y" ! { yyval.exprtype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].exprtype, yyvsp[0].exprtype); ; break;} case 70: ! #line 576 "objc/objc-parse.y" ! { yyval.exprtype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].exprtype, yyvsp[0].exprtype); ; break;} case 71: ! #line 578 "objc/objc-parse.y" ! { yyval.exprtype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].exprtype, yyvsp[0].exprtype); ; break;} case 72: ! #line 580 "objc/objc-parse.y" ! { yyval.exprtype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].exprtype, yyvsp[0].exprtype); ; break;} case 73: ! #line 582 "objc/objc-parse.y" ! { yyval.exprtype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].exprtype, yyvsp[0].exprtype); ; break;} case 74: ! #line 584 "objc/objc-parse.y" ! { yyval.exprtype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].exprtype, yyvsp[0].exprtype); ; break;} case 75: ! #line 586 "objc/objc-parse.y" ! { yyval.exprtype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].exprtype, yyvsp[0].exprtype); ; break;} case 76: ! #line 588 "objc/objc-parse.y" ! { yyval.exprtype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].exprtype, yyvsp[0].exprtype); ; break;} case 77: ! #line 590 "objc/objc-parse.y" ! { yyvsp[-1].exprtype.value = lang_hooks.truthvalue_conversion ! (default_conversion (yyvsp[-1].exprtype.value)); ! skip_evaluation += yyvsp[-1].exprtype.value == truthvalue_false_node; ; break;} case 78: ! #line 594 "objc/objc-parse.y" ! { skip_evaluation -= yyvsp[-3].exprtype.value == truthvalue_false_node; ! yyval.exprtype = parser_build_binary_op (TRUTH_ANDIF_EXPR, yyvsp[-3].exprtype, yyvsp[0].exprtype); ; break;} case 79: ! #line 597 "objc/objc-parse.y" ! { yyvsp[-1].exprtype.value = lang_hooks.truthvalue_conversion ! (default_conversion (yyvsp[-1].exprtype.value)); ! skip_evaluation += yyvsp[-1].exprtype.value == truthvalue_true_node; ; break;} case 80: ! #line 601 "objc/objc-parse.y" ! { skip_evaluation -= yyvsp[-3].exprtype.value == truthvalue_true_node; ! yyval.exprtype = parser_build_binary_op (TRUTH_ORIF_EXPR, yyvsp[-3].exprtype, yyvsp[0].exprtype); ; break;} case 81: ! #line 604 "objc/objc-parse.y" ! { yyvsp[-1].exprtype.value = lang_hooks.truthvalue_conversion ! (default_conversion (yyvsp[-1].exprtype.value)); ! skip_evaluation += yyvsp[-1].exprtype.value == truthvalue_false_node; ; break;} case 82: ! #line 608 "objc/objc-parse.y" ! { skip_evaluation += ((yyvsp[-4].exprtype.value == truthvalue_true_node) ! - (yyvsp[-4].exprtype.value == truthvalue_false_node)); ; break;} case 83: ! #line 611 "objc/objc-parse.y" ! { skip_evaluation -= yyvsp[-6].exprtype.value == truthvalue_true_node; ! yyval.exprtype.value = build_conditional_expr (yyvsp[-6].exprtype.value, yyvsp[-3].exprtype.value, ! yyvsp[0].exprtype.value); ! yyval.exprtype.original_code = ERROR_MARK; ; break;} case 84: ! #line 616 "objc/objc-parse.y" { if (pedantic) pedwarn ("ISO C forbids omitting the middle term of a ?: expression"); /* Make sure first operand is calculated only once. */ ! yyvsp[0].ttype = save_expr (default_conversion (yyvsp[-1].exprtype.value)); ! yyvsp[-1].exprtype.value = lang_hooks.truthvalue_conversion (yyvsp[0].ttype); ! skip_evaluation += yyvsp[-1].exprtype.value == truthvalue_true_node; ; break;} case 85: ! #line 623 "objc/objc-parse.y" ! { skip_evaluation -= yyvsp[-4].exprtype.value == truthvalue_true_node; ! yyval.exprtype.value = build_conditional_expr (yyvsp[-4].exprtype.value, yyvsp[-3].ttype, ! yyvsp[0].exprtype.value); ! yyval.exprtype.original_code = ERROR_MARK; ; break;} case 86: ! #line 628 "objc/objc-parse.y" ! { yyval.exprtype.value = build_modify_expr (yyvsp[-2].exprtype.value, NOP_EXPR, yyvsp[0].exprtype.value); ! yyval.exprtype.original_code = MODIFY_EXPR; ; break;} case 87: ! #line 632 "objc/objc-parse.y" ! { yyval.exprtype.value = build_modify_expr (yyvsp[-2].exprtype.value, yyvsp[-1].code, yyvsp[0].exprtype.value); ! TREE_NO_WARNING (yyval.exprtype.value) = 1; ! yyval.exprtype.original_code = ERROR_MARK; ; break;} case 88: ! #line 640 "objc/objc-parse.y" { if (yychar == YYEMPTY) yychar = YYLEX; ! yyval.exprtype.value = build_external_ref (yyvsp[0].ttype, yychar == '('); ! yyval.exprtype.original_code = ERROR_MARK; ; break;} + case 89: + #line 647 "objc/objc-parse.y" + { yyval.exprtype.value = yyvsp[0].ttype; yyval.exprtype.original_code = ERROR_MARK; ; + break;} + case 90: + #line 649 "objc/objc-parse.y" + { yyval.exprtype.value = yyvsp[0].ttype; yyval.exprtype.original_code = STRING_CST; ; + break;} case 91: ! #line 651 "objc/objc-parse.y" ! { yyval.exprtype.value = fname_decl (C_RID_CODE (yyvsp[0].ttype), yyvsp[0].ttype); ! yyval.exprtype.original_code = ERROR_MARK; ; break;} case 92: ! #line 654 "objc/objc-parse.y" { start_init (NULL_TREE, NULL, 0); ! yyval.ttype = groktypename (yyvsp[-2].typenametype); ! if (C_TYPE_VARIABLE_SIZE (yyval.ttype)) ! { ! error ("compound literal has variable size"); ! yyval.ttype = error_mark_node; ! } ! really_start_incremental_init (yyval.ttype); ; break;} case 93: ! #line 663 "objc/objc-parse.y" ! { struct c_expr init = pop_init_level (0); ! tree constructor = init.value; ! tree type = yyvsp[-2].ttype; finish_init (); + maybe_warn_string_init (type, init); ! if (pedantic && !flag_isoc99) pedwarn ("ISO C90 forbids compound literals"); ! yyval.exprtype.value = build_compound_literal (type, constructor); ! yyval.exprtype.original_code = ERROR_MARK; ; break;} case 94: ! #line 675 "objc/objc-parse.y" ! { yyval.exprtype.value = yyvsp[-1].exprtype.value; ! if (TREE_CODE (yyval.exprtype.value) == MODIFY_EXPR) ! TREE_NO_WARNING (yyval.exprtype.value) = 1; ! yyval.exprtype.original_code = ERROR_MARK; ; break;} case 95: ! #line 680 "objc/objc-parse.y" ! { yyval.exprtype.value = error_mark_node; yyval.exprtype.original_code = ERROR_MARK; ; break;} case 96: ! #line 682 "objc/objc-parse.y" ! { if (pedantic) ! pedwarn ("ISO C forbids braced-groups within expressions"); ! yyval.exprtype.value = c_finish_stmt_expr (yyvsp[-2].ttype); ! yyval.exprtype.original_code = ERROR_MARK; ; break;} case 97: ! #line 688 "objc/objc-parse.y" ! { c_finish_stmt_expr (yyvsp[-2].ttype); ! yyval.exprtype.value = error_mark_node; ! yyval.exprtype.original_code = ERROR_MARK; ; break;} case 98: ! #line 693 "objc/objc-parse.y" ! { yyval.exprtype.value = build_function_call (yyvsp[-3].exprtype.value, yyvsp[-1].ttype); ! yyval.exprtype.original_code = ERROR_MARK; ; break;} case 99: ! #line 696 "objc/objc-parse.y" ! { yyval.exprtype.value = build_va_arg (yyvsp[-3].exprtype.value, groktypename (yyvsp[-1].typenametype)); ! yyval.exprtype.original_code = ERROR_MARK; ; break;} case 100: ! #line 700 "objc/objc-parse.y" ! { tree type = groktypename (yyvsp[-1].typenametype); ! if (type == error_mark_node) ! offsetof_base = error_mark_node; ! else ! offsetof_base = build1 (INDIRECT_REF, type, NULL); ; break;} case 101: ! #line 707 "objc/objc-parse.y" ! { yyval.exprtype.value = fold_offsetof (yyvsp[-1].ttype); ! yyval.exprtype.original_code = ERROR_MARK; ; break;} case 102: ! #line 710 "objc/objc-parse.y" ! { yyval.exprtype.value = error_mark_node; yyval.exprtype.original_code = ERROR_MARK; ; break;} case 103: ! #line 713 "objc/objc-parse.y" { ! tree c; ! ! c = fold (yyvsp[-5].exprtype.value); ! STRIP_NOPS (c); ! if (TREE_CODE (c) != INTEGER_CST) ! error ("first argument to %<__builtin_choose_expr%> not" ! " a constant"); ! yyval.exprtype = integer_zerop (c) ? yyvsp[-1].exprtype : yyvsp[-3].exprtype; ; break;} case 104: ! #line 724 "objc/objc-parse.y" ! { yyval.exprtype.value = error_mark_node; yyval.exprtype.original_code = ERROR_MARK; ; ! break;} ! case 105: ! #line 726 "objc/objc-parse.y" { ! tree e1, e2; ! e1 = TYPE_MAIN_VARIANT (groktypename (yyvsp[-3].typenametype)); ! e2 = TYPE_MAIN_VARIANT (groktypename (yyvsp[-1].typenametype)); ! ! yyval.exprtype.value = comptypes (e1, e2) ! ? build_int_cst (NULL_TREE, 1) ! : build_int_cst (NULL_TREE, 0); ! yyval.exprtype.original_code = ERROR_MARK; ; break;} case 106: ! #line 738 "objc/objc-parse.y" ! { yyval.exprtype.value = error_mark_node; yyval.exprtype.original_code = ERROR_MARK; ; break;} case 107: ! #line 740 "objc/objc-parse.y" ! { yyval.exprtype.value = build_array_ref (yyvsp[-3].exprtype.value, yyvsp[-1].exprtype.value); ! yyval.exprtype.original_code = ERROR_MARK; ; break;} case 108: ! #line 743 "objc/objc-parse.y" ! { yyval.exprtype.value = build_component_ref (yyvsp[-2].exprtype.value, yyvsp[0].ttype); ! yyval.exprtype.original_code = ERROR_MARK; ; break;} case 109: ! #line 746 "objc/objc-parse.y" ! { ! tree expr = build_indirect_ref (yyvsp[-2].exprtype.value, "->"); ! yyval.exprtype.value = build_component_ref (expr, yyvsp[0].ttype); ! yyval.exprtype.original_code = ERROR_MARK; ! ; break;} case 110: ! #line 752 "objc/objc-parse.y" ! { yyval.exprtype.value = build_unary_op (POSTINCREMENT_EXPR, yyvsp[-1].exprtype.value, 0); ! yyval.exprtype.original_code = ERROR_MARK; ; break;} case 111: ! #line 755 "objc/objc-parse.y" ! { yyval.exprtype.value = build_unary_op (POSTDECREMENT_EXPR, yyvsp[-1].exprtype.value, 0); ! yyval.exprtype.original_code = ERROR_MARK; ; break;} case 112: ! #line 758 "objc/objc-parse.y" ! { yyval.exprtype.value = objc_build_message_expr (yyvsp[0].ttype); ! yyval.exprtype.original_code = ERROR_MARK; ; break;} case 113: ! #line 761 "objc/objc-parse.y" ! { yyval.exprtype.value = objc_build_selector_expr (yyvsp[0].ttype); ! yyval.exprtype.original_code = ERROR_MARK; ; break;} case 114: ! #line 764 "objc/objc-parse.y" ! { yyval.exprtype.value = objc_build_protocol_expr (yyvsp[0].ttype); ! yyval.exprtype.original_code = ERROR_MARK; ; break;} case 115: ! #line 767 "objc/objc-parse.y" ! { yyval.exprtype.value = objc_build_encode_expr (yyvsp[0].ttype); ! yyval.exprtype.original_code = ERROR_MARK; ; break;} ! case 116: ! #line 770 "objc/objc-parse.y" ! { yyval.exprtype.value = objc_build_string_object (yyvsp[0].ttype); ! yyval.exprtype.original_code = ERROR_MARK; ; break;} ! case 117: ! #line 780 "objc/objc-parse.y" ! { yyval.ttype = build_component_ref (offsetof_base, yyvsp[0].ttype); ; break;} ! case 118: ! #line 782 "objc/objc-parse.y" ! { yyval.ttype = build_component_ref (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 119: ! #line 784 "objc/objc-parse.y" ! { yyval.ttype = build_array_ref (yyvsp[-3].ttype, yyvsp[-1].exprtype.value); ; break;} ! case 122: ! #line 797 "objc/objc-parse.y" { ; break;} case 127: ! #line 813 "objc/objc-parse.y" { POP_DECLSPEC_STACK; ; break;} case 128: ! #line 815 "objc/objc-parse.y" { POP_DECLSPEC_STACK; ; break;} case 129: ! #line 817 "objc/objc-parse.y" ! { shadow_tag_warned (finish_declspecs (yyvsp[-1].dsptype), 1); ! pedwarn ("empty declaration"); ; break;} case 130: ! #line 820 "objc/objc-parse.y" ! { pedwarn ("empty declaration"); ; break;} case 131: ! #line 829 "objc/objc-parse.y" ! { ; break;} case 132: ! #line 837 "objc/objc-parse.y" ! { pending_xref_error (); ! PUSH_DECLSPEC_STACK; ! if (yyvsp[0].dsptype) ! { ! prefix_attributes = yyvsp[0].dsptype->attrs; ! yyvsp[0].dsptype->attrs = NULL_TREE; ! current_declspecs = yyvsp[0].dsptype; ! } ! else ! { ! prefix_attributes = NULL_TREE; ! current_declspecs = build_null_declspecs (); ! } ! current_declspecs = finish_declspecs (current_declspecs); ! all_prefix_attributes = prefix_attributes; ; break;} case 133: ! #line 858 "objc/objc-parse.y" ! { all_prefix_attributes = chainon (yyvsp[0].ttype, prefix_attributes); ; break;} case 134: ! #line 863 "objc/objc-parse.y" ! { POP_DECLSPEC_STACK; ; break;} case 135: ! #line 865 "objc/objc-parse.y" ! { POP_DECLSPEC_STACK; ; break;} case 136: ! #line 867 "objc/objc-parse.y" ! { POP_DECLSPEC_STACK; ; break;} case 137: ! #line 869 "objc/objc-parse.y" ! { POP_DECLSPEC_STACK; ; break;} case 138: ! #line 871 "objc/objc-parse.y" ! { shadow_tag (finish_declspecs (yyvsp[-1].dsptype)); ; break;} case 139: ! #line 873 "objc/objc-parse.y" ! { RESTORE_EXT_FLAGS (yyvsp[-1].itype); ; break;} case 140: ! #line 919 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_qual (build_null_declspecs (), yyvsp[0].ttype); ; break;} case 141: ! #line 921 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_qual (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 142: ! #line 923 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_qual (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 143: ! #line 928 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_attrs (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 144: ! #line 933 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_qual (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 145: ! #line 935 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_qual (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 146: ! #line 940 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_attrs (build_null_declspecs (), yyvsp[0].ttype); ; break;} case 147: ! #line 942 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_attrs (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 148: ! #line 947 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (build_null_declspecs (), yyvsp[0].tstype); ; break;} case 149: ! #line 949 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_qual (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 150: ! #line 951 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_qual (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 151: ! #line 953 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (yyvsp[-1].dsptype, yyvsp[0].tstype); ; break;} case 152: ! #line 955 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (yyvsp[-1].dsptype, yyvsp[0].tstype); ; break;} case 153: ! #line 957 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (yyvsp[-1].dsptype, yyvsp[0].tstype); ; break;} case 154: #line 959 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (yyvsp[-1].dsptype, yyvsp[0].tstype); ; break;} case 155: ! #line 964 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (build_null_declspecs (), yyvsp[0].tstype); ; break;} case 156: ! #line 966 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_attrs (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 157: #line 968 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (yyvsp[-1].dsptype, yyvsp[0].tstype); ; break;} case 158: ! #line 970 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (yyvsp[-1].dsptype, yyvsp[0].tstype); ; break;} case 159: ! #line 972 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (yyvsp[-1].dsptype, yyvsp[0].tstype); ; break;} case 160: ! #line 974 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (yyvsp[-1].dsptype, yyvsp[0].tstype); ; break;} case 161: ! #line 979 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_qual (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 162: ! #line 981 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_qual (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 163: ! #line 983 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (yyvsp[-1].dsptype, yyvsp[0].tstype); ; break;} case 164: ! #line 985 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (yyvsp[-1].dsptype, yyvsp[0].tstype); ; break;} case 165: ! #line 987 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (yyvsp[-1].dsptype, yyvsp[0].tstype); ; break;} case 166: ! #line 989 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (yyvsp[-1].dsptype, yyvsp[0].tstype); ; break;} case 167: ! #line 994 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_attrs (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 168: ! #line 996 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (yyvsp[-1].dsptype, yyvsp[0].tstype); ; break;} case 169: ! #line 998 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (yyvsp[-1].dsptype, yyvsp[0].tstype); ; break;} case 170: ! #line 1000 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (yyvsp[-1].dsptype, yyvsp[0].tstype); ; break;} case 171: ! #line 1002 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (yyvsp[-1].dsptype, yyvsp[0].tstype); ; break;} case 172: ! #line 1007 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_scspec (build_null_declspecs (), yyvsp[0].ttype); ; break;} case 173: ! #line 1009 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_qual (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 174: ! #line 1011 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_qual (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 175: ! #line 1013 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_scspec (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 176: ! #line 1015 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_scspec (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 177: ! #line 1017 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_scspec (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 178: ! #line 1019 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_scspec (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 179: ! #line 1024 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_attrs (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 180: ! #line 1029 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_qual (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 181: ! #line 1031 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_qual (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 182: ! #line 1033 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_scspec (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 183: ! #line 1035 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_scspec (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 184: ! #line 1037 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_scspec (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 185: ! #line 1039 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_scspec (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 186: ! #line 1044 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_attrs (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 187: ! #line 1049 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_qual (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 188: ! #line 1051 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_qual (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 189: ! #line 1053 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (yyvsp[-1].dsptype, yyvsp[0].tstype); ; break;} case 190: ! #line 1055 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (yyvsp[-1].dsptype, yyvsp[0].tstype); ; break;} case 191: ! #line 1057 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (yyvsp[-1].dsptype, yyvsp[0].tstype); ; break;} case 192: ! #line 1059 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (yyvsp[-1].dsptype, yyvsp[0].tstype); ; break;} case 193: ! #line 1061 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_scspec (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 194: ! #line 1063 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_scspec (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 195: ! #line 1065 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_scspec (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 196: ! #line 1067 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_scspec (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 197: ! #line 1072 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_attrs (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 198: ! #line 1074 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (yyvsp[-1].dsptype, yyvsp[0].tstype); ; break;} case 199: ! #line 1076 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (yyvsp[-1].dsptype, yyvsp[0].tstype); ; break;} case 200: ! #line 1078 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (yyvsp[-1].dsptype, yyvsp[0].tstype); ; break;} case 201: ! #line 1080 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (yyvsp[-1].dsptype, yyvsp[0].tstype); ; break;} case 202: ! #line 1085 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_qual (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 203: ! #line 1087 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_qual (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 204: ! #line 1089 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (yyvsp[-1].dsptype, yyvsp[0].tstype); ; break;} case 205: ! #line 1091 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (yyvsp[-1].dsptype, yyvsp[0].tstype); ; break;} case 206: ! #line 1093 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (yyvsp[-1].dsptype, yyvsp[0].tstype); ; break;} case 207: ! #line 1095 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (yyvsp[-1].dsptype, yyvsp[0].tstype); ; break;} case 208: ! #line 1097 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_scspec (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} case 209: ! #line 1099 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_scspec (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} ! case 210: ! #line 1101 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_scspec (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} ! case 211: ! #line 1103 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_scspec (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} ! case 212: ! #line 1108 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_attrs (yyvsp[-1].dsptype, yyvsp[0].ttype); ; break;} ! case 213: ! #line 1110 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (yyvsp[-1].dsptype, yyvsp[0].tstype); ; break;} ! case 214: ! #line 1112 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (yyvsp[-1].dsptype, yyvsp[0].tstype); ; break;} ! case 215: ! #line 1114 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (yyvsp[-1].dsptype, yyvsp[0].tstype); ; break;} ! case 216: ! #line 1116 "objc/objc-parse.y" ! { yyval.dsptype = declspecs_add_type (yyvsp[-1].dsptype, yyvsp[0].tstype); ; ! break;} ! case 273: ! #line 1203 "objc/objc-parse.y" ! { yyval.dsptype = NULL; ; ! break;} ! case 274: ! #line 1205 "objc/objc-parse.y" ! { yyval.dsptype = yyvsp[0].dsptype; ; break;} case 278: ! #line 1240 "objc/objc-parse.y" ! { OBJC_NEED_RAW_IDENTIFIER (1); ! yyval.tstype.kind = ctsk_resword; ! yyval.tstype.spec = yyvsp[0].ttype; ; break;} ! case 281: ! #line 1252 "objc/objc-parse.y" ! { /* For a typedef name, record the meaning, not the name. ! In case of `foo foo, bar;'. */ ! yyval.tstype.kind = ctsk_typedef; ! yyval.tstype.spec = lookup_name (yyvsp[0].ttype); ; ! break;} ! case 282: ! #line 1257 "objc/objc-parse.y" ! { yyval.tstype.kind = ctsk_objc; ! yyval.tstype.spec = objc_get_protocol_qualified_type (yyvsp[-1].ttype, yyvsp[0].ttype); ; ! break;} ! case 283: ! #line 1260 "objc/objc-parse.y" ! { yyval.tstype.kind = ctsk_objc; ! yyval.tstype.spec = objc_get_protocol_qualified_type (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 284: ! #line 1266 "objc/objc-parse.y" ! { yyval.tstype.kind = ctsk_objc; ! yyval.tstype.spec = objc_get_protocol_qualified_type (NULL_TREE, yyvsp[0].ttype); ; break;} case 285: ! #line 1269 "objc/objc-parse.y" ! { skip_evaluation--; ! in_typeof--; ! if (TREE_CODE (yyvsp[-1].exprtype.value) == COMPONENT_REF ! && DECL_C_BIT_FIELD (TREE_OPERAND (yyvsp[-1].exprtype.value, 1))) ! error ("% applied to a bit-field"); ! yyval.tstype.kind = ctsk_typeof; ! yyval.tstype.spec = TREE_TYPE (yyvsp[-1].exprtype.value); ! pop_maybe_used (variably_modified_type_p (yyval.tstype.spec, ! NULL_TREE)); ; break;} case 286: ! #line 1279 "objc/objc-parse.y" ! { skip_evaluation--; ! in_typeof--; ! yyval.tstype.kind = ctsk_typeof; ! yyval.tstype.spec = groktypename (yyvsp[-1].typenametype); ! pop_maybe_used (variably_modified_type_p (yyval.tstype.spec, ! NULL_TREE)); ; ! break;} ! case 291: ! #line 1301 "objc/objc-parse.y" ! { yyval.ttype = start_decl (yyvsp[-3].dtrtype, current_declspecs, true, chainon (yyvsp[-1].ttype, all_prefix_attributes)); + if (!yyval.ttype) + yyval.ttype = error_mark_node; start_init (yyval.ttype, yyvsp[-2].ttype, global_bindings_p ()); ; break;} ! case 292: ! #line 1308 "objc/objc-parse.y" { finish_init (); ! if (yyvsp[-1].ttype != error_mark_node) ! { ! maybe_warn_string_init (TREE_TYPE (yyvsp[-1].ttype), yyvsp[0].exprtype); ! finish_decl (yyvsp[-1].ttype, yyvsp[0].exprtype.value, yyvsp[-4].ttype); ! } ! ; break;} ! case 293: ! #line 1316 "objc/objc-parse.y" ! { tree d = start_decl (yyvsp[-2].dtrtype, current_declspecs, false, chainon (yyvsp[0].ttype, all_prefix_attributes)); ! if (d) ! finish_decl (d, NULL_TREE, yyvsp[-1].ttype); ; break;} ! case 294: ! #line 1325 "objc/objc-parse.y" ! { yyval.ttype = start_decl (yyvsp[-3].dtrtype, current_declspecs, true, chainon (yyvsp[-1].ttype, all_prefix_attributes)); + if (!yyval.ttype) + yyval.ttype = error_mark_node; start_init (yyval.ttype, yyvsp[-2].ttype, global_bindings_p ()); ; break;} ! case 295: ! #line 1332 "objc/objc-parse.y" { finish_init (); ! if (yyvsp[-1].ttype != error_mark_node) ! { ! maybe_warn_string_init (TREE_TYPE (yyvsp[-1].ttype), yyvsp[0].exprtype); ! finish_decl (yyvsp[-1].ttype, yyvsp[0].exprtype.value, yyvsp[-4].ttype); ! } ! ; break;} ! case 296: ! #line 1340 "objc/objc-parse.y" ! { tree d = start_decl (yyvsp[-2].dtrtype, current_declspecs, false, chainon (yyvsp[0].ttype, all_prefix_attributes)); ! if (d) ! finish_decl (d, NULL_TREE, yyvsp[-1].ttype); ; break;} ! case 297: ! #line 1349 "objc/objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 298: ! #line 1351 "objc/objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 299: ! #line 1356 "objc/objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 300: ! #line 1358 "objc/objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 301: ! #line 1364 "objc/objc-parse.y" ! { yyval.ttype = yyvsp[-3].ttype; ; break;} ! case 302: ! #line 1366 "objc/objc-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 303: ! #line 1371 "objc/objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 304: ! #line 1373 "objc/objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 305: ! #line 1378 "objc/objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 306: ! #line 1380 "objc/objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[0].ttype, NULL_TREE); ; break;} ! case 307: ! #line 1382 "objc/objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, build_tree_list (NULL_TREE, yyvsp[-1].ttype)); ; break;} ! case 308: ! #line 1384 "objc/objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-5].ttype, tree_cons (NULL_TREE, yyvsp[-3].ttype, yyvsp[-1].ttype)); ; break;} ! case 309: ! #line 1386 "objc/objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} ! case 316: ! #line 1408 "objc/objc-parse.y" ! { yyval.exprtype = yyvsp[0].exprtype; ; ! break;} ! case 317: ! #line 1410 "objc/objc-parse.y" { really_start_incremental_init (NULL_TREE); ; break;} ! case 318: ! #line 1412 "objc/objc-parse.y" ! { yyval.exprtype = pop_init_level (0); ; break;} ! case 319: ! #line 1414 "objc/objc-parse.y" ! { yyval.exprtype.value = error_mark_node; yyval.exprtype.original_code = ERROR_MARK; ; break;} ! case 320: ! #line 1420 "objc/objc-parse.y" { if (pedantic) pedwarn ("ISO C forbids empty initializer braces"); ; break;} ! case 324: ! #line 1434 "objc/objc-parse.y" ! { if (pedantic && !flag_isoc99) pedwarn ("ISO C90 forbids specifying subobject to initialize"); ; break;} ! case 325: ! #line 1437 "objc/objc-parse.y" { if (pedantic) ! pedwarn ("obsolete use of designated initializer without %<=%>"); ; break;} ! case 326: ! #line 1440 "objc/objc-parse.y" { set_init_label (yyvsp[-1].ttype); if (pedantic) ! pedwarn ("obsolete use of designated initializer with %<:%>"); ; break;} ! case 327: ! #line 1444 "objc/objc-parse.y" {; break;} ! case 329: ! #line 1450 "objc/objc-parse.y" { push_init_level (0); ; break;} ! case 330: ! #line 1452 "objc/objc-parse.y" { process_init_element (pop_init_level (0)); ; break;} ! case 331: ! #line 1454 "objc/objc-parse.y" ! { process_init_element (yyvsp[0].exprtype); ; break;} ! case 335: ! #line 1465 "objc/objc-parse.y" { set_init_label (yyvsp[0].ttype); ; break;} ! case 337: ! #line 1471 "objc/objc-parse.y" ! { set_init_index (yyvsp[-3].exprtype.value, yyvsp[-1].exprtype.value); if (pedantic) pedwarn ("ISO C forbids specifying range of elements to initialize"); ; break;} ! case 338: ! #line 1475 "objc/objc-parse.y" ! { set_init_index (yyvsp[-1].exprtype.value, NULL_TREE); ; break;} ! case 339: ! #line 1480 "objc/objc-parse.y" { if (pedantic) pedwarn ("ISO C forbids nested functions"); push_function_context (); ! if (!start_function (current_declspecs, yyvsp[0].dtrtype, ! all_prefix_attributes)) { pop_function_context (); YYERROR1; } ; break;} ! case 340: ! #line 1492 "objc/objc-parse.y" { tree decl = current_function_decl; DECL_SOURCE_LOCATION (decl) = yyvsp[0].location; store_parm_decls (); ; break;} ! case 341: ! #line 1501 "objc/objc-parse.y" { tree decl = current_function_decl; + add_stmt (yyvsp[0].ttype); finish_function (); pop_function_context (); ! add_stmt (build_stmt (DECL_EXPR, decl)); ; break;} ! case 342: ! #line 1510 "objc/objc-parse.y" { if (pedantic) pedwarn ("ISO C forbids nested functions"); push_function_context (); ! if (!start_function (current_declspecs, yyvsp[0].dtrtype, ! all_prefix_attributes)) { pop_function_context (); YYERROR1; } ; break;} ! case 343: ! #line 1522 "objc/objc-parse.y" { tree decl = current_function_decl; DECL_SOURCE_LOCATION (decl) = yyvsp[0].location; store_parm_decls (); ; break;} ! case 344: ! #line 1531 "objc/objc-parse.y" { tree decl = current_function_decl; + add_stmt (yyvsp[0].ttype); finish_function (); pop_function_context (); ! add_stmt (build_stmt (DECL_EXPR, decl)); ; break;} ! case 347: ! #line 1550 "objc/objc-parse.y" ! { yyval.dtrtype = yyvsp[-2].ttype ? build_attrs_declarator (yyvsp[-2].ttype, yyvsp[-1].dtrtype) : yyvsp[-1].dtrtype; ; break;} case 348: ! #line 1552 "objc/objc-parse.y" ! { yyval.dtrtype = build_function_declarator (yyvsp[0].arginfotype, yyvsp[-2].dtrtype); ; break;} case 349: ! #line 1554 "objc/objc-parse.y" ! { yyval.dtrtype = set_array_declarator_inner (yyvsp[0].dtrtype, yyvsp[-1].dtrtype, false); ; break;} ! case 350: ! #line 1556 "objc/objc-parse.y" ! { yyval.dtrtype = make_pointer_declarator (yyvsp[-1].dsptype, yyvsp[0].dtrtype); ; break;} ! case 351: ! #line 1558 "objc/objc-parse.y" ! { yyval.dtrtype = build_id_declarator (yyvsp[0].ttype); ; break;} case 354: ! #line 1572 "objc/objc-parse.y" ! { yyval.dtrtype = build_function_declarator (yyvsp[0].arginfotype, yyvsp[-2].dtrtype); ; break;} case 355: ! #line 1574 "objc/objc-parse.y" ! { yyval.dtrtype = set_array_declarator_inner (yyvsp[0].dtrtype, yyvsp[-1].dtrtype, false); ; break;} case 356: ! #line 1576 "objc/objc-parse.y" ! { yyval.dtrtype = build_id_declarator (yyvsp[0].ttype); ; break;} case 357: ! #line 1581 "objc/objc-parse.y" ! { yyval.dtrtype = build_function_declarator (yyvsp[0].arginfotype, yyvsp[-2].dtrtype); ; break;} case 358: ! #line 1583 "objc/objc-parse.y" ! { yyval.dtrtype = set_array_declarator_inner (yyvsp[0].dtrtype, yyvsp[-1].dtrtype, false); ; break;} case 359: ! #line 1585 "objc/objc-parse.y" ! { yyval.dtrtype = make_pointer_declarator (yyvsp[-1].dsptype, yyvsp[0].dtrtype); ; break;} case 360: ! #line 1587 "objc/objc-parse.y" ! { yyval.dtrtype = make_pointer_declarator (yyvsp[-1].dsptype, yyvsp[0].dtrtype); ; ! break;} ! case 361: ! #line 1589 "objc/objc-parse.y" ! { yyval.dtrtype = yyvsp[-2].ttype ? build_attrs_declarator (yyvsp[-2].ttype, yyvsp[-1].dtrtype) : yyvsp[-1].dtrtype; ; break;} case 362: ! #line 1597 "objc/objc-parse.y" ! { yyval.dtrtype = build_function_declarator (yyvsp[0].arginfotype, yyvsp[-2].dtrtype); ; break;} case 363: ! #line 1599 "objc/objc-parse.y" ! { yyval.dtrtype = yyvsp[-2].ttype ? build_attrs_declarator (yyvsp[-2].ttype, yyvsp[-1].dtrtype) : yyvsp[-1].dtrtype; ; break;} case 364: ! #line 1601 "objc/objc-parse.y" ! { yyval.dtrtype = make_pointer_declarator (yyvsp[-1].dsptype, yyvsp[0].dtrtype); ; break;} case 365: ! #line 1603 "objc/objc-parse.y" ! { yyval.dtrtype = set_array_declarator_inner (yyvsp[0].dtrtype, yyvsp[-1].dtrtype, false); ; break;} case 366: ! #line 1605 "objc/objc-parse.y" ! { yyval.dtrtype = build_id_declarator (yyvsp[0].ttype); ; break;} case 367: ! #line 1610 "objc/objc-parse.y" ! { yyval.ttype = NULL_TREE; ; break;} case 368: ! #line 1612 "objc/objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; break;} case 369: ! #line 1617 "objc/objc-parse.y" ! { yyval.ttype = NULL_TREE; ; break;} case 370: ! #line 1619 "objc/objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; break;} case 371: ! #line 1624 "objc/objc-parse.y" ! { yyval.ttype = NULL_TREE; ; break;} case 372: ! #line 1626 "objc/objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; break;} case 373: ! #line 1637 "objc/objc-parse.y" ! { yyval.ttype = start_struct (RECORD_TYPE, yyvsp[-1].ttype); ! /* Start scope of tag before parsing components. */ ; break;} case 374: ! #line 1641 "objc/objc-parse.y" ! { yyval.tstype.spec = finish_struct (yyvsp[-3].ttype, nreverse (yyvsp[-2].ttype), ! chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ! yyval.tstype.kind = ctsk_tagdef; ; break;} case 375: ! #line 1645 "objc/objc-parse.y" ! { yyval.tstype.spec = finish_struct (start_struct (RECORD_TYPE, ! NULL_TREE), ! nreverse (yyvsp[-2].ttype), chainon (yyvsp[-4].ttype, yyvsp[0].ttype)); ! yyval.tstype.kind = ctsk_tagdef; ! ; break;} case 376: ! #line 1651 "objc/objc-parse.y" ! { yyval.ttype = start_struct (UNION_TYPE, yyvsp[-1].ttype); ; break;} case 377: ! #line 1653 "objc/objc-parse.y" ! { yyval.tstype.spec = finish_struct (yyvsp[-3].ttype, nreverse (yyvsp[-2].ttype), ! chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ! yyval.tstype.kind = ctsk_tagdef; ; break;} case 378: ! #line 1657 "objc/objc-parse.y" ! { yyval.tstype.spec = finish_struct (start_struct (UNION_TYPE, ! NULL_TREE), ! nreverse (yyvsp[-2].ttype), chainon (yyvsp[-4].ttype, yyvsp[0].ttype)); ! yyval.tstype.kind = ctsk_tagdef; ! ; break;} case 379: ! #line 1663 "objc/objc-parse.y" ! { yyval.ttype = start_enum (yyvsp[-1].ttype); ; break;} case 380: ! #line 1665 "objc/objc-parse.y" ! { yyval.tstype.spec = finish_enum (yyvsp[-4].ttype, nreverse (yyvsp[-3].ttype), ! chainon (yyvsp[-7].ttype, yyvsp[0].ttype)); ! yyval.tstype.kind = ctsk_tagdef; ; ! break;} ! case 381: ! #line 1669 "objc/objc-parse.y" ! { yyval.ttype = start_enum (NULL_TREE); ; ! break;} ! case 382: ! #line 1671 "objc/objc-parse.y" ! { yyval.tstype.spec = finish_enum (yyvsp[-4].ttype, nreverse (yyvsp[-3].ttype), ! chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ! yyval.tstype.kind = ctsk_tagdef; ; ! break;} ! case 383: ! #line 1678 "objc/objc-parse.y" ! { yyval.tstype = parser_xref_tag (RECORD_TYPE, yyvsp[0].ttype); ; ! break;} ! case 384: ! #line 1680 "objc/objc-parse.y" ! { yyval.tstype = parser_xref_tag (UNION_TYPE, yyvsp[0].ttype); ; ! break;} ! case 385: ! #line 1682 "objc/objc-parse.y" ! { yyval.tstype = parser_xref_tag (ENUMERAL_TYPE, yyvsp[0].ttype); /* In ISO C, enumerated types can be referred to only if already defined. */ ! if (pedantic && !COMPLETE_TYPE_P (yyval.tstype.spec)) ! pedwarn ("ISO C forbids forward references to % types"); ; break;} ! case 389: ! #line 1697 "objc/objc-parse.y" ! { if (pedantic && !flag_isoc99) pedwarn ("comma at end of enumerator list"); ; break;} ! case 390: ! #line 1715 "objc/objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 391: ! #line 1717 "objc/objc-parse.y" { yyval.ttype = chainon (yyvsp[0].ttype, yyvsp[-1].ttype); pedwarn ("no semicolon at end of struct or union"); ; break;} ! case 392: ! #line 1722 "objc/objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 393: ! #line 1724 "objc/objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[-2].ttype); ; break;} ! case 394: ! #line 1726 "objc/objc-parse.y" { if (pedantic) pedwarn ("extra semicolon in struct or union specified"); ; break;} ! case 395: ! #line 1730 "objc/objc-parse.y" ! { yyval.ttype = nreverse (objc_get_class_ivars (yyvsp[-1].ttype)); ; break;} ! case 396: ! #line 1735 "objc/objc-parse.y" { yyval.ttype = yyvsp[0].ttype; POP_DECLSPEC_STACK; ; break;} ! case 397: ! #line 1738 "objc/objc-parse.y" { /* Support for unnamed structs or unions as members of structs or unions (which is [a] useful and [b] supports MS P-SDK). */ ! yyval.ttype = grokfield (build_id_declarator (NULL_TREE), ! current_declspecs, NULL_TREE); POP_DECLSPEC_STACK; ; break;} ! case 398: ! #line 1746 "objc/objc-parse.y" { yyval.ttype = yyvsp[0].ttype; POP_DECLSPEC_STACK; ; break;} ! case 399: ! #line 1749 "objc/objc-parse.y" { if (pedantic) pedwarn ("ISO C forbids member declarations with no members"); ! shadow_tag_warned (finish_declspecs (yyvsp[0].dsptype), pedantic); yyval.ttype = NULL_TREE; ; break;} ! case 400: ! #line 1754 "objc/objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 401: ! #line 1756 "objc/objc-parse.y" { yyval.ttype = yyvsp[0].ttype; RESTORE_EXT_FLAGS (yyvsp[-1].itype); ; break;} ! case 403: ! #line 1763 "objc/objc-parse.y" { TREE_CHAIN (yyvsp[0].ttype) = yyvsp[-3].ttype; yyval.ttype = yyvsp[0].ttype; ; break;} ! case 405: ! #line 1769 "objc/objc-parse.y" { TREE_CHAIN (yyvsp[0].ttype) = yyvsp[-3].ttype; yyval.ttype = yyvsp[0].ttype; ; break;} ! case 406: ! #line 1774 "objc/objc-parse.y" ! { yyval.ttype = grokfield (yyvsp[-1].dtrtype, current_declspecs, NULL_TREE); decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ; break;} ! case 407: ! #line 1778 "objc/objc-parse.y" ! { yyval.ttype = grokfield (yyvsp[-3].dtrtype, current_declspecs, yyvsp[-1].exprtype.value); decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ; break;} ! case 408: ! #line 1782 "objc/objc-parse.y" ! { yyval.ttype = grokfield (build_id_declarator (NULL_TREE), ! current_declspecs, yyvsp[-1].exprtype.value); decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ; break;} ! case 409: ! #line 1790 "objc/objc-parse.y" ! { yyval.ttype = grokfield (yyvsp[-1].dtrtype, current_declspecs, NULL_TREE); decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ; break;} ! case 410: ! #line 1794 "objc/objc-parse.y" ! { yyval.ttype = grokfield (yyvsp[-3].dtrtype, current_declspecs, yyvsp[-1].exprtype.value); decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ; break;} ! case 411: ! #line 1798 "objc/objc-parse.y" ! { yyval.ttype = grokfield (build_id_declarator (NULL_TREE), ! current_declspecs, yyvsp[-1].exprtype.value); decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ; break;} ! case 413: ! #line 1810 "objc/objc-parse.y" { if (yyvsp[-2].ttype == error_mark_node) yyval.ttype = yyvsp[-2].ttype; else TREE_CHAIN (yyvsp[0].ttype) = yyvsp[-2].ttype, yyval.ttype = yyvsp[0].ttype; ; break;} ! case 414: ! #line 1815 "objc/objc-parse.y" { yyval.ttype = error_mark_node; ; break;} ! case 415: ! #line 1821 "objc/objc-parse.y" { yyval.ttype = build_enumerator (yyvsp[0].ttype, NULL_TREE); ; break;} case 416: ! #line 1823 "objc/objc-parse.y" ! { yyval.ttype = build_enumerator (yyvsp[-2].ttype, yyvsp[0].exprtype.value); ; break;} case 417: ! #line 1828 "objc/objc-parse.y" ! { pending_xref_error (); ! yyval.dsptype = finish_declspecs (yyvsp[0].dsptype); ; break;} case 418: ! #line 1831 "objc/objc-parse.y" ! { yyval.typenametype = XOBNEW (&parser_obstack, struct c_type_name); ! yyval.typenametype->specs = yyvsp[-1].dsptype; ! yyval.typenametype->declarator = yyvsp[0].dtrtype; ; break;} ! case 419: ! #line 1838 "objc/objc-parse.y" ! { yyval.dtrtype = build_id_declarator (NULL_TREE); ; break;} ! case 421: ! #line 1844 "objc/objc-parse.y" ! { yyval.parmtype = build_c_parm (current_declspecs, all_prefix_attributes, ! build_id_declarator (NULL_TREE)); ; break;} ! case 422: ! #line 1847 "objc/objc-parse.y" ! { yyval.parmtype = build_c_parm (current_declspecs, all_prefix_attributes, ! yyvsp[0].dtrtype); ; break;} ! case 423: ! #line 1850 "objc/objc-parse.y" ! { yyval.parmtype = build_c_parm (current_declspecs, ! chainon (yyvsp[0].ttype, all_prefix_attributes), ! yyvsp[-1].dtrtype); ; break;} case 427: ! #line 1863 "objc/objc-parse.y" ! { yyval.dtrtype = make_pointer_declarator (yyvsp[-1].dsptype, yyvsp[0].dtrtype); ; break;} case 428: ! #line 1868 "objc/objc-parse.y" ! { yyval.dtrtype = make_pointer_declarator ! (yyvsp[0].dsptype, build_id_declarator (NULL_TREE)); ; break;} case 429: ! #line 1871 "objc/objc-parse.y" ! { yyval.dtrtype = make_pointer_declarator (yyvsp[-1].dsptype, yyvsp[0].dtrtype); ; break;} case 430: ! #line 1876 "objc/objc-parse.y" ! { yyval.dtrtype = yyvsp[-2].ttype ? build_attrs_declarator (yyvsp[-2].ttype, yyvsp[-1].dtrtype) : yyvsp[-1].dtrtype; ; break;} case 431: ! #line 1878 "objc/objc-parse.y" ! { yyval.dtrtype = build_function_declarator (yyvsp[0].arginfotype, yyvsp[-2].dtrtype); ; break;} case 432: ! #line 1880 "objc/objc-parse.y" ! { yyval.dtrtype = set_array_declarator_inner (yyvsp[0].dtrtype, yyvsp[-1].dtrtype, true); ; break;} case 433: ! #line 1882 "objc/objc-parse.y" ! { yyval.dtrtype = build_function_declarator ! (yyvsp[0].arginfotype, build_id_declarator (NULL_TREE)); ; break;} case 434: ! #line 1885 "objc/objc-parse.y" ! { yyval.dtrtype = set_array_declarator_inner ! (yyvsp[0].dtrtype, build_id_declarator (NULL_TREE), true); ; ! break;} ! case 435: ! #line 1893 "objc/objc-parse.y" ! { yyval.dtrtype = build_array_declarator (yyvsp[-1].exprtype.value, yyvsp[-2].dsptype, false, false); ; ! break;} ! case 436: ! #line 1895 "objc/objc-parse.y" ! { yyval.dtrtype = build_array_declarator (NULL_TREE, yyvsp[-1].dsptype, false, false); ; break;} case 437: ! #line 1897 "objc/objc-parse.y" ! { yyval.dtrtype = build_array_declarator (NULL_TREE, yyvsp[-2].dsptype, false, true); ; ! break;} ! case 438: ! #line 1899 "objc/objc-parse.y" ! { yyval.dtrtype = build_array_declarator (yyvsp[-1].exprtype.value, yyvsp[-2].dsptype, true, false); ; ! break;} ! case 439: ! #line 1902 "objc/objc-parse.y" ! { yyval.dtrtype = build_array_declarator (yyvsp[-1].exprtype.value, yyvsp[-3].dsptype, true, false); ; ! break;} ! case 442: ! #line 1915 "objc/objc-parse.y" { error ("label at end of compound statement"); ; break;} ! case 450: ! #line 1932 "objc/objc-parse.y" { if ((pedantic && !flag_isoc99) || warn_declaration_after_statement) pedwarn_c90 ("ISO C90 forbids mixed declarations and code"); ; break;} case 465: ! #line 1966 "objc/objc-parse.y" ! { yyval.ttype = c_begin_compound_stmt (flag_isoc99); ; ! break;} ! case 467: ! #line 1974 "objc/objc-parse.y" { if (pedantic) pedwarn ("ISO C forbids label declarations"); ; break;} ! case 470: ! #line 1985 "objc/objc-parse.y" { tree link; for (link = yyvsp[-1].ttype; link; link = TREE_CHAIN (link)) { tree label = declare_label (TREE_VALUE (link)); C_DECLARED_LABEL_FLAG (label) = 1; ! add_stmt (build_stmt (DECL_EXPR, label)); } ; break;} case 471: ! #line 1999 "objc/objc-parse.y" ! { add_stmt (yyvsp[0].ttype); ; break;} case 473: ! #line 2003 "objc/objc-parse.y" ! { yyval.ttype = c_begin_compound_stmt (true); ; break;} ! case 478: ! #line 2017 "objc/objc-parse.y" ! { if (cur_stmt_list == NULL) { ! error ("braced-group within expression allowed " ! "only inside a function"); YYERROR; } ! yyval.ttype = c_begin_stmt_expr (); ; break;} ! case 479: ! #line 2028 "objc/objc-parse.y" ! { yyval.ttype = c_end_compound_stmt (yyvsp[-1].ttype, true); ; break;} case 480: ! #line 2036 "objc/objc-parse.y" ! { if (yychar == YYEMPTY) ! yychar = YYLEX; ! yyval.location = input_location; ; break;} case 483: ! #line 2049 "objc/objc-parse.y" ! { yyval.ttype = c_end_compound_stmt (yyvsp[-2].ttype, flag_isoc99); ; break;} case 484: ! #line 2054 "objc/objc-parse.y" ! { ! /* Two cases cannot and do not have line numbers associated: ! If stmt is degenerate, such as "2;", then stmt is an ! INTEGER_CST, which cannot hold line numbers. But that's ! ok because the statement will either be changed to a ! MODIFY_EXPR during gimplification of the statement expr, ! or discarded. If stmt was compound, but without new ! variables, we will have skipped the creation of a BIND ! and will have a bare STATEMENT_LIST. But that's ok ! because (recursively) all of the component statments ! should already have line numbers assigned. */ ! if (yyvsp[0].ttype && EXPR_P (yyvsp[0].ttype)) ! SET_EXPR_LOCATION (yyvsp[0].ttype, yyvsp[-1].location); ! ; ! break;} ! case 485: ! #line 2072 "objc/objc-parse.y" ! { if (yyvsp[0].ttype) SET_EXPR_LOCATION (yyvsp[0].ttype, yyvsp[-1].location); ; ! break;} ! case 486: ! #line 2076 "objc/objc-parse.y" ! { yyval.ttype = lang_hooks.truthvalue_conversion (yyvsp[0].exprtype.value); ! if (EXPR_P (yyval.ttype)) ! SET_EXPR_LOCATION (yyval.ttype, yyvsp[-1].location); ; break;} case 487: ! #line 2089 "objc/objc-parse.y" ! { yyval.ttype = c_end_compound_stmt (yyvsp[-2].ttype, flag_isoc99); ; break;} case 488: ! #line 2094 "objc/objc-parse.y" ! { if (extra_warnings) ! add_stmt (build (NOP_EXPR, NULL_TREE, NULL_TREE)); ! yyval.ttype = c_end_compound_stmt (yyvsp[-2].ttype, flag_isoc99); ; break;} case 490: ! #line 2103 "objc/objc-parse.y" ! { c_finish_if_stmt (yyvsp[-6].location, yyvsp[-4].ttype, yyvsp[-2].ttype, yyvsp[0].ttype, true); ! add_stmt (c_end_compound_stmt (yyvsp[-7].ttype, flag_isoc99)); ; break;} case 491: ! #line 2107 "objc/objc-parse.y" ! { c_finish_if_stmt (yyvsp[-6].location, yyvsp[-4].ttype, yyvsp[-2].ttype, yyvsp[0].ttype, false); ! add_stmt (c_end_compound_stmt (yyvsp[-7].ttype, flag_isoc99)); ; break;} case 492: ! #line 2111 "objc/objc-parse.y" ! { c_finish_if_stmt (yyvsp[-4].location, yyvsp[-2].ttype, yyvsp[0].ttype, NULL, true); ! add_stmt (c_end_compound_stmt (yyvsp[-5].ttype, flag_isoc99)); ; break;} case 493: ! #line 2115 "objc/objc-parse.y" ! { c_finish_if_stmt (yyvsp[-4].location, yyvsp[-2].ttype, yyvsp[0].ttype, NULL, false); ! add_stmt (c_end_compound_stmt (yyvsp[-5].ttype, flag_isoc99)); ; break;} case 494: ! #line 2120 "objc/objc-parse.y" ! { yyval.ttype = c_break_label; c_break_label = NULL; ; break;} case 495: ! #line 2124 "objc/objc-parse.y" ! { yyval.ttype = c_cont_label; c_cont_label = NULL; ; break;} case 496: ! #line 2130 "objc/objc-parse.y" ! { c_finish_loop (yyvsp[-6].location, yyvsp[-4].ttype, NULL, yyvsp[0].ttype, c_break_label, ! c_cont_label, true); ! add_stmt (c_end_compound_stmt (yyvsp[-7].ttype, flag_isoc99)); ! c_break_label = yyvsp[-2].ttype; c_cont_label = yyvsp[-1].ttype; ; break;} case 497: ! #line 2139 "objc/objc-parse.y" ! { yyval.ttype = c_break_label; c_break_label = yyvsp[-3].ttype; ; break;} case 498: ! #line 2140 "objc/objc-parse.y" ! { yyval.ttype = c_cont_label; c_cont_label = yyvsp[-3].ttype; ; break;} case 499: ! #line 2142 "objc/objc-parse.y" ! { c_finish_loop (yyvsp[-10].location, yyvsp[-2].ttype, NULL, yyvsp[-7].ttype, yyvsp[-5].ttype, ! yyvsp[-4].ttype, false); ! add_stmt (c_end_compound_stmt (yyvsp[-11].ttype, flag_isoc99)); ; break;} case 500: ! #line 2149 "objc/objc-parse.y" ! { yyval.ttype = NULL_TREE; ; break;} case 501: ! #line 2151 "objc/objc-parse.y" ! { yyval.ttype = yyvsp[0].exprtype.value; ; break;} case 502: ! #line 2156 "objc/objc-parse.y" ! { c_finish_expr_stmt (yyvsp[-1].ttype); ; break;} case 503: ! #line 2158 "objc/objc-parse.y" ! { check_for_loop_decls (); ; break;} case 504: ! #line 2162 "objc/objc-parse.y" ! { if (yyvsp[0].ttype) ! { ! yyval.ttype = lang_hooks.truthvalue_conversion (yyvsp[0].ttype); ! if (EXPR_P (yyval.ttype)) ! SET_EXPR_LOCATION (yyval.ttype, yyvsp[-1].location); ! } ! else ! yyval.ttype = NULL; ! ; break;} case 505: ! #line 2174 "objc/objc-parse.y" ! { yyval.ttype = c_process_expr_stmt (yyvsp[0].ttype); ; break;} case 506: ! #line 2181 "objc/objc-parse.y" ! { c_finish_loop (yyvsp[-7].location, yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[0].ttype, c_break_label, ! c_cont_label, true); ! add_stmt (c_end_compound_stmt (yyvsp[-10].ttype, flag_isoc99)); ! c_break_label = yyvsp[-2].ttype; c_cont_label = yyvsp[-1].ttype; ; break;} case 507: ! #line 2189 "objc/objc-parse.y" ! { yyval.ttype = c_start_case (yyvsp[-1].exprtype.value); ; break;} case 508: ! #line 2191 "objc/objc-parse.y" ! { c_finish_case (yyvsp[0].ttype); ! if (c_break_label) ! add_stmt (build (LABEL_EXPR, void_type_node, ! c_break_label)); ! c_break_label = yyvsp[-1].ttype; ! add_stmt (c_end_compound_stmt (yyvsp[-6].ttype, flag_isoc99)); ; break;} case 509: ! #line 2202 "objc/objc-parse.y" ! { yyval.ttype = c_finish_expr_stmt (yyvsp[-1].exprtype.value); ; break;} case 510: ! #line 2204 "objc/objc-parse.y" ! { yyval.ttype = NULL_TREE; ; break;} case 511: ! #line 2206 "objc/objc-parse.y" ! { yyval.ttype = NULL_TREE; ; break;} case 512: ! #line 2208 "objc/objc-parse.y" ! { yyval.ttype = NULL_TREE; ; break;} case 513: ! #line 2210 "objc/objc-parse.y" ! { yyval.ttype = NULL_TREE; ; break;} case 514: ! #line 2212 "objc/objc-parse.y" ! { yyval.ttype = NULL_TREE; ; break;} case 515: ! #line 2214 "objc/objc-parse.y" ! { yyval.ttype = c_finish_bc_stmt (&c_break_label, true); ; break;} case 516: ! #line 2216 "objc/objc-parse.y" ! { yyval.ttype = c_finish_bc_stmt (&c_cont_label, false); ; break;} case 517: ! #line 2218 "objc/objc-parse.y" ! { yyval.ttype = c_finish_return (NULL_TREE); ; break;} case 518: ! #line 2220 "objc/objc-parse.y" ! { yyval.ttype = c_finish_return (yyvsp[-1].exprtype.value); ; break;} case 520: ! #line 2223 "objc/objc-parse.y" ! { yyval.ttype = c_finish_goto_label (yyvsp[-1].ttype); ; break;} case 521: ! #line 2225 "objc/objc-parse.y" ! { yyval.ttype = c_finish_goto_ptr (yyvsp[-1].exprtype.value); ; break;} case 522: ! #line 2227 "objc/objc-parse.y" ! { yyval.ttype = NULL_TREE; ; break;} case 523: ! #line 2229 "objc/objc-parse.y" ! { yyval.ttype = objc_build_throw_stmt (yyvsp[-1].exprtype.value); ; break;} case 524: ! #line 2231 "objc/objc-parse.y" ! { yyval.ttype = objc_build_throw_stmt (NULL_TREE); ; break;} case 525: ! #line 2233 "objc/objc-parse.y" ! { yyval.ttype = NULL_TREE; ; break;} case 526: ! #line 2235 "objc/objc-parse.y" ! { objc_build_synchronized (yyvsp[-4].location, yyvsp[-2].exprtype.value, yyvsp[0].ttype); yyval.ttype = NULL_TREE; ; break;} case 527: ! #line 2240 "objc/objc-parse.y" ! { objc_begin_catch_clause (grokparm (yyvsp[-1].parmtype)); ; break;} case 528: ! #line 2245 "objc/objc-parse.y" ! { objc_finish_catch_clause (); ; break;} case 529: ! #line 2247 "objc/objc-parse.y" ! { objc_finish_catch_clause (); ; break;} ! case 532: ! #line 2257 "objc/objc-parse.y" ! { objc_begin_try_stmt (yyvsp[-1].location, yyvsp[0].ttype); ; break;} ! case 534: ! #line 2263 "objc/objc-parse.y" ! { objc_build_finally_clause (yyvsp[-1].location, yyvsp[0].ttype); ; break;} case 535: ! #line 2268 "objc/objc-parse.y" ! { objc_finish_try_stmt (); ; break;} case 536: ! #line 2270 "objc/objc-parse.y" ! { objc_finish_try_stmt (); ; break;} case 537: ! #line 2276 "objc/objc-parse.y" ! { add_stmt (yyvsp[0].ttype); yyval.ttype = NULL_TREE; ; break;} case 539: ! #line 2285 "objc/objc-parse.y" ! { yyval.ttype = do_case (yyvsp[-1].exprtype.value, NULL_TREE); ; break;} case 540: ! #line 2287 "objc/objc-parse.y" ! { yyval.ttype = do_case (yyvsp[-3].exprtype.value, yyvsp[-1].exprtype.value); ; break;} case 541: ! #line 2289 "objc/objc-parse.y" ! { yyval.ttype = do_case (NULL_TREE, NULL_TREE); ; break;} case 542: ! #line 2291 "objc/objc-parse.y" { tree label = define_label (yyvsp[-2].location, yyvsp[-3].ttype); if (label) { decl_attributes (&label, yyvsp[0].ttype, 0); ! yyval.ttype = add_stmt (build_stmt (LABEL_EXPR, label)); } else yyval.ttype = NULL_TREE; ; break;} case 543: ! #line 2309 "objc/objc-parse.y" ! { yyval.ttype = yyvsp[-2].ttype; ; break;} case 544: ! #line 2315 "objc/objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} + case 546: + #line 2322 "objc/objc-parse.y" + { assemble_asm (yyvsp[-1].ttype); ; + break;} case 547: ! #line 2324 "objc/objc-parse.y" ! {; ! break;} ! case 548: ! #line 2332 "objc/objc-parse.y" ! { yyval.ttype = build_asm_stmt (yyvsp[-6].ttype, yyvsp[-3].ttype); ; ! break;} ! case 549: ! #line 2338 "objc/objc-parse.y" ! { yyval.ttype = build_asm_expr (yyvsp[0].ttype, 0, 0, 0, true); ; break;} case 550: ! #line 2341 "objc/objc-parse.y" ! { yyval.ttype = build_asm_expr (yyvsp[-2].ttype, yyvsp[0].ttype, 0, 0, false); ; break;} case 551: ! #line 2344 "objc/objc-parse.y" ! { yyval.ttype = build_asm_expr (yyvsp[-4].ttype, yyvsp[-2].ttype, yyvsp[0].ttype, 0, false); ; break;} case 552: ! #line 2347 "objc/objc-parse.y" ! { yyval.ttype = build_asm_expr (yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype, yyvsp[0].ttype, false); ; break;} case 553: ! #line 2354 "objc/objc-parse.y" ! { yyval.ttype = 0; ; break;} case 554: ! #line 2356 "objc/objc-parse.y" ! { if (yyvsp[0].ttype != ridpointers[RID_VOLATILE]) ! { ! warning ("%E qualifier ignored on asm", yyvsp[0].ttype); ! yyval.ttype = 0; ! } ! else ! yyval.ttype = yyvsp[0].ttype; ! ; break;} case 555: ! #line 2369 "objc/objc-parse.y" ! { yyval.ttype = NULL_TREE; ; break;} case 558: ! #line 2376 "objc/objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 559: ! #line 2382 "objc/objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (NULL_TREE, yyvsp[-5].ttype), ! yyvsp[-2].exprtype.value); ; break;} case 560: ! #line 2386 "objc/objc-parse.y" ! { yyvsp[-7].ttype = build_string (IDENTIFIER_LENGTH (yyvsp[-7].ttype), ! IDENTIFIER_POINTER (yyvsp[-7].ttype)); ! yyval.ttype = build_tree_list (build_tree_list (yyvsp[-7].ttype, yyvsp[-5].ttype), yyvsp[-2].exprtype.value); ; break;} case 561: ! #line 2393 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} case 562: ! #line 2395 "objc/objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-2].ttype); ; break;} case 563: ! #line 2401 "objc/objc-parse.y" ! { if (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (yyvsp[0].ttype))) ! != char_type_node) ! { ! error ("wide string literal in %"); ! yyval.ttype = build_string (1, ""); ! } ! else ! yyval.ttype = yyvsp[0].ttype; ; break;} case 564: ! #line 2412 "objc/objc-parse.y" ! { c_lex_string_translate = 0; ; break;} case 565: ! #line 2416 "objc/objc-parse.y" ! { c_lex_string_translate = 1; ; break;} case 566: ! #line 2427 "objc/objc-parse.y" ! { push_scope (); ! declare_parm_level (); ; break;} case 567: ! #line 2430 "objc/objc-parse.y" ! { yyval.arginfotype = yyvsp[0].arginfotype; ! pop_scope (); ; break;} ! case 569: ! #line 2437 "objc/objc-parse.y" ! { mark_forward_parm_decls (); ; ! break;} ! case 570: ! #line 2439 "objc/objc-parse.y" ! { /* Dummy action so attributes are in known place ! on parser stack. */ ; ! break;} ! case 571: ! #line 2442 "objc/objc-parse.y" ! { yyval.arginfotype = yyvsp[0].arginfotype; ; ! break;} ! case 572: ! #line 2444 "objc/objc-parse.y" ! { yyval.arginfotype = XOBNEW (&parser_obstack, struct c_arg_info); ! yyval.arginfotype->parms = 0; ! yyval.arginfotype->tags = 0; ! yyval.arginfotype->types = 0; ! yyval.arginfotype->others = 0; ; ! break;} ! case 573: ! #line 2454 "objc/objc-parse.y" ! { yyval.arginfotype = XOBNEW (&parser_obstack, struct c_arg_info); ! yyval.arginfotype->parms = 0; ! yyval.arginfotype->tags = 0; ! yyval.arginfotype->types = 0; ! yyval.arginfotype->others = 0; ; ! break;} ! case 574: ! #line 2460 "objc/objc-parse.y" ! { yyval.arginfotype = XOBNEW (&parser_obstack, struct c_arg_info); ! yyval.arginfotype->parms = 0; ! yyval.arginfotype->tags = 0; ! yyval.arginfotype->others = 0; ! /* Suppress -Wold-style-definition for this case. */ ! yyval.arginfotype->types = error_mark_node; ! error ("ISO C requires a named argument before %<...%>"); ! ; ! break;} ! case 575: ! #line 2469 "objc/objc-parse.y" ! { yyval.arginfotype = get_parm_info (/*ellipsis=*/false); ; ! break;} ! case 576: ! #line 2471 "objc/objc-parse.y" ! { yyval.arginfotype = get_parm_info (/*ellipsis=*/true); ; ! break;} ! case 577: ! #line 2476 "objc/objc-parse.y" ! { push_parm_decl (yyvsp[0].parmtype); ; ! break;} ! case 578: ! #line 2478 "objc/objc-parse.y" ! { push_parm_decl (yyvsp[0].parmtype); ; ! break;} ! case 579: ! #line 2485 "objc/objc-parse.y" ! { yyval.parmtype = build_c_parm (current_declspecs, ! chainon (yyvsp[0].ttype, all_prefix_attributes), yyvsp[-1].dtrtype); POP_DECLSPEC_STACK; ; break;} ! case 580: ! #line 2489 "objc/objc-parse.y" ! { yyval.parmtype = build_c_parm (current_declspecs, ! chainon (yyvsp[0].ttype, all_prefix_attributes), yyvsp[-1].dtrtype); POP_DECLSPEC_STACK; ; break;} ! case 581: ! #line 2493 "objc/objc-parse.y" ! { yyval.parmtype = yyvsp[0].parmtype; POP_DECLSPEC_STACK; ; break;} ! case 582: ! #line 2496 "objc/objc-parse.y" ! { yyval.parmtype = build_c_parm (current_declspecs, ! chainon (yyvsp[0].ttype, all_prefix_attributes), yyvsp[-1].dtrtype); POP_DECLSPEC_STACK; ; break;} ! case 583: ! #line 2501 "objc/objc-parse.y" ! { yyval.parmtype = yyvsp[0].parmtype; POP_DECLSPEC_STACK; ; break;} ! case 584: ! #line 2509 "objc/objc-parse.y" ! { yyval.parmtype = build_c_parm (current_declspecs, ! chainon (yyvsp[0].ttype, all_prefix_attributes), yyvsp[-1].dtrtype); POP_DECLSPEC_STACK; ; break;} ! case 585: ! #line 2513 "objc/objc-parse.y" ! { yyval.parmtype = build_c_parm (current_declspecs, ! chainon (yyvsp[0].ttype, all_prefix_attributes), yyvsp[-1].dtrtype); POP_DECLSPEC_STACK; ; break;} ! case 586: ! #line 2517 "objc/objc-parse.y" ! { yyval.parmtype = yyvsp[0].parmtype; POP_DECLSPEC_STACK; ; break;} ! case 587: ! #line 2520 "objc/objc-parse.y" ! { yyval.parmtype = build_c_parm (current_declspecs, ! chainon (yyvsp[0].ttype, all_prefix_attributes), yyvsp[-1].dtrtype); POP_DECLSPEC_STACK; ; break;} ! case 588: ! #line 2525 "objc/objc-parse.y" ! { yyval.parmtype = yyvsp[0].parmtype; POP_DECLSPEC_STACK; ; break;} ! case 589: ! #line 2531 "objc/objc-parse.y" { prefix_attributes = chainon (prefix_attributes, yyvsp[-3].ttype); all_prefix_attributes = prefix_attributes; ; break;} ! case 590: ! #line 2540 "objc/objc-parse.y" ! { push_scope (); declare_parm_level (); ; break;} ! case 591: ! #line 2543 "objc/objc-parse.y" ! { yyval.arginfotype = yyvsp[0].arginfotype; ! pop_scope (); ; break;} ! case 593: ! #line 2550 "objc/objc-parse.y" ! { yyval.arginfotype = XOBNEW (&parser_obstack, struct c_arg_info); ! yyval.arginfotype->parms = 0; ! yyval.arginfotype->tags = 0; ! yyval.arginfotype->types = yyvsp[-1].ttype; ! yyval.arginfotype->others = 0; /* Make sure we have a parmlist after attributes. */ ! if (yyvsp[-3].ttype != 0) YYERROR1; ; break;} ! case 594: ! #line 2565 "objc/objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 595: ! #line 2567 "objc/objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} ! case 596: ! #line 2573 "objc/objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 597: ! #line 2575 "objc/objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} ! case 598: ! #line 2580 "objc/objc-parse.y" ! { yyval.itype = SAVE_EXT_FLAGS (); pedantic = 0; warn_pointer_arith = 0; warn_traditional = 0; flag_iso = 0; ; break;} ! case 604: ! #line 2596 "objc/objc-parse.y" { ! objc_finish_implementation (); ; break;} ! case 605: ! #line 2604 "objc/objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 606: ! #line 2606 "objc/objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} ! case 607: ! #line 2611 "objc/objc-parse.y" { objc_declare_class (yyvsp[-1].ttype); ; break;} ! case 608: ! #line 2618 "objc/objc-parse.y" { objc_declare_alias (yyvsp[-2].ttype, yyvsp[-1].ttype); ; break;} ! case 609: ! #line 2624 "objc/objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 610: ! #line 2625 "objc/objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 613: ! #line 2635 "objc/objc-parse.y" { ! objc_start_class_interface (yyvsp[-2].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 614: ! #line 2639 "objc/objc-parse.y" { ! objc_continue_interface (); ; break;} ! case 615: ! #line 2643 "objc/objc-parse.y" { ! objc_finish_interface (); ; break;} ! case 616: ! #line 2648 "objc/objc-parse.y" { ! objc_start_class_implementation (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 617: ! #line 2652 "objc/objc-parse.y" { ! objc_continue_implementation (); ; break;} ! case 618: ! #line 2657 "objc/objc-parse.y" { ! objc_start_category_interface (yyvsp[-4].ttype, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 619: ! #line 2661 "objc/objc-parse.y" { ! objc_finish_interface (); ; break;} ! case 620: ! #line 2666 "objc/objc-parse.y" { ! objc_start_category_implementation (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} ! case 621: ! #line 2673 "objc/objc-parse.y" { objc_pq_context = 1; ! objc_start_protocol (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 622: ! #line 2678 "objc/objc-parse.y" { objc_pq_context = 0; ! objc_finish_interface (); ; break;} ! case 623: ! #line 2686 "objc/objc-parse.y" { objc_declare_protocols (yyvsp[-1].ttype); ; break;} ! case 624: ! #line 2693 "objc/objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 626: ! #line 2701 "objc/objc-parse.y" { if (yyvsp[-2].code == LT_EXPR && yyvsp[0].code == GT_EXPR) yyval.ttype = yyvsp[-1].ttype; *************** case 615: *** 5429,5687 **** YYERROR1; ; break;} ! case 618: ! #line 2833 "objc/objc-parse.y" ! { objc_public_flag = 2; ; ! break;} ! case 619: ! #line 2834 "objc/objc-parse.y" ! { objc_public_flag = 0; ; break;} ! case 620: ! #line 2835 "objc/objc-parse.y" ! { objc_public_flag = 1; ; break;} ! case 621: ! #line 2840 "objc/objc-parse.y" ! { ! yyval.ttype = NULL_TREE; ! ; break;} ! case 623: ! #line 2845 "objc/objc-parse.y" { ! if (pedantic) pedwarn ("extra semicolon in struct or union specified"); ! ; ! break;} ! case 624: ! #line 2863 "objc/objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ; ! break;} ! case 625: ! #line 2866 "objc/objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ; ! break;} ! case 626: ! #line 2869 "objc/objc-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 627: ! #line 2874 "objc/objc-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 630: ! #line 2881 "objc/objc-parse.y" ! { ! yyval.ttype = add_instance_variable (objc_ivar_context, ! objc_public_flag, ! yyvsp[0].ttype, current_declspecs, ! NULL_TREE); ! ; break;} ! case 631: ! #line 2888 "objc/objc-parse.y" { ! yyval.ttype = add_instance_variable (objc_ivar_context, ! objc_public_flag, ! yyvsp[-2].ttype, current_declspecs, yyvsp[0].ttype); ! ; break;} ! case 632: ! #line 2894 "objc/objc-parse.y" { ! yyval.ttype = add_instance_variable (objc_ivar_context, ! objc_public_flag, ! NULL_TREE, ! current_declspecs, yyvsp[0].ttype); ! ; ! break;} ! case 633: ! #line 2904 "objc/objc-parse.y" ! { objc_inherit_code = CLASS_METHOD_DECL; ; ! break;} ! case 634: ! #line 2906 "objc/objc-parse.y" ! { objc_inherit_code = INSTANCE_METHOD_DECL; ; break;} ! case 635: ! #line 2911 "objc/objc-parse.y" { objc_pq_context = 1; - if (!objc_implementation_context) - fatal_error ("method definition not in class context"); ; break;} ! case 636: ! #line 2917 "objc/objc-parse.y" { objc_pq_context = 0; ! objc_add_method (objc_implementation_context, ! yyvsp[0].ttype, ! objc_inherit_code == CLASS_METHOD_DECL); ! start_method_def (yyvsp[0].ttype); ! ; ! break;} ! case 637: ! #line 2925 "objc/objc-parse.y" ! { ! continue_method_def (); ; break;} ! case 638: ! #line 2929 "objc/objc-parse.y" { ! finish_method_def (); ; break;} ! case 641: ! #line 2941 "objc/objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 645: ! #line 2951 "objc/objc-parse.y" { /* Remember protocol qualifiers in prototypes. */ objc_pq_context = 1; ; break;} ! case 646: ! #line 2956 "objc/objc-parse.y" { /* Forget protocol qualifiers here. */ objc_pq_context = 0; ! objc_add_method (objc_interface_context, ! yyvsp[0].ttype, ! objc_inherit_code == CLASS_METHOD_DECL); ; break;} ! case 648: ! #line 2968 "objc/objc-parse.y" { ! yyval.ttype = build_method_decl (objc_inherit_code, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} ! case 649: ! #line 2973 "objc/objc-parse.y" { ! yyval.ttype = build_method_decl (objc_inherit_code, NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} ! case 650: ! #line 2978 "objc/objc-parse.y" { ! yyval.ttype = build_method_decl (objc_inherit_code, yyvsp[-3].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 651: ! #line 2983 "objc/objc-parse.y" { ! yyval.ttype = build_method_decl (objc_inherit_code, NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 660: ! #line 3013 "objc/objc-parse.y" ! { POP_DECLSPEC_STACK; ; ! break;} ! case 661: ! #line 3015 "objc/objc-parse.y" ! { shadow_tag (yyvsp[-1].ttype); ; ! break;} ! case 662: ! #line 3017 "objc/objc-parse.y" ! { pedwarn ("empty declaration"); ; ! break;} ! case 663: ! #line 3022 "objc/objc-parse.y" ! { push_parm_decl (yyvsp[0].ttype); ; break;} ! case 664: ! #line 3024 "objc/objc-parse.y" ! { push_parm_decl (yyvsp[0].ttype); ; break;} ! case 665: ! #line 3032 "objc/objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, ! yyvsp[-1].ttype), ! chainon (yyvsp[0].ttype, all_prefix_attributes)); ; break;} ! case 666: ! #line 3036 "objc/objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, ! yyvsp[-1].ttype), ! chainon (yyvsp[0].ttype, all_prefix_attributes)); ; break;} ! case 667: ! #line 3040 "objc/objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 668: ! #line 3045 "objc/objc-parse.y" { ! yyval.ttype = NULL_TREE; ; break;} ! case 669: ! #line 3049 "objc/objc-parse.y" { ! /* oh what a kludge! */ ! yyval.ttype = objc_ellipsis_node; ; break;} ! case 670: ! #line 3054 "objc/objc-parse.y" { ! pushlevel (0); ; break;} ! case 671: ! #line 3058 "objc/objc-parse.y" { ! /* returns a tree list node generated by get_parm_info */ ! yyval.ttype = yyvsp[0].ttype; ! poplevel (0, 0, 0); ; break;} ! case 674: ! #line 3073 "objc/objc-parse.y" { ! yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 701: ! #line 3095 "objc/objc-parse.y" { ! yyval.ttype = build_keyword_decl (yyvsp[-5].ttype, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 702: ! #line 3100 "objc/objc-parse.y" { ! yyval.ttype = build_keyword_decl (yyvsp[-2].ttype, NULL_TREE, yyvsp[0].ttype); ; break;} ! case 703: ! #line 3105 "objc/objc-parse.y" { ! yyval.ttype = build_keyword_decl (NULL_TREE, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 704: ! #line 3110 "objc/objc-parse.y" { ! yyval.ttype = build_keyword_decl (NULL_TREE, NULL_TREE, yyvsp[0].ttype); ; break;} ! case 708: ! #line 3123 "objc/objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 709: ! #line 3131 "objc/objc-parse.y" { if (TREE_CHAIN (yyvsp[0].ttype) == NULL_TREE) /* just return the expr., remove a level of indirection */ --- 5235,5434 ---- YYERROR1; ; break;} ! case 630: ! #line 2716 "objc/objc-parse.y" ! { objc_set_visibility (2); ; break;} ! case 631: ! #line 2717 "objc/objc-parse.y" ! { objc_set_visibility (0); ; break;} ! case 632: ! #line 2718 "objc/objc-parse.y" ! { objc_set_visibility (1); ; break;} ! case 635: ! #line 2725 "objc/objc-parse.y" { ! if (pedantic) pedwarn ("extra semicolon in struct or union specified"); ! ; break;} ! case 636: ! #line 2733 "objc/objc-parse.y" { ! /* Comma-separated ivars are chained together in ! reverse order; add them one by one. */ ! tree ivar = nreverse (yyvsp[0].ttype); ! ! for (; ivar; ivar = TREE_CHAIN (ivar)) ! objc_add_instance_variable (copy_node (ivar)); ! ; break;} ! case 638: ! #line 2746 "objc/objc-parse.y" { ! if (pedantic) ! pedwarn ("extra semicolon in method definition specified"); ! ; break;} ! case 641: ! #line 2759 "objc/objc-parse.y" { + objc_set_method_type (yyvsp[0].code); objc_pq_context = 1; ; break;} ! case 642: ! #line 2764 "objc/objc-parse.y" { objc_pq_context = 0; ! objc_start_method_definition (yyvsp[-1].ttype); ; break;} ! case 643: ! #line 2769 "objc/objc-parse.y" { ! objc_finish_method_definition (current_function_decl); ; break;} ! case 646: ! #line 2781 "objc/objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 650: ! #line 2791 "objc/objc-parse.y" { + objc_set_method_type (yyvsp[0].code); /* Remember protocol qualifiers in prototypes. */ objc_pq_context = 1; ; break;} ! case 651: ! #line 2797 "objc/objc-parse.y" { /* Forget protocol qualifiers here. */ objc_pq_context = 0; ! objc_add_method_declaration (yyvsp[0].ttype); ; break;} ! case 653: ! #line 2807 "objc/objc-parse.y" { ! yyval.ttype = objc_build_method_signature (yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} ! case 654: ! #line 2812 "objc/objc-parse.y" { ! yyval.ttype = objc_build_method_signature (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} ! case 655: ! #line 2817 "objc/objc-parse.y" { ! yyval.ttype = objc_build_method_signature (yyvsp[-3].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 656: ! #line 2822 "objc/objc-parse.y" { ! yyval.ttype = objc_build_method_signature (NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 657: ! #line 2832 "objc/objc-parse.y" ! { ! TREE_OVERFLOW (yyval.ttype) = yyvsp[0].itype; ! ; break;} ! case 658: ! #line 2839 "objc/objc-parse.y" ! { ! yyval.ttype = make_node (TREE_LIST); ! ; break;} ! case 659: ! #line 2843 "objc/objc-parse.y" ! { ! yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, ! grokparm (yyvsp[0].parmtype))); ! ; break;} ! case 660: ! #line 2851 "objc/objc-parse.y" ! { ! yyval.itype = 0; ! ; break;} ! case 661: ! #line 2855 "objc/objc-parse.y" ! { ! yyval.itype = 1; ! ; break;} ! case 664: ! #line 2868 "objc/objc-parse.y" { ! yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 692: ! #line 2893 "objc/objc-parse.y" { ! yyval.ttype = chainon (yyvsp[-1].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} ! case 693: ! #line 2897 "objc/objc-parse.y" { ! yyval.ttype = NULL_TREE; ; break;} ! case 694: ! #line 2904 "objc/objc-parse.y" { ! yyval.ttype = build_tree_list (yyvsp[-1].ttype, groktypename (yyvsp[0].typenametype)); ; break;} ! case 695: ! #line 2908 "objc/objc-parse.y" { ! yyval.ttype = build_tree_list (yyvsp[0].ttype, NULL_TREE); ; break;} ! case 696: ! #line 2915 "objc/objc-parse.y" { ! yyval.ttype = objc_build_keyword_decl (yyvsp[-5].ttype, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 697: ! #line 2920 "objc/objc-parse.y" { ! yyval.ttype = objc_build_keyword_decl (yyvsp[-2].ttype, NULL_TREE, yyvsp[0].ttype); ; break;} ! case 698: ! #line 2925 "objc/objc-parse.y" { ! yyval.ttype = objc_build_keyword_decl (NULL_TREE, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 699: ! #line 2930 "objc/objc-parse.y" { ! yyval.ttype = objc_build_keyword_decl (NULL_TREE, NULL_TREE, yyvsp[0].ttype); ; break;} ! case 703: ! #line 2943 "objc/objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 704: ! #line 2951 "objc/objc-parse.y" { if (TREE_CHAIN (yyvsp[0].ttype) == NULL_TREE) /* just return the expr., remove a level of indirection */ *************** case 709: *** 5691,5758 **** yyval.ttype = yyvsp[0].ttype; ; break;} ! case 710: ! #line 3143 "objc/objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 711: ! #line 3147 "objc/objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 713: ! #line 3155 "objc/objc-parse.y" { ! yyval.ttype = get_class_reference (yyvsp[0].ttype); ; break;} ! case 714: ! #line 3159 "objc/objc-parse.y" { ! yyval.ttype = get_class_reference (yyvsp[0].ttype); ; break;} ! case 715: ! #line 3166 "objc/objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-2].ttype, yyvsp[-1].ttype); ; break;} ! case 719: ! #line 3177 "objc/objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 720: ! #line 3184 "objc/objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-1].ttype, NULL_TREE); ; break;} ! case 721: ! #line 3188 "objc/objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, NULL_TREE); ; break;} ! case 722: ! #line 3195 "objc/objc-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} ! case 723: ! #line 3202 "objc/objc-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} ! case 724: ! #line 3211 "objc/objc-parse.y" { ! yyval.ttype = groktypename (yyvsp[-1].ttype); ; break;} } --- 5438,5509 ---- yyval.ttype = yyvsp[0].ttype; ; break;} ! case 705: ! #line 2963 "objc/objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 706: ! #line 2967 "objc/objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 707: ! #line 2974 "objc/objc-parse.y" ! { yyval.ttype = yyvsp[0].exprtype.value; ; ! break;} ! case 708: ! #line 2976 "objc/objc-parse.y" { ! yyval.ttype = objc_get_class_reference (yyvsp[0].ttype); ; break;} ! case 709: ! #line 2980 "objc/objc-parse.y" { ! yyval.ttype = objc_get_class_reference (yyvsp[0].ttype); ; break;} ! case 710: ! #line 2987 "objc/objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-2].ttype, yyvsp[-1].ttype); ; break;} ! case 714: ! #line 2998 "objc/objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 715: ! #line 3005 "objc/objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-1].ttype, NULL_TREE); ; break;} ! case 716: ! #line 3009 "objc/objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, NULL_TREE); ; break;} ! case 717: ! #line 3016 "objc/objc-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} ! case 718: ! #line 3023 "objc/objc-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} ! case 719: ! #line 3032 "objc/objc-parse.y" { ! yyval.ttype = groktypename (yyvsp[-1].typenametype); ; break;} } *************** yyreturn: *** 5988,5994 **** #endif return yyresult; } ! #line 3216 "objc/objc-parse.y" /* yylex() is a thin wrapper around c_lex(), all it does is translate --- 5739,5745 ---- #endif return yyresult; } ! #line 3037 "objc/objc-parse.y" /* yylex() is a thin wrapper around c_lex(), all it does is translate *************** static const struct resword reswords[] = *** 6024,6029 **** --- 5775,5781 ---- { "__attribute", RID_ATTRIBUTE, 0 }, { "__attribute__", RID_ATTRIBUTE, 0 }, { "__builtin_choose_expr", RID_CHOOSE_EXPR, 0 }, + { "__builtin_offsetof", RID_OFFSETOF, 0 }, { "__builtin_types_compatible_p", RID_TYPES_COMPATIBLE_P, 0 }, { "__builtin_va_arg", RID_VA_ARG, 0 }, { "__complex", RID_COMPLEX, 0 }, *************** static const struct resword reswords[] = *** 6037,6048 **** { "__inline", RID_INLINE, 0 }, { "__inline__", RID_INLINE, 0 }, { "__label__", RID_LABEL, 0 }, - { "__ptrbase", RID_PTRBASE, 0 }, - { "__ptrbase__", RID_PTRBASE, 0 }, - { "__ptrextent", RID_PTREXTENT, 0 }, - { "__ptrextent__", RID_PTREXTENT, 0 }, - { "__ptrvalue", RID_PTRVALUE, 0 }, - { "__ptrvalue__", RID_PTRVALUE, 0 }, { "__real", RID_REALPART, 0 }, { "__real__", RID_REALPART, 0 }, { "__restrict", RID_RESTRICT, 0 }, --- 5789,5794 ---- *************** static const struct resword reswords[] = *** 6090,6096 **** { "void", RID_VOID, 0 }, { "volatile", RID_VOLATILE, 0 }, { "while", RID_WHILE, 0 }, ! { "id", RID_ID, D_OBJC }, /* These objc keywords are recognized only immediately after an '@'. */ --- 5836,5842 ---- { "void", RID_VOID, 0 }, { "volatile", RID_VOLATILE, 0 }, { "while", RID_WHILE, 0 }, ! /* These objc keywords are recognized only immediately after an '@'. */ *************** static const short rid_to_yy[RID_MAX] = *** 6153,6164 **** /* RID_MUTABLE */ 0, /* ObjC */ ! /* RID_IN */ TYPE_QUAL, ! /* RID_OUT */ TYPE_QUAL, ! /* RID_INOUT */ TYPE_QUAL, ! /* RID_BYCOPY */ TYPE_QUAL, ! /* RID_BYREF */ TYPE_QUAL, ! /* RID_ONEWAY */ TYPE_QUAL, /* C */ /* RID_INT */ TYPESPEC, --- 5899,5910 ---- /* RID_MUTABLE */ 0, /* ObjC */ ! /* RID_IN */ OBJC_TYPE_QUAL, ! /* RID_OUT */ OBJC_TYPE_QUAL, ! /* RID_INOUT */ OBJC_TYPE_QUAL, ! /* RID_BYCOPY */ OBJC_TYPE_QUAL, ! /* RID_BYREF */ OBJC_TYPE_QUAL, ! /* RID_ONEWAY */ OBJC_TYPE_QUAL, /* C */ /* RID_INT */ TYPESPEC, *************** static const short rid_to_yy[RID_MAX] = *** 6193,6201 **** /* RID_IMAGPART */ IMAGPART, /* RID_REALPART */ REALPART, /* RID_LABEL */ LABEL, - /* RID_PTRBASE */ PTR_BASE, - /* RID_PTREXTENT */ PTR_EXTENT, - /* RID_PTRVALUE */ PTR_VALUE, /* RID_CHOOSE_EXPR */ CHOOSE_EXPR, /* RID_TYPES_COMPATIBLE_P */ TYPES_COMPATIBLE_P, --- 5939,5944 ---- *************** static const short rid_to_yy[RID_MAX] = *** 6218,6224 **** /* RID_FALSE */ 0, /* RID_NAMESPACE */ 0, /* RID_NEW */ 0, ! /* RID_OFFSETOF */ 0, /* RID_OPERATOR */ 0, /* RID_THIS */ 0, /* RID_THROW */ 0, --- 5961,5967 ---- /* RID_FALSE */ 0, /* RID_NAMESPACE */ 0, /* RID_NEW */ 0, ! /* RID_OFFSETOF */ OFFSETOF, /* RID_OPERATOR */ 0, /* RID_THIS */ 0, /* RID_THROW */ 0, *************** static const short rid_to_yy[RID_MAX] = *** 6235,6258 **** /* RID_STATCAST */ 0, /* Objective C */ ! /* RID_ID */ OBJECTNAME, ! /* RID_AT_ENCODE */ ENCODE, ! /* RID_AT_END */ END, ! /* RID_AT_CLASS */ CLASS, ! /* RID_AT_ALIAS */ ALIAS, ! /* RID_AT_DEFS */ DEFS, ! /* RID_AT_PRIVATE */ PRIVATE, ! /* RID_AT_PROTECTED */ PROTECTED, ! /* RID_AT_PUBLIC */ PUBLIC, ! /* RID_AT_PROTOCOL */ PROTOCOL, ! /* RID_AT_SELECTOR */ SELECTOR, /* RID_AT_THROW */ AT_THROW, /* RID_AT_TRY */ AT_TRY, /* RID_AT_CATCH */ AT_CATCH, /* RID_AT_FINALLY */ AT_FINALLY, /* RID_AT_SYNCHRONIZED */ AT_SYNCHRONIZED, ! /* RID_AT_INTERFACE */ INTERFACE, ! /* RID_AT_IMPLEMENTATION */ IMPLEMENTATION }; static void --- 5978,6000 ---- /* RID_STATCAST */ 0, /* Objective C */ ! /* RID_AT_ENCODE */ AT_ENCODE, ! /* RID_AT_END */ AT_END, ! /* RID_AT_CLASS */ AT_CLASS, ! /* RID_AT_ALIAS */ AT_ALIAS, ! /* RID_AT_DEFS */ AT_DEFS, ! /* RID_AT_PRIVATE */ AT_PRIVATE, ! /* RID_AT_PROTECTED */ AT_PROTECTED, ! /* RID_AT_PUBLIC */ AT_PUBLIC, ! /* RID_AT_PROTOCOL */ AT_PROTOCOL, ! /* RID_AT_SELECTOR */ AT_SELECTOR, /* RID_AT_THROW */ AT_THROW, /* RID_AT_TRY */ AT_TRY, /* RID_AT_CATCH */ AT_CATCH, /* RID_AT_FINALLY */ AT_FINALLY, /* RID_AT_SYNCHRONIZED */ AT_SYNCHRONIZED, ! /* RID_AT_INTERFACE */ AT_INTERFACE, ! /* RID_AT_IMPLEMENTATION */ AT_IMPLEMENTATION }; static void *************** init_reswords (void) *** 6266,6272 **** if (!c_dialect_objc ()) mask |= D_OBJC; ! ridpointers = ggc_calloc ((int) RID_MAX, sizeof (tree)); for (i = 0; i < N_reswords; i++) { /* If a keyword is disabled, do not enter it into the table --- 6008,6014 ---- if (!c_dialect_objc ()) mask |= D_OBJC; ! ridpointers = GGC_CNEWVEC (tree, (int) RID_MAX); for (i = 0; i < N_reswords; i++) { /* If a keyword is disabled, do not enter it into the table *************** yylexname (void) *** 6301,6315 **** { enum rid rid_code = C_RID_CODE (yylval.ttype); - /* Turn non-typedefed refs to "id" into plain identifiers; this - allows constructs like "void foo(id id);" to work. */ - if (rid_code == RID_ID) - { - decl = lookup_name (yylval.ttype); - if (decl == NULL_TREE || TREE_CODE (decl) != TYPE_DECL) - return IDENTIFIER; - } - if (!OBJC_IS_AT_KEYWORD (rid_code) && (!OBJC_IS_PQ_KEYWORD (rid_code) || objc_pq_context)) { --- 6043,6048 ---- *************** yylexname (void) *** 6327,6333 **** } else { ! tree objc_interface_decl = is_class_name (yylval.ttype); /* ObjC class names are in the same namespace as variables and typedefs, and hence are shadowed by local declarations. */ if (objc_interface_decl --- 6060,6066 ---- } else { ! tree objc_interface_decl = objc_is_class_name (yylval.ttype); /* ObjC class names are in the same namespace as variables and typedefs, and hence are shadowed by local declarations. */ if (objc_interface_decl *************** _yylex (void) *** 6437,6443 **** /* These tokens should not survive translation phase 4. */ case CPP_HASH: case CPP_PASTE: ! error ("syntax error at '%s' token", NAME(last_token)); goto get_next; default: --- 6170,6176 ---- /* These tokens should not survive translation phase 4. */ case CPP_HASH: case CPP_PASTE: ! error ("syntax error at %qs token", NAME(last_token)); goto get_next; default: *************** yyprint (FILE *file, int yychar, YYSTYPE *** 6469,6481 **** { case IDENTIFIER: case TYPENAME: - case OBJECTNAME: case TYPESPEC: case TYPE_QUAL: case SCSPEC: case STATIC: if (IDENTIFIER_POINTER (t)) ! fprintf (file, " `%s'", IDENTIFIER_POINTER (t)); break; case CONSTANT: --- 6202,6213 ---- { case IDENTIFIER: case TYPENAME: case TYPESPEC: case TYPE_QUAL: case SCSPEC: case STATIC: if (IDENTIFIER_POINTER (t)) ! fprintf (file, " '%s'", IDENTIFIER_POINTER (t)); break; case CONSTANT: *************** yyprint (FILE *file, int yychar, YYSTYPE *** 6490,6511 **** } } ! /* This is not the ideal place to put these, but we have to get them out ! of c-lex.c because cp/lex.c has its own versions. */ /* Parse the file. */ void c_parse_file (void) { yyparse (); - /* In case there were missing closebraces, get us back to the global - binding level. */ - while (! global_bindings_p ()) - poplevel (0, 0, 0); - /* __FUNCTION__ is defined at file scope (""). This - call may not be necessary as my tests indicate it - still works without it. */ - finish_fname_decls (); if (malloced_yyss) { --- 6222,6235 ---- } } ! /* This is not the ideal place to put this, but we have to get it out ! of c-lex.c because cp/lex.c has its own version. */ /* Parse the file. */ void c_parse_file (void) { yyparse (); if (malloced_yyss) { *************** c_parse_file (void) *** 6515,6518 **** --- 6239,6259 ---- } } + #ifdef __XGETTEXT__ + /* Depending on the version of Bison used to compile this grammar, + it may issue generic diagnostics spelled "syntax error" or + "parse error". To prevent this from changing the translation + template randomly, we list all the variants of this particular + diagnostic here. Translators: there is no fine distinction + between diagnostics with "syntax error" in them, and diagnostics + with "parse error" in them. It's okay to give them both the same + translation. */ + const char d1[] = N_("syntax error"); + const char d2[] = N_("parse error"); + const char d3[] = N_("syntax error; also virtual memory exhausted"); + const char d4[] = N_("parse error; also virtual memory exhausted"); + const char d5[] = N_("syntax error: cannot back up"); + const char d6[] = N_("parse error: cannot back up"); + #endif + #include "gt-c-parse.h" diff -Nrcpad gcc-3.4.3/gcc/objc/objc-parse.y gcc-4.0.0/gcc/objc/objc-parse.y *** gcc-3.4.3/gcc/objc/objc-parse.y Fri Nov 5 04:18:06 2004 --- gcc-4.0.0/gcc/objc/objc-parse.y Thu Apr 21 07:09:45 2005 *************** *** 1,7 **** /*WARNING: This file is automatically generated!*/ /* YACC parser for C syntax and for Objective C. -*-c-*- ! Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, ! 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of GCC. --- 1,7 ---- /*WARNING: This file is automatically generated!*/ /* YACC parser for C syntax and for Objective C. -*-c-*- ! Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, ! 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GCC. *************** Software Foundation, 59 Temple Place - S *** 36,41 **** --- 36,42 ---- #include "coretypes.h" #include "tm.h" #include "tree.h" + #include "langhooks.h" #include "input.h" #include "cpplib.h" #include "intl.h" *************** Software Foundation, 59 Temple Place - S *** 47,56 **** #include "output.h" #include "toplev.h" #include "ggc.h" - #include "objc-act.h" - - /* Like YYERROR but do call yyerror. */ #define YYERROR1 { yyerror ("syntax error"); YYERROR; } /* Like the default stack expander, except (1) use realloc when possible, --- 48,55 ---- #include "output.h" #include "toplev.h" #include "ggc.h" + #include "c-common.h" #define YYERROR1 { yyerror ("syntax error"); YYERROR; } /* Like the default stack expander, except (1) use realloc when possible, *************** do { \ *** 97,104 **** %start program ! %union {long itype; tree ttype; enum tree_code code; ! location_t location; } /* All identifiers that are not reserved words and are not declared typedefs in the current block */ --- 96,106 ---- %start program ! %union {long itype; tree ttype; void *otype; struct c_expr exprtype; ! struct c_arg_info *arginfotype; struct c_declarator *dtrtype; ! struct c_type_name *typenametype; struct c_parm *parmtype; ! struct c_declspecs *dsptype; struct c_typespec tstype; ! enum tree_code code; location_t location; } /* All identifiers that are not reserved words and are not declared typedefs in the current block */ *************** do { \ *** 122,127 **** --- 124,133 ---- yylval contains an IDENTIFIER_NODE which indicates which one. */ %token TYPE_QUAL + /* Objective-C protocol qualifiers. These acquire their magic powers + only in certain contexts. */ + %token OBJC_TYPE_QUAL + /* Character or numeric constants. yylval is the node for the constant. */ %token CONSTANT *************** do { \ *** 140,147 **** %token BREAK CONTINUE RETURN GOTO ASM_KEYWORD TYPEOF ALIGNOF %token ATTRIBUTE EXTENSION LABEL %token REALPART IMAGPART VA_ARG CHOOSE_EXPR TYPES_COMPATIBLE_P ! %token PTR_VALUE PTR_BASE PTR_EXTENT ! %token FUNC_NAME /* Add precedence rules to solve dangling else s/r conflict */ %nonassoc IF --- 146,152 ---- %token BREAK CONTINUE RETURN GOTO ASM_KEYWORD TYPEOF ALIGNOF %token ATTRIBUTE EXTENSION LABEL %token REALPART IMAGPART VA_ARG CHOOSE_EXPR TYPES_COMPATIBLE_P ! %token FUNC_NAME OFFSETOF /* Add precedence rules to solve dangling else s/r conflict */ %nonassoc IF *************** do { \ *** 169,176 **** /* The Objective-C keywords. These are included in C and in Objective C, so that the token codes are the same in both. */ ! %token INTERFACE IMPLEMENTATION END SELECTOR DEFS ENCODE ! %token CLASSNAME PUBLIC PRIVATE PROTECTED PROTOCOL OBJECTNAME CLASS ALIAS %token AT_THROW AT_TRY AT_CATCH AT_FINALLY AT_SYNCHRONIZED %token OBJC_STRING --- 174,182 ---- /* The Objective-C keywords. These are included in C and in Objective C, so that the token codes are the same in both. */ ! %token AT_INTERFACE AT_IMPLEMENTATION AT_END AT_SELECTOR AT_DEFS AT_ENCODE ! %token CLASSNAME AT_PUBLIC AT_PRIVATE AT_PROTECTED AT_PROTOCOL ! %token AT_CLASS AT_ALIAS %token AT_THROW AT_TRY AT_CATCH AT_FINALLY AT_SYNCHRONIZED %token OBJC_STRING *************** do { \ *** 178,263 **** %type ENUM STRUCT UNION IF ELSE WHILE DO FOR SWITCH CASE DEFAULT %type BREAK CONTINUE RETURN GOTO ASM_KEYWORD SIZEOF TYPEOF ALIGNOF ! %type identifier IDENTIFIER TYPENAME CONSTANT expr nonnull_exprlist exprlist ! %type expr_no_commas cast_expr unary_expr primary STRING ! %type declspecs_nosc_nots_nosa_noea declspecs_nosc_nots_nosa_ea ! %type declspecs_nosc_nots_sa_noea declspecs_nosc_nots_sa_ea ! %type declspecs_nosc_ts_nosa_noea declspecs_nosc_ts_nosa_ea ! %type declspecs_nosc_ts_sa_noea declspecs_nosc_ts_sa_ea ! %type declspecs_sc_nots_nosa_noea declspecs_sc_nots_nosa_ea ! %type declspecs_sc_nots_sa_noea declspecs_sc_nots_sa_ea ! %type declspecs_sc_ts_nosa_noea declspecs_sc_ts_nosa_ea ! %type declspecs_sc_ts_sa_noea declspecs_sc_ts_sa_ea ! %type declspecs_ts declspecs_nots ! %type declspecs_ts_nosa declspecs_nots_nosa ! %type declspecs_nosc_ts declspecs_nosc_nots declspecs_nosc declspecs ! %type maybe_type_quals_attrs typespec_nonattr typespec_attr ! %type typespec_reserved_nonattr typespec_reserved_attr ! %type typespec_nonreserved_nonattr ! %type scspec SCSPEC STATIC TYPESPEC TYPE_QUAL maybe_type_qual %type initdecls notype_initdecls initdcl notype_initdcl ! %type init maybeasm %type asm_operands nonnull_asm_operands asm_operand asm_clobbers %type maybe_attribute attributes attribute attribute_list attrib %type any_word ! %type compstmt compstmt_start compstmt_nostart compstmt_primary_start ! %type do_stmt_start poplevel stmt label ! %type c99_block_start c99_block_end ! %type declarator ! %type notype_declarator after_type_declarator ! %type parm_declarator ! %type parm_declarator_starttypename parm_declarator_nostarttypename ! %type array_declarator ! %type structsp_attr structsp_nonattr %type component_decl_list component_decl_list2 %type component_decl components components_notype component_declarator %type component_notype_declarator %type enumlist enumerator %type struct_head union_head enum_head ! %type typename absdcl absdcl1 absdcl1_ea absdcl1_noea ! %type direct_absdcl1 absdcl_maybe_attribute ! %type xexpr parms parm firstparm identifiers ! %type parmlist parmlist_1 parmlist_2 ! %type parmlist_or_identifiers parmlist_or_identifiers_1 %type identifiers_or_typenames %type setspecs setspecs_fp extension %type save_location /* the Objective-C nonterminals */ - %type ivar_decl_list ivar_decls ivar_decl ivars ivar_declarator %type methoddecl unaryselector keywordselector selector %type keyworddecl receiver objcmessageexpr messageargs %type keywordexpr keywordarglist keywordarg ! %type myparms myparm optparmlist reservedwords objcselectorexpr %type selectorarg keywordnamelist keywordname objcencodeexpr %type non_empty_protocolrefs protocolrefs identifier_list objcprotocolexpr ! %type CLASSNAME OBJECTNAME OBJC_STRING ! %type superclass ! %type objc_try_catch_stmt objc_finally_block %{ ! /* Number of statements (loosely speaking) and compound statements ! seen so far. */ ! static int stmt_count; ! static int compstmt_count; ! ! /* Input location of the end of the body of last simple_if; ! used by the stmt-rule immediately after simple_if returns. */ ! static location_t if_stmt_locus; ! ! ! /* List of types and structure classes of the current declaration. */ ! static GTY(()) tree current_declspecs; static GTY(()) tree prefix_attributes; /* List of all the attributes applying to the identifier currently being --- 184,269 ---- %type ENUM STRUCT UNION IF ELSE WHILE DO FOR SWITCH CASE DEFAULT %type BREAK CONTINUE RETURN GOTO ASM_KEYWORD SIZEOF TYPEOF ALIGNOF ! %type identifier IDENTIFIER TYPENAME CONSTANT STRING FUNC_NAME ! %type nonnull_exprlist exprlist ! %type expr expr_no_commas cast_expr unary_expr primary ! %type declspecs_nosc_nots_nosa_noea declspecs_nosc_nots_nosa_ea ! %type declspecs_nosc_nots_sa_noea declspecs_nosc_nots_sa_ea ! %type declspecs_nosc_ts_nosa_noea declspecs_nosc_ts_nosa_ea ! %type declspecs_nosc_ts_sa_noea declspecs_nosc_ts_sa_ea ! %type declspecs_sc_nots_nosa_noea declspecs_sc_nots_nosa_ea ! %type declspecs_sc_nots_sa_noea declspecs_sc_nots_sa_ea ! %type declspecs_sc_ts_nosa_noea declspecs_sc_ts_nosa_ea ! %type declspecs_sc_ts_sa_noea declspecs_sc_ts_sa_ea ! %type declspecs_ts declspecs_nots ! %type declspecs_ts_nosa declspecs_nots_nosa ! %type declspecs_nosc_ts declspecs_nosc_nots declspecs_nosc declspecs ! %type maybe_type_quals_attrs ! %type typespec_nonattr typespec_attr ! %type typespec_reserved_nonattr typespec_reserved_attr ! %type typespec_nonreserved_nonattr ! %type offsetof_member_designator ! %type scspec SCSPEC STATIC TYPESPEC TYPE_QUAL maybe_volatile %type initdecls notype_initdecls initdcl notype_initdcl ! %type init ! %type simple_asm_expr maybeasm asm_stmt asm_argument asm_string %type asm_operands nonnull_asm_operands asm_operand asm_clobbers %type maybe_attribute attributes attribute attribute_list attrib %type any_word ! %type compstmt compstmt_start compstmt_primary_start ! %type stmt label stmt_nocomp start_break start_continue ! %type c99_block_start c99_block_lineno_labeled_stmt ! %type if_statement_1 if_statement_2 ! %type declarator ! %type notype_declarator after_type_declarator ! %type parm_declarator ! %type parm_declarator_starttypename parm_declarator_nostarttypename ! %type array_declarator ! %type structsp_attr structsp_nonattr %type component_decl_list component_decl_list2 %type component_decl components components_notype component_declarator %type component_notype_declarator %type enumlist enumerator %type struct_head union_head enum_head ! %type typename ! %type absdcl absdcl1 absdcl1_ea absdcl1_noea direct_absdcl1 ! %type absdcl_maybe_attribute ! %type condition xexpr for_cond_expr for_incr_expr ! %type parm firstparm ! %type identifiers ! %type parms parmlist parmlist_1 parmlist_2 ! %type parmlist_or_identifiers parmlist_or_identifiers_1 %type identifiers_or_typenames %type setspecs setspecs_fp extension %type save_location + + %type save_obstack_position /* the Objective-C nonterminals */ %type methoddecl unaryselector keywordselector selector + %type methodtype %type keyworddecl receiver objcmessageexpr messageargs %type keywordexpr keywordarglist keywordarg ! %type optparmlist optparms reservedwords objcselectorexpr %type selectorarg keywordnamelist keywordname objcencodeexpr %type non_empty_protocolrefs protocolrefs identifier_list objcprotocolexpr ! %type CLASSNAME OBJC_STRING OBJC_TYPE_QUAL ! %type superclass objc_quals objc_qual objc_typename ! %type objc_try_catch_stmt optellipsis %{ ! /* Declaration specifiers of the current declaration. */ ! static struct c_declspecs *current_declspecs; static GTY(()) tree prefix_attributes; /* List of all the attributes applying to the identifier currently being *************** static GTY(()) tree prefix_attributes; *** 265,290 **** just after a comma. */ static GTY(()) tree all_prefix_attributes; /* Stack of saved values of current_declspecs, prefix_attributes and all_prefix_attributes. */ ! static GTY(()) tree declspec_stack; /* PUSH_DECLSPEC_STACK is called from setspecs; POP_DECLSPEC_STACK should be called from the productions making use of setspecs. */ ! #define PUSH_DECLSPEC_STACK \ ! do { \ ! declspec_stack = tree_cons (build_tree_list (prefix_attributes, \ ! all_prefix_attributes), \ ! current_declspecs, \ ! declspec_stack); \ } while (0) #define POP_DECLSPEC_STACK \ do { \ ! current_declspecs = TREE_VALUE (declspec_stack); \ ! prefix_attributes = TREE_PURPOSE (TREE_PURPOSE (declspec_stack)); \ ! all_prefix_attributes = TREE_VALUE (TREE_PURPOSE (declspec_stack)); \ ! declspec_stack = TREE_CHAIN (declspec_stack); \ } while (0) /* For __extension__, save/restore the warning flags which are --- 271,314 ---- just after a comma. */ static GTY(()) tree all_prefix_attributes; + /* Structure to save declaration specifiers. */ + struct c_declspec_stack { + /* Saved value of current_declspecs. */ + struct c_declspecs *current_declspecs; + /* Saved value of prefix_attributes. */ + tree prefix_attributes; + /* Saved value of all_prefix_attributes. */ + tree all_prefix_attributes; + /* Next level of stack. */ + struct c_declspec_stack *next; + }; + /* Stack of saved values of current_declspecs, prefix_attributes and all_prefix_attributes. */ ! static struct c_declspec_stack *declspec_stack; ! ! /* INDIRECT_REF with a TREE_TYPE of the type being queried for offsetof. */ ! static tree offsetof_base; /* PUSH_DECLSPEC_STACK is called from setspecs; POP_DECLSPEC_STACK should be called from the productions making use of setspecs. */ ! #define PUSH_DECLSPEC_STACK \ ! do { \ ! struct c_declspec_stack *t = XOBNEW (&parser_obstack, \ ! struct c_declspec_stack); \ ! t->current_declspecs = current_declspecs; \ ! t->prefix_attributes = prefix_attributes; \ ! t->all_prefix_attributes = all_prefix_attributes; \ ! t->next = declspec_stack; \ ! declspec_stack = t; \ } while (0) #define POP_DECLSPEC_STACK \ do { \ ! current_declspecs = declspec_stack->current_declspecs; \ ! prefix_attributes = declspec_stack->prefix_attributes; \ ! all_prefix_attributes = declspec_stack->all_prefix_attributes; \ ! declspec_stack = declspec_stack->next; \ } while (0) /* For __extension__, save/restore the warning flags which are *************** static GTY(()) tree declspec_stack; *** 305,312 **** /* Objective-C specific parser/lexer information */ ! static enum tree_code objc_inherit_code; ! static int objc_pq_context = 0, objc_public_flag = 0; /* The following flag is needed to contextualize ObjC lexical analysis. In some cases (e.g., 'int NSObject;'), it is undesirable to bind --- 329,335 ---- /* Objective-C specific parser/lexer information */ ! static int objc_pq_context = 0; /* The following flag is needed to contextualize ObjC lexical analysis. In some cases (e.g., 'int NSObject;'), it is undesirable to bind *************** static int objc_need_raw_identifier; *** 316,323 **** #define OBJC_NEED_RAW_IDENTIFIER(VAL) objc_need_raw_identifier = VAL - static bool parsing_iso_function_signature; - /* Tell yyparse how to print a token's value, if yydebug is set. */ #define YYPRINT(FILE,YYCHAR,YYLVAL) yyprint(FILE,YYCHAR,YYLVAL) --- 339,344 ---- *************** static inline int _yylex (void); *** 329,335 **** static int yylex (void); static void init_reswords (void); ! /* Initialisation routine for this file. */ void c_parse_init (void) { --- 350,356 ---- static int yylex (void); static void init_reswords (void); ! /* Initialization routine for this file. */ void c_parse_init (void) { *************** program: /* empty */ *** 348,406 **** /* the reason for the strange actions in this rule is so that notype_initdecls when reached via datadef ! can find a valid list of type and sc specs in $0. */ extdefs: ! {$$ = NULL_TREE; } extdef ! | extdefs {$$ = NULL_TREE; ggc_collect(); } extdef ; extdef: - extdef_1 - { parsing_iso_function_signature = false; } /* Reset after any external definition. */ - ; - - extdef_1: fndef | datadef ! | objcdef ! | ASM_KEYWORD '(' expr ')' ';' ! { STRIP_NOPS ($3); ! if ((TREE_CODE ($3) == ADDR_EXPR ! && TREE_CODE (TREE_OPERAND ($3, 0)) == STRING_CST) ! || TREE_CODE ($3) == STRING_CST) ! assemble_asm ($3); ! else ! error ("argument of `asm' is not a constant string"); } | extension extdef { RESTORE_EXT_FLAGS ($1); } ; datadef: setspecs notype_initdecls ';' ! { if (pedantic) ! error ("ISO C forbids data definition with no type or storage class"); ! else ! warning ("data definition has no type or storage class"); ! POP_DECLSPEC_STACK; } | declspecs_nots setspecs notype_initdecls ';' { POP_DECLSPEC_STACK; } | declspecs_ts setspecs initdecls ';' { POP_DECLSPEC_STACK; } | declspecs ';' ! { shadow_tag ($1); } | error ';' | error '}' | ';' { if (pedantic) ! pedwarn ("ISO C does not allow extra `;' outside of a function"); } ; fndef: declspecs_ts setspecs declarator ! { if (! start_function (current_declspecs, $3, ! all_prefix_attributes)) YYERROR1; } old_style_parm_decls save_location --- 369,420 ---- /* the reason for the strange actions in this rule is so that notype_initdecls when reached via datadef ! can find valid declaration specifiers in $0. */ extdefs: ! save_obstack_position { $$ = NULL; } extdef ! { obstack_free (&parser_obstack, $1); } ! | extdefs save_obstack_position ! { $$ = NULL; ggc_collect (); } extdef ! { obstack_free (&parser_obstack, $2); } ; extdef: fndef | datadef ! | asmdef | extension extdef { RESTORE_EXT_FLAGS ($1); } + | objcdef + ; + + /* Record the current position of parser_obstack before a + declaration to restore it afterwards. */ + save_obstack_position: + { $$ = obstack_alloc (&parser_obstack, 0); } ; datadef: setspecs notype_initdecls ';' ! { pedwarn ("data definition has no type or storage class"); POP_DECLSPEC_STACK; } | declspecs_nots setspecs notype_initdecls ';' { POP_DECLSPEC_STACK; } | declspecs_ts setspecs initdecls ';' { POP_DECLSPEC_STACK; } | declspecs ';' ! { shadow_tag (finish_declspecs ($1)); } | error ';' | error '}' | ';' { if (pedantic) ! pedwarn ("ISO C does not allow extra %<;%> outside of a function"); } ; fndef: declspecs_ts setspecs declarator ! { if (!start_function (current_declspecs, $3, ! all_prefix_attributes)) YYERROR1; } old_style_parm_decls save_location *************** fndef: *** 412,419 **** | declspecs_ts setspecs declarator error { POP_DECLSPEC_STACK; } | declspecs_nots setspecs notype_declarator ! { if (! start_function (current_declspecs, $3, ! all_prefix_attributes)) YYERROR1; } old_style_parm_decls save_location --- 426,433 ---- | declspecs_ts setspecs declarator error { POP_DECLSPEC_STACK; } | declspecs_nots setspecs notype_declarator ! { if (!start_function (current_declspecs, $3, ! all_prefix_attributes)) YYERROR1; } old_style_parm_decls save_location *************** fndef: *** 425,432 **** | declspecs_nots setspecs notype_declarator error { POP_DECLSPEC_STACK; } | setspecs notype_declarator ! { if (! start_function (NULL_TREE, $2, ! all_prefix_attributes)) YYERROR1; } old_style_parm_decls save_location --- 439,446 ---- | declspecs_nots setspecs notype_declarator error { POP_DECLSPEC_STACK; } | setspecs notype_declarator ! { if (!start_function (current_declspecs, $2, ! all_prefix_attributes)) YYERROR1; } old_style_parm_decls save_location *************** fndef: *** 442,448 **** identifier: IDENTIFIER | TYPENAME - | OBJECTNAME | CLASSNAME ; --- 456,461 ---- *************** unop: '&' *** 463,470 **** { $$ = TRUTH_NOT_EXPR; } ; ! expr: nonnull_exprlist ! { $$ = build_compound_expr ($1); } ; exprlist: --- 476,485 ---- { $$ = TRUTH_NOT_EXPR; } ; ! expr: expr_no_commas ! | expr ',' expr_no_commas ! { $$.value = build_compound_expr ($1.value, $3.value); ! $$.original_code = COMPOUND_EXPR; } ; exprlist: *************** exprlist: *** 475,536 **** nonnull_exprlist: expr_no_commas ! { $$ = build_tree_list (NULL_TREE, $1); } | nonnull_exprlist ',' expr_no_commas ! { chainon ($1, build_tree_list (NULL_TREE, $3)); } ; unary_expr: primary | '*' cast_expr %prec UNARY ! { $$ = build_indirect_ref ($2, "unary *"); } /* __extension__ turns off -pedantic for following primary. */ | extension cast_expr %prec UNARY { $$ = $2; RESTORE_EXT_FLAGS ($1); } | unop cast_expr %prec UNARY ! { $$ = build_unary_op ($1, $2, 0); ! overflow_warning ($$); } /* Refer to the address of a label as a pointer. */ | ANDAND identifier ! { $$ = finish_label_address_expr ($2); } | sizeof unary_expr %prec UNARY { skip_evaluation--; ! if (TREE_CODE ($2) == COMPONENT_REF ! && DECL_C_BIT_FIELD (TREE_OPERAND ($2, 1))) ! error ("`sizeof' applied to a bit-field"); ! $$ = c_sizeof (TREE_TYPE ($2)); } | sizeof '(' typename ')' %prec HYPERUNARY { skip_evaluation--; ! $$ = c_sizeof (groktypename ($3)); } | alignof unary_expr %prec UNARY { skip_evaluation--; ! $$ = c_alignof_expr ($2); } | alignof '(' typename ')' %prec HYPERUNARY { skip_evaluation--; ! $$ = c_alignof (groktypename ($3)); } | REALPART cast_expr %prec UNARY ! { $$ = build_unary_op (REALPART_EXPR, $2, 0); } | IMAGPART cast_expr %prec UNARY ! { $$ = build_unary_op (IMAGPART_EXPR, $2, 0); } ; sizeof: ! SIZEOF { skip_evaluation++; } ; alignof: ! ALIGNOF { skip_evaluation++; } ; typeof: ! TYPEOF { skip_evaluation++; } ; cast_expr: unary_expr | '(' typename ')' cast_expr %prec UNARY ! { $$ = c_cast_expr ($2, $4); } ; expr_no_commas: --- 490,563 ---- nonnull_exprlist: expr_no_commas ! { $$ = build_tree_list (NULL_TREE, $1.value); } | nonnull_exprlist ',' expr_no_commas ! { chainon ($1, build_tree_list (NULL_TREE, $3.value)); } ; unary_expr: primary | '*' cast_expr %prec UNARY ! { $$.value = build_indirect_ref ($2.value, "unary *"); ! $$.original_code = ERROR_MARK; } /* __extension__ turns off -pedantic for following primary. */ | extension cast_expr %prec UNARY { $$ = $2; RESTORE_EXT_FLAGS ($1); } | unop cast_expr %prec UNARY ! { $$.value = build_unary_op ($1, $2.value, 0); ! overflow_warning ($$.value); ! $$.original_code = ERROR_MARK; } /* Refer to the address of a label as a pointer. */ | ANDAND identifier ! { $$.value = finish_label_address_expr ($2); ! $$.original_code = ERROR_MARK; } | sizeof unary_expr %prec UNARY { skip_evaluation--; ! in_sizeof--; ! if (TREE_CODE ($2.value) == COMPONENT_REF ! && DECL_C_BIT_FIELD (TREE_OPERAND ($2.value, 1))) ! error ("% applied to a bit-field"); ! $$ = c_expr_sizeof_expr ($2); } | sizeof '(' typename ')' %prec HYPERUNARY { skip_evaluation--; ! in_sizeof--; ! $$ = c_expr_sizeof_type ($3); } | alignof unary_expr %prec UNARY { skip_evaluation--; ! in_alignof--; ! $$.value = c_alignof_expr ($2.value); ! $$.original_code = ERROR_MARK; } | alignof '(' typename ')' %prec HYPERUNARY { skip_evaluation--; ! in_alignof--; ! $$.value = c_alignof (groktypename ($3)); ! $$.original_code = ERROR_MARK; } | REALPART cast_expr %prec UNARY ! { $$.value = build_unary_op (REALPART_EXPR, $2.value, 0); ! $$.original_code = ERROR_MARK; } | IMAGPART cast_expr %prec UNARY ! { $$.value = build_unary_op (IMAGPART_EXPR, $2.value, 0); ! $$.original_code = ERROR_MARK; } ; sizeof: ! SIZEOF { skip_evaluation++; in_sizeof++; } ; alignof: ! ALIGNOF { skip_evaluation++; in_alignof++; } ; typeof: ! TYPEOF { skip_evaluation++; in_typeof++; } ; cast_expr: unary_expr | '(' typename ')' cast_expr %prec UNARY ! { $$.value = c_cast_expr ($2, $4.value); ! $$.original_code = ERROR_MARK; } ; expr_no_commas: *************** expr_no_commas: *** 560,614 **** | expr_no_commas '^' expr_no_commas { $$ = parser_build_binary_op ($2, $1, $3); } | expr_no_commas ANDAND ! { $1 = c_common_truthvalue_conversion ! (default_conversion ($1)); ! skip_evaluation += $1 == truthvalue_false_node; } expr_no_commas ! { skip_evaluation -= $1 == truthvalue_false_node; $$ = parser_build_binary_op (TRUTH_ANDIF_EXPR, $1, $4); } | expr_no_commas OROR ! { $1 = c_common_truthvalue_conversion ! (default_conversion ($1)); ! skip_evaluation += $1 == truthvalue_true_node; } expr_no_commas ! { skip_evaluation -= $1 == truthvalue_true_node; $$ = parser_build_binary_op (TRUTH_ORIF_EXPR, $1, $4); } | expr_no_commas '?' ! { $1 = c_common_truthvalue_conversion ! (default_conversion ($1)); ! skip_evaluation += $1 == truthvalue_false_node; } expr ':' ! { skip_evaluation += (($1 == truthvalue_true_node) ! - ($1 == truthvalue_false_node)); } expr_no_commas ! { skip_evaluation -= $1 == truthvalue_true_node; ! $$ = build_conditional_expr ($1, $4, $7); } | expr_no_commas '?' { if (pedantic) pedwarn ("ISO C forbids omitting the middle term of a ?: expression"); /* Make sure first operand is calculated only once. */ ! $2 = save_expr ($1); ! $1 = c_common_truthvalue_conversion ! (default_conversion ($2)); ! skip_evaluation += $1 == truthvalue_true_node; } ':' expr_no_commas ! { skip_evaluation -= $1 == truthvalue_true_node; ! $$ = build_conditional_expr ($1, $2, $5); } | expr_no_commas '=' expr_no_commas ! { char class; ! $$ = build_modify_expr ($1, NOP_EXPR, $3); ! class = TREE_CODE_CLASS (TREE_CODE ($$)); ! if (IS_EXPR_CODE_CLASS (class)) ! C_SET_EXP_ORIGINAL_CODE ($$, MODIFY_EXPR); } | expr_no_commas ASSIGN expr_no_commas ! { char class; ! $$ = build_modify_expr ($1, $2, $3); ! /* This inhibits warnings in ! c_common_truthvalue_conversion. */ ! class = TREE_CODE_CLASS (TREE_CODE ($$)); ! if (IS_EXPR_CODE_CLASS (class)) ! C_SET_EXP_ORIGINAL_CODE ($$, ERROR_MARK); } ; --- 587,637 ---- | expr_no_commas '^' expr_no_commas { $$ = parser_build_binary_op ($2, $1, $3); } | expr_no_commas ANDAND ! { $1.value = lang_hooks.truthvalue_conversion ! (default_conversion ($1.value)); ! skip_evaluation += $1.value == truthvalue_false_node; } expr_no_commas ! { skip_evaluation -= $1.value == truthvalue_false_node; $$ = parser_build_binary_op (TRUTH_ANDIF_EXPR, $1, $4); } | expr_no_commas OROR ! { $1.value = lang_hooks.truthvalue_conversion ! (default_conversion ($1.value)); ! skip_evaluation += $1.value == truthvalue_true_node; } expr_no_commas ! { skip_evaluation -= $1.value == truthvalue_true_node; $$ = parser_build_binary_op (TRUTH_ORIF_EXPR, $1, $4); } | expr_no_commas '?' ! { $1.value = lang_hooks.truthvalue_conversion ! (default_conversion ($1.value)); ! skip_evaluation += $1.value == truthvalue_false_node; } expr ':' ! { skip_evaluation += (($1.value == truthvalue_true_node) ! - ($1.value == truthvalue_false_node)); } expr_no_commas ! { skip_evaluation -= $1.value == truthvalue_true_node; ! $$.value = build_conditional_expr ($1.value, $4.value, ! $7.value); ! $$.original_code = ERROR_MARK; } | expr_no_commas '?' { if (pedantic) pedwarn ("ISO C forbids omitting the middle term of a ?: expression"); /* Make sure first operand is calculated only once. */ ! $2 = save_expr (default_conversion ($1.value)); ! $1.value = lang_hooks.truthvalue_conversion ($2); ! skip_evaluation += $1.value == truthvalue_true_node; } ':' expr_no_commas ! { skip_evaluation -= $1.value == truthvalue_true_node; ! $$.value = build_conditional_expr ($1.value, $2, ! $5.value); ! $$.original_code = ERROR_MARK; } | expr_no_commas '=' expr_no_commas ! { $$.value = build_modify_expr ($1.value, NOP_EXPR, $3.value); ! $$.original_code = MODIFY_EXPR; } | expr_no_commas ASSIGN expr_no_commas ! { $$.value = build_modify_expr ($1.value, $2, $3.value); ! TREE_NO_WARNING ($$.value) = 1; ! $$.original_code = ERROR_MARK; } ; *************** primary: *** 617,750 **** { if (yychar == YYEMPTY) yychar = YYLEX; ! $$ = build_external_ref ($1, yychar == '('); } | CONSTANT | STRING | FUNC_NAME ! { $$ = fname_decl (C_RID_CODE ($$), $$); } | '(' typename ')' '{' { start_init (NULL_TREE, NULL, 0); ! $2 = groktypename ($2); ! really_start_incremental_init ($2); } initlist_maybe_comma '}' %prec UNARY ! { tree constructor = pop_init_level (0); ! tree type = $2; finish_init (); ! if (pedantic && ! flag_isoc99) pedwarn ("ISO C90 forbids compound literals"); ! $$ = build_compound_literal (type, constructor); } | '(' expr ')' ! { char class = TREE_CODE_CLASS (TREE_CODE ($2)); ! if (IS_EXPR_CODE_CLASS (class)) ! C_SET_EXP_ORIGINAL_CODE ($2, ERROR_MARK); ! $$ = $2; } | '(' error ')' ! { $$ = error_mark_node; } | compstmt_primary_start compstmt_nostart ')' ! { tree saved_last_tree; ! ! if (pedantic) ! pedwarn ("ISO C forbids braced-groups within expressions"); ! saved_last_tree = COMPOUND_BODY ($1); ! RECHAIN_STMTS ($1, COMPOUND_BODY ($1)); ! last_tree = saved_last_tree; ! TREE_CHAIN (last_tree) = NULL_TREE; ! if (!last_expr_type) ! last_expr_type = void_type_node; ! $$ = build1 (STMT_EXPR, last_expr_type, $1); ! TREE_SIDE_EFFECTS ($$) = 1; } | compstmt_primary_start error ')' ! { ! last_tree = COMPOUND_BODY ($1); ! TREE_CHAIN (last_tree) = NULL_TREE; ! $$ = error_mark_node; } | primary '(' exprlist ')' %prec '.' ! { $$ = build_function_call ($1, $3); } | VA_ARG '(' expr_no_commas ',' typename ')' ! { $$ = build_va_arg ($3, groktypename ($5)); } ! | CHOOSE_EXPR '(' expr_no_commas ',' expr_no_commas ',' expr_no_commas ')' { tree c; ! c = fold ($3); STRIP_NOPS (c); if (TREE_CODE (c) != INTEGER_CST) ! error ("first argument to __builtin_choose_expr not a constant"); $$ = integer_zerop (c) ? $7 : $5; } ! | TYPES_COMPATIBLE_P '(' typename ',' typename ')' { tree e1, e2; e1 = TYPE_MAIN_VARIANT (groktypename ($3)); e2 = TYPE_MAIN_VARIANT (groktypename ($5)); ! $$ = comptypes (e1, e2, COMPARE_STRICT) ! ? build_int_2 (1, 0) : build_int_2 (0, 0); } | primary '[' expr ']' %prec '.' ! { $$ = build_array_ref ($1, $3); } | primary '.' identifier ! { ! if (!is_public ($1, $3)) ! $$ = error_mark_node; ! else ! $$ = build_component_ref ($1, $3); ! } | primary POINTSAT identifier { ! tree expr = build_indirect_ref ($1, "->"); ! ! if (!is_public (expr, $3)) ! $$ = error_mark_node; ! else ! $$ = build_component_ref (expr, $3); } | primary PLUSPLUS ! { $$ = build_unary_op (POSTINCREMENT_EXPR, $1, 0); } | primary MINUSMINUS ! { $$ = build_unary_op (POSTDECREMENT_EXPR, $1, 0); } | objcmessageexpr ! { $$ = build_message_expr ($1); } | objcselectorexpr ! { $$ = build_selector_expr ($1); } | objcprotocolexpr ! { $$ = build_protocol_expr ($1); } | objcencodeexpr ! { $$ = build_encode_expr ($1); } | OBJC_STRING ! { $$ = build_objc_string_object ($1); } ; ! old_style_parm_decls: ! old_style_parm_decls_1 ! { ! parsing_iso_function_signature = false; /* Reset after decls. */ ! } ; ! old_style_parm_decls_1: /* empty */ - { - if (warn_traditional && !in_system_header - && parsing_iso_function_signature) - warning ("traditional C rejects ISO C style function definitions"); - if (warn_old_style_definition && !in_system_header - && !parsing_iso_function_signature) - warning ("old-style parameter declaration"); - parsing_iso_function_signature = false; /* Reset after warning. */ - } | datadecls - { - if (warn_old_style_definition && !in_system_header) - warning ("old-style parameter declaration"); - } ; /* The following are analogous to lineno_decl, decls and decl --- 640,792 ---- { if (yychar == YYEMPTY) yychar = YYLEX; ! $$.value = build_external_ref ($1, yychar == '('); ! $$.original_code = ERROR_MARK; } | CONSTANT + { $$.value = $1; $$.original_code = ERROR_MARK; } | STRING + { $$.value = $1; $$.original_code = STRING_CST; } | FUNC_NAME ! { $$.value = fname_decl (C_RID_CODE ($1), $1); ! $$.original_code = ERROR_MARK; } | '(' typename ')' '{' { start_init (NULL_TREE, NULL, 0); ! $$ = groktypename ($2); ! if (C_TYPE_VARIABLE_SIZE ($$)) ! { ! error ("compound literal has variable size"); ! $$ = error_mark_node; ! } ! really_start_incremental_init ($$); } initlist_maybe_comma '}' %prec UNARY ! { struct c_expr init = pop_init_level (0); ! tree constructor = init.value; ! tree type = $5; finish_init (); + maybe_warn_string_init (type, init); ! if (pedantic && !flag_isoc99) pedwarn ("ISO C90 forbids compound literals"); ! $$.value = build_compound_literal (type, constructor); ! $$.original_code = ERROR_MARK; } | '(' expr ')' ! { $$.value = $2.value; ! if (TREE_CODE ($$.value) == MODIFY_EXPR) ! TREE_NO_WARNING ($$.value) = 1; ! $$.original_code = ERROR_MARK; } | '(' error ')' ! { $$.value = error_mark_node; $$.original_code = ERROR_MARK; } | compstmt_primary_start compstmt_nostart ')' ! { if (pedantic) ! pedwarn ("ISO C forbids braced-groups within expressions"); ! $$.value = c_finish_stmt_expr ($1); ! $$.original_code = ERROR_MARK; } | compstmt_primary_start error ')' ! { c_finish_stmt_expr ($1); ! $$.value = error_mark_node; ! $$.original_code = ERROR_MARK; } | primary '(' exprlist ')' %prec '.' ! { $$.value = build_function_call ($1.value, $3); ! $$.original_code = ERROR_MARK; } | VA_ARG '(' expr_no_commas ',' typename ')' ! { $$.value = build_va_arg ($3.value, groktypename ($5)); ! $$.original_code = ERROR_MARK; } ! | OFFSETOF '(' typename ',' ! { tree type = groktypename ($3); ! if (type == error_mark_node) ! offsetof_base = error_mark_node; ! else ! offsetof_base = build1 (INDIRECT_REF, type, NULL); ! } ! offsetof_member_designator ')' ! { $$.value = fold_offsetof ($6); ! $$.original_code = ERROR_MARK; } ! | OFFSETOF '(' error ')' ! { $$.value = error_mark_node; $$.original_code = ERROR_MARK; } ! | CHOOSE_EXPR '(' expr_no_commas ',' expr_no_commas ',' ! expr_no_commas ')' { tree c; ! c = fold ($3.value); STRIP_NOPS (c); if (TREE_CODE (c) != INTEGER_CST) ! error ("first argument to %<__builtin_choose_expr%> not" ! " a constant"); $$ = integer_zerop (c) ? $7 : $5; } ! | CHOOSE_EXPR '(' error ')' ! { $$.value = error_mark_node; $$.original_code = ERROR_MARK; } ! | TYPES_COMPATIBLE_P '(' typename ',' typename ')' { tree e1, e2; e1 = TYPE_MAIN_VARIANT (groktypename ($3)); e2 = TYPE_MAIN_VARIANT (groktypename ($5)); ! $$.value = comptypes (e1, e2) ! ? build_int_cst (NULL_TREE, 1) ! : build_int_cst (NULL_TREE, 0); ! $$.original_code = ERROR_MARK; } + | TYPES_COMPATIBLE_P '(' error ')' + { $$.value = error_mark_node; $$.original_code = ERROR_MARK; } | primary '[' expr ']' %prec '.' ! { $$.value = build_array_ref ($1.value, $3.value); ! $$.original_code = ERROR_MARK; } | primary '.' identifier ! { $$.value = build_component_ref ($1.value, $3); ! $$.original_code = ERROR_MARK; } | primary POINTSAT identifier { ! tree expr = build_indirect_ref ($1.value, "->"); ! $$.value = build_component_ref (expr, $3); ! $$.original_code = ERROR_MARK; } | primary PLUSPLUS ! { $$.value = build_unary_op (POSTINCREMENT_EXPR, $1.value, 0); ! $$.original_code = ERROR_MARK; } | primary MINUSMINUS ! { $$.value = build_unary_op (POSTDECREMENT_EXPR, $1.value, 0); ! $$.original_code = ERROR_MARK; } | objcmessageexpr ! { $$.value = objc_build_message_expr ($1); ! $$.original_code = ERROR_MARK; } | objcselectorexpr ! { $$.value = objc_build_selector_expr ($1); ! $$.original_code = ERROR_MARK; } | objcprotocolexpr ! { $$.value = objc_build_protocol_expr ($1); ! $$.original_code = ERROR_MARK; } | objcencodeexpr ! { $$.value = objc_build_encode_expr ($1); ! $$.original_code = ERROR_MARK; } | OBJC_STRING ! { $$.value = objc_build_string_object ($1); ! $$.original_code = ERROR_MARK; } ; ! /* This is the second argument to __builtin_offsetof. We must have one ! identifier, and beyond that we want to accept sub structure and sub ! array references. */ ! ! offsetof_member_designator: ! identifier ! { $$ = build_component_ref (offsetof_base, $1); } ! | offsetof_member_designator '.' identifier ! { $$ = build_component_ref ($1, $3); } ! | offsetof_member_designator '[' expr ']' ! { $$ = build_array_ref ($1, $3.value); } ; ! old_style_parm_decls: /* empty */ | datadecls ; /* The following are analogous to lineno_decl, decls and decl *************** datadecl: *** 772,778 **** | declspecs_nots_nosa setspecs notype_initdecls ';' { POP_DECLSPEC_STACK; } | declspecs_ts_nosa ';' ! { shadow_tag_warned ($1, 1); pedwarn ("empty declaration"); } | declspecs_nots_nosa ';' { pedwarn ("empty declaration"); } --- 814,820 ---- | declspecs_nots_nosa setspecs notype_initdecls ';' { POP_DECLSPEC_STACK; } | declspecs_ts_nosa ';' ! { shadow_tag_warned (finish_declspecs ($1), 1); pedwarn ("empty declaration"); } | declspecs_nots_nosa ';' { pedwarn ("empty declaration"); } *************** lineno_decl: *** 794,801 **** setspecs: /* empty */ { pending_xref_error (); PUSH_DECLSPEC_STACK; ! split_specs_attrs ($0, ! ¤t_declspecs, &prefix_attributes); all_prefix_attributes = prefix_attributes; } ; --- 836,853 ---- setspecs: /* empty */ { pending_xref_error (); PUSH_DECLSPEC_STACK; ! if ($0) ! { ! prefix_attributes = $0->attrs; ! $0->attrs = NULL_TREE; ! current_declspecs = $0; ! } ! else ! { ! prefix_attributes = NULL_TREE; ! current_declspecs = build_null_declspecs (); ! } ! current_declspecs = finish_declspecs (current_declspecs); all_prefix_attributes = prefix_attributes; } ; *************** decl: *** 816,822 **** | declspecs_nots setspecs notype_nested_function { POP_DECLSPEC_STACK; } | declspecs ';' ! { shadow_tag ($1); } | extension decl { RESTORE_EXT_FLAGS ($1); } ; --- 868,874 ---- | declspecs_nots setspecs notype_nested_function { POP_DECLSPEC_STACK; } | declspecs ';' ! { shadow_tag (finish_declspecs ($1)); } | extension decl { RESTORE_EXT_FLAGS ($1); } ; *************** decl: *** 832,847 **** - Attribute specifier lists (attributes). - These are stored as a TREE_LIST; the head of the list is the last - item in the specifier list. Each entry in the list has either a - TREE_PURPOSE that is an attribute specifier list, or a TREE_VALUE that - is a single other specifier or qualifier; and a TREE_CHAIN that is the - rest of the list. TREE_STATIC is set on the list if something other - than a storage class specifier or attribute has been seen; this is used - to warn for the obsolescent usage of storage class specifiers other than - at the start of the list. (Doing this properly would require function - specifiers to be handled separately from storage class specifiers.) - The various cases below are classified according to: (a) Whether a storage class specifier is included or not; some --- 884,889 ---- *************** decl: *** 870,1203 **** /* Declspecs which contain at least one type specifier or typedef name. (Just `const' or `volatile' is not enough.) ! A typedef'd name following these is taken as a name to be declared. ! Declspecs have a non-NULL TREE_VALUE, attributes do not. */ declspecs_nosc_nots_nosa_noea: TYPE_QUAL ! { $$ = tree_cons (NULL_TREE, $1, NULL_TREE); ! TREE_STATIC ($$) = 1; } | declspecs_nosc_nots_nosa_noea TYPE_QUAL ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_nosc_nots_nosa_ea TYPE_QUAL ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } ; declspecs_nosc_nots_nosa_ea: declspecs_nosc_nots_nosa_noea attributes ! { $$ = tree_cons ($2, NULL_TREE, $1); ! TREE_STATIC ($$) = TREE_STATIC ($1); } ; declspecs_nosc_nots_sa_noea: declspecs_nosc_nots_sa_noea TYPE_QUAL ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_nosc_nots_sa_ea TYPE_QUAL ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } ; declspecs_nosc_nots_sa_ea: attributes ! { $$ = tree_cons ($1, NULL_TREE, NULL_TREE); ! TREE_STATIC ($$) = 0; } | declspecs_nosc_nots_sa_noea attributes ! { $$ = tree_cons ($2, NULL_TREE, $1); ! TREE_STATIC ($$) = TREE_STATIC ($1); } ; declspecs_nosc_ts_nosa_noea: typespec_nonattr ! { $$ = tree_cons (NULL_TREE, $1, NULL_TREE); ! TREE_STATIC ($$) = 1; } | declspecs_nosc_ts_nosa_noea TYPE_QUAL ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_nosc_ts_nosa_ea TYPE_QUAL ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_nosc_ts_nosa_noea typespec_reserved_nonattr ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_nosc_ts_nosa_ea typespec_reserved_nonattr ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_nosc_nots_nosa_noea typespec_nonattr ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_nosc_nots_nosa_ea typespec_nonattr ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } ; declspecs_nosc_ts_nosa_ea: typespec_attr ! { $$ = tree_cons (NULL_TREE, $1, NULL_TREE); ! TREE_STATIC ($$) = 1; } | declspecs_nosc_ts_nosa_noea attributes ! { $$ = tree_cons ($2, NULL_TREE, $1); ! TREE_STATIC ($$) = TREE_STATIC ($1); } | declspecs_nosc_ts_nosa_noea typespec_reserved_attr ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_nosc_ts_nosa_ea typespec_reserved_attr ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_nosc_nots_nosa_noea typespec_attr ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_nosc_nots_nosa_ea typespec_attr ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } ; declspecs_nosc_ts_sa_noea: declspecs_nosc_ts_sa_noea TYPE_QUAL ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_nosc_ts_sa_ea TYPE_QUAL ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_nosc_ts_sa_noea typespec_reserved_nonattr ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_nosc_ts_sa_ea typespec_reserved_nonattr ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_nosc_nots_sa_noea typespec_nonattr ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_nosc_nots_sa_ea typespec_nonattr ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } ; declspecs_nosc_ts_sa_ea: declspecs_nosc_ts_sa_noea attributes ! { $$ = tree_cons ($2, NULL_TREE, $1); ! TREE_STATIC ($$) = TREE_STATIC ($1); } | declspecs_nosc_ts_sa_noea typespec_reserved_attr ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_nosc_ts_sa_ea typespec_reserved_attr ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_nosc_nots_sa_noea typespec_attr ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_nosc_nots_sa_ea typespec_attr ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } ; declspecs_sc_nots_nosa_noea: scspec ! { $$ = tree_cons (NULL_TREE, $1, NULL_TREE); ! TREE_STATIC ($$) = 0; } | declspecs_sc_nots_nosa_noea TYPE_QUAL ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_sc_nots_nosa_ea TYPE_QUAL ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_nosc_nots_nosa_noea scspec ! { if (extra_warnings && TREE_STATIC ($1)) ! warning ("`%s' is not at beginning of declaration", ! IDENTIFIER_POINTER ($2)); ! $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = TREE_STATIC ($1); } | declspecs_nosc_nots_nosa_ea scspec ! { if (extra_warnings && TREE_STATIC ($1)) ! warning ("`%s' is not at beginning of declaration", ! IDENTIFIER_POINTER ($2)); ! $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = TREE_STATIC ($1); } | declspecs_sc_nots_nosa_noea scspec ! { if (extra_warnings && TREE_STATIC ($1)) ! warning ("`%s' is not at beginning of declaration", ! IDENTIFIER_POINTER ($2)); ! $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = TREE_STATIC ($1); } | declspecs_sc_nots_nosa_ea scspec ! { if (extra_warnings && TREE_STATIC ($1)) ! warning ("`%s' is not at beginning of declaration", ! IDENTIFIER_POINTER ($2)); ! $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = TREE_STATIC ($1); } ; declspecs_sc_nots_nosa_ea: declspecs_sc_nots_nosa_noea attributes ! { $$ = tree_cons ($2, NULL_TREE, $1); ! TREE_STATIC ($$) = TREE_STATIC ($1); } ; declspecs_sc_nots_sa_noea: declspecs_sc_nots_sa_noea TYPE_QUAL ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_sc_nots_sa_ea TYPE_QUAL ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_nosc_nots_sa_noea scspec ! { if (extra_warnings && TREE_STATIC ($1)) ! warning ("`%s' is not at beginning of declaration", ! IDENTIFIER_POINTER ($2)); ! $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = TREE_STATIC ($1); } | declspecs_nosc_nots_sa_ea scspec ! { if (extra_warnings && TREE_STATIC ($1)) ! warning ("`%s' is not at beginning of declaration", ! IDENTIFIER_POINTER ($2)); ! $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = TREE_STATIC ($1); } | declspecs_sc_nots_sa_noea scspec ! { if (extra_warnings && TREE_STATIC ($1)) ! warning ("`%s' is not at beginning of declaration", ! IDENTIFIER_POINTER ($2)); ! $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = TREE_STATIC ($1); } | declspecs_sc_nots_sa_ea scspec ! { if (extra_warnings && TREE_STATIC ($1)) ! warning ("`%s' is not at beginning of declaration", ! IDENTIFIER_POINTER ($2)); ! $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = TREE_STATIC ($1); } ; declspecs_sc_nots_sa_ea: declspecs_sc_nots_sa_noea attributes ! { $$ = tree_cons ($2, NULL_TREE, $1); ! TREE_STATIC ($$) = TREE_STATIC ($1); } ; declspecs_sc_ts_nosa_noea: declspecs_sc_ts_nosa_noea TYPE_QUAL ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_sc_ts_nosa_ea TYPE_QUAL ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_sc_ts_nosa_noea typespec_reserved_nonattr ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_sc_ts_nosa_ea typespec_reserved_nonattr ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_sc_nots_nosa_noea typespec_nonattr ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_sc_nots_nosa_ea typespec_nonattr ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_nosc_ts_nosa_noea scspec ! { if (extra_warnings && TREE_STATIC ($1)) ! warning ("`%s' is not at beginning of declaration", ! IDENTIFIER_POINTER ($2)); ! $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = TREE_STATIC ($1); } | declspecs_nosc_ts_nosa_ea scspec ! { if (extra_warnings && TREE_STATIC ($1)) ! warning ("`%s' is not at beginning of declaration", ! IDENTIFIER_POINTER ($2)); ! $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = TREE_STATIC ($1); } | declspecs_sc_ts_nosa_noea scspec ! { if (extra_warnings && TREE_STATIC ($1)) ! warning ("`%s' is not at beginning of declaration", ! IDENTIFIER_POINTER ($2)); ! $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = TREE_STATIC ($1); } | declspecs_sc_ts_nosa_ea scspec ! { if (extra_warnings && TREE_STATIC ($1)) ! warning ("`%s' is not at beginning of declaration", ! IDENTIFIER_POINTER ($2)); ! $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = TREE_STATIC ($1); } ; declspecs_sc_ts_nosa_ea: declspecs_sc_ts_nosa_noea attributes ! { $$ = tree_cons ($2, NULL_TREE, $1); ! TREE_STATIC ($$) = TREE_STATIC ($1); } | declspecs_sc_ts_nosa_noea typespec_reserved_attr ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_sc_ts_nosa_ea typespec_reserved_attr ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_sc_nots_nosa_noea typespec_attr ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_sc_nots_nosa_ea typespec_attr ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } ; declspecs_sc_ts_sa_noea: declspecs_sc_ts_sa_noea TYPE_QUAL ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_sc_ts_sa_ea TYPE_QUAL ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_sc_ts_sa_noea typespec_reserved_nonattr ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_sc_ts_sa_ea typespec_reserved_nonattr ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_sc_nots_sa_noea typespec_nonattr ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_sc_nots_sa_ea typespec_nonattr ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_nosc_ts_sa_noea scspec ! { if (extra_warnings && TREE_STATIC ($1)) ! warning ("`%s' is not at beginning of declaration", ! IDENTIFIER_POINTER ($2)); ! $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = TREE_STATIC ($1); } | declspecs_nosc_ts_sa_ea scspec ! { if (extra_warnings && TREE_STATIC ($1)) ! warning ("`%s' is not at beginning of declaration", ! IDENTIFIER_POINTER ($2)); ! $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = TREE_STATIC ($1); } | declspecs_sc_ts_sa_noea scspec ! { if (extra_warnings && TREE_STATIC ($1)) ! warning ("`%s' is not at beginning of declaration", ! IDENTIFIER_POINTER ($2)); ! $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = TREE_STATIC ($1); } | declspecs_sc_ts_sa_ea scspec ! { if (extra_warnings && TREE_STATIC ($1)) ! warning ("`%s' is not at beginning of declaration", ! IDENTIFIER_POINTER ($2)); ! $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = TREE_STATIC ($1); } ; declspecs_sc_ts_sa_ea: declspecs_sc_ts_sa_noea attributes ! { $$ = tree_cons ($2, NULL_TREE, $1); ! TREE_STATIC ($$) = TREE_STATIC ($1); } | declspecs_sc_ts_sa_noea typespec_reserved_attr ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_sc_ts_sa_ea typespec_reserved_attr ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_sc_nots_sa_noea typespec_attr ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } | declspecs_sc_nots_sa_ea typespec_attr ! { $$ = tree_cons (NULL_TREE, $2, $1); ! TREE_STATIC ($$) = 1; } ; /* Particular useful classes of declspecs. */ --- 912,1119 ---- /* Declspecs which contain at least one type specifier or typedef name. (Just `const' or `volatile' is not enough.) ! A typedef'd name following these is taken as a name to be declared. */ declspecs_nosc_nots_nosa_noea: TYPE_QUAL ! { $$ = declspecs_add_qual (build_null_declspecs (), $1); } | declspecs_nosc_nots_nosa_noea TYPE_QUAL ! { $$ = declspecs_add_qual ($1, $2); } | declspecs_nosc_nots_nosa_ea TYPE_QUAL ! { $$ = declspecs_add_qual ($1, $2); } ; declspecs_nosc_nots_nosa_ea: declspecs_nosc_nots_nosa_noea attributes ! { $$ = declspecs_add_attrs ($1, $2); } ; declspecs_nosc_nots_sa_noea: declspecs_nosc_nots_sa_noea TYPE_QUAL ! { $$ = declspecs_add_qual ($1, $2); } | declspecs_nosc_nots_sa_ea TYPE_QUAL ! { $$ = declspecs_add_qual ($1, $2); } ; declspecs_nosc_nots_sa_ea: attributes ! { $$ = declspecs_add_attrs (build_null_declspecs (), $1); } | declspecs_nosc_nots_sa_noea attributes ! { $$ = declspecs_add_attrs ($1, $2); } ; declspecs_nosc_ts_nosa_noea: typespec_nonattr ! { $$ = declspecs_add_type (build_null_declspecs (), $1); } | declspecs_nosc_ts_nosa_noea TYPE_QUAL ! { $$ = declspecs_add_qual ($1, $2); } | declspecs_nosc_ts_nosa_ea TYPE_QUAL ! { $$ = declspecs_add_qual ($1, $2); } | declspecs_nosc_ts_nosa_noea typespec_reserved_nonattr ! { $$ = declspecs_add_type ($1, $2); } | declspecs_nosc_ts_nosa_ea typespec_reserved_nonattr ! { $$ = declspecs_add_type ($1, $2); } | declspecs_nosc_nots_nosa_noea typespec_nonattr ! { $$ = declspecs_add_type ($1, $2); } | declspecs_nosc_nots_nosa_ea typespec_nonattr ! { $$ = declspecs_add_type ($1, $2); } ; declspecs_nosc_ts_nosa_ea: typespec_attr ! { $$ = declspecs_add_type (build_null_declspecs (), $1); } | declspecs_nosc_ts_nosa_noea attributes ! { $$ = declspecs_add_attrs ($1, $2); } | declspecs_nosc_ts_nosa_noea typespec_reserved_attr ! { $$ = declspecs_add_type ($1, $2); } | declspecs_nosc_ts_nosa_ea typespec_reserved_attr ! { $$ = declspecs_add_type ($1, $2); } | declspecs_nosc_nots_nosa_noea typespec_attr ! { $$ = declspecs_add_type ($1, $2); } | declspecs_nosc_nots_nosa_ea typespec_attr ! { $$ = declspecs_add_type ($1, $2); } ; declspecs_nosc_ts_sa_noea: declspecs_nosc_ts_sa_noea TYPE_QUAL ! { $$ = declspecs_add_qual ($1, $2); } | declspecs_nosc_ts_sa_ea TYPE_QUAL ! { $$ = declspecs_add_qual ($1, $2); } | declspecs_nosc_ts_sa_noea typespec_reserved_nonattr ! { $$ = declspecs_add_type ($1, $2); } | declspecs_nosc_ts_sa_ea typespec_reserved_nonattr ! { $$ = declspecs_add_type ($1, $2); } | declspecs_nosc_nots_sa_noea typespec_nonattr ! { $$ = declspecs_add_type ($1, $2); } | declspecs_nosc_nots_sa_ea typespec_nonattr ! { $$ = declspecs_add_type ($1, $2); } ; declspecs_nosc_ts_sa_ea: declspecs_nosc_ts_sa_noea attributes ! { $$ = declspecs_add_attrs ($1, $2); } | declspecs_nosc_ts_sa_noea typespec_reserved_attr ! { $$ = declspecs_add_type ($1, $2); } | declspecs_nosc_ts_sa_ea typespec_reserved_attr ! { $$ = declspecs_add_type ($1, $2); } | declspecs_nosc_nots_sa_noea typespec_attr ! { $$ = declspecs_add_type ($1, $2); } | declspecs_nosc_nots_sa_ea typespec_attr ! { $$ = declspecs_add_type ($1, $2); } ; declspecs_sc_nots_nosa_noea: scspec ! { $$ = declspecs_add_scspec (build_null_declspecs (), $1); } | declspecs_sc_nots_nosa_noea TYPE_QUAL ! { $$ = declspecs_add_qual ($1, $2); } | declspecs_sc_nots_nosa_ea TYPE_QUAL ! { $$ = declspecs_add_qual ($1, $2); } | declspecs_nosc_nots_nosa_noea scspec ! { $$ = declspecs_add_scspec ($1, $2); } | declspecs_nosc_nots_nosa_ea scspec ! { $$ = declspecs_add_scspec ($1, $2); } | declspecs_sc_nots_nosa_noea scspec ! { $$ = declspecs_add_scspec ($1, $2); } | declspecs_sc_nots_nosa_ea scspec ! { $$ = declspecs_add_scspec ($1, $2); } ; declspecs_sc_nots_nosa_ea: declspecs_sc_nots_nosa_noea attributes ! { $$ = declspecs_add_attrs ($1, $2); } ; declspecs_sc_nots_sa_noea: declspecs_sc_nots_sa_noea TYPE_QUAL ! { $$ = declspecs_add_qual ($1, $2); } | declspecs_sc_nots_sa_ea TYPE_QUAL ! { $$ = declspecs_add_qual ($1, $2); } | declspecs_nosc_nots_sa_noea scspec ! { $$ = declspecs_add_scspec ($1, $2); } | declspecs_nosc_nots_sa_ea scspec ! { $$ = declspecs_add_scspec ($1, $2); } | declspecs_sc_nots_sa_noea scspec ! { $$ = declspecs_add_scspec ($1, $2); } | declspecs_sc_nots_sa_ea scspec ! { $$ = declspecs_add_scspec ($1, $2); } ; declspecs_sc_nots_sa_ea: declspecs_sc_nots_sa_noea attributes ! { $$ = declspecs_add_attrs ($1, $2); } ; declspecs_sc_ts_nosa_noea: declspecs_sc_ts_nosa_noea TYPE_QUAL ! { $$ = declspecs_add_qual ($1, $2); } | declspecs_sc_ts_nosa_ea TYPE_QUAL ! { $$ = declspecs_add_qual ($1, $2); } | declspecs_sc_ts_nosa_noea typespec_reserved_nonattr ! { $$ = declspecs_add_type ($1, $2); } | declspecs_sc_ts_nosa_ea typespec_reserved_nonattr ! { $$ = declspecs_add_type ($1, $2); } | declspecs_sc_nots_nosa_noea typespec_nonattr ! { $$ = declspecs_add_type ($1, $2); } | declspecs_sc_nots_nosa_ea typespec_nonattr ! { $$ = declspecs_add_type ($1, $2); } | declspecs_nosc_ts_nosa_noea scspec ! { $$ = declspecs_add_scspec ($1, $2); } | declspecs_nosc_ts_nosa_ea scspec ! { $$ = declspecs_add_scspec ($1, $2); } | declspecs_sc_ts_nosa_noea scspec ! { $$ = declspecs_add_scspec ($1, $2); } | declspecs_sc_ts_nosa_ea scspec ! { $$ = declspecs_add_scspec ($1, $2); } ; declspecs_sc_ts_nosa_ea: declspecs_sc_ts_nosa_noea attributes ! { $$ = declspecs_add_attrs ($1, $2); } | declspecs_sc_ts_nosa_noea typespec_reserved_attr ! { $$ = declspecs_add_type ($1, $2); } | declspecs_sc_ts_nosa_ea typespec_reserved_attr ! { $$ = declspecs_add_type ($1, $2); } | declspecs_sc_nots_nosa_noea typespec_attr ! { $$ = declspecs_add_type ($1, $2); } | declspecs_sc_nots_nosa_ea typespec_attr ! { $$ = declspecs_add_type ($1, $2); } ; declspecs_sc_ts_sa_noea: declspecs_sc_ts_sa_noea TYPE_QUAL ! { $$ = declspecs_add_qual ($1, $2); } | declspecs_sc_ts_sa_ea TYPE_QUAL ! { $$ = declspecs_add_qual ($1, $2); } | declspecs_sc_ts_sa_noea typespec_reserved_nonattr ! { $$ = declspecs_add_type ($1, $2); } | declspecs_sc_ts_sa_ea typespec_reserved_nonattr ! { $$ = declspecs_add_type ($1, $2); } | declspecs_sc_nots_sa_noea typespec_nonattr ! { $$ = declspecs_add_type ($1, $2); } | declspecs_sc_nots_sa_ea typespec_nonattr ! { $$ = declspecs_add_type ($1, $2); } | declspecs_nosc_ts_sa_noea scspec ! { $$ = declspecs_add_scspec ($1, $2); } | declspecs_nosc_ts_sa_ea scspec ! { $$ = declspecs_add_scspec ($1, $2); } | declspecs_sc_ts_sa_noea scspec ! { $$ = declspecs_add_scspec ($1, $2); } | declspecs_sc_ts_sa_ea scspec ! { $$ = declspecs_add_scspec ($1, $2); } ; declspecs_sc_ts_sa_ea: declspecs_sc_ts_sa_noea attributes ! { $$ = declspecs_add_attrs ($1, $2); } | declspecs_sc_ts_sa_noea typespec_reserved_attr ! { $$ = declspecs_add_type ($1, $2); } | declspecs_sc_ts_sa_ea typespec_reserved_attr ! { $$ = declspecs_add_type ($1, $2); } | declspecs_sc_nots_sa_noea typespec_attr ! { $$ = declspecs_add_type ($1, $2); } | declspecs_sc_nots_sa_ea typespec_attr ! { $$ = declspecs_add_type ($1, $2); } ; /* Particular useful classes of declspecs. */ *************** declspecs: *** 1284,1290 **** /* A (possibly empty) sequence of type qualifiers and attributes. */ maybe_type_quals_attrs: /* empty */ ! { $$ = NULL_TREE; } | declspecs_nosc_nots { $$ = $1; } ; --- 1200,1206 ---- /* A (possibly empty) sequence of type qualifiers and attributes. */ maybe_type_quals_attrs: /* empty */ ! { $$ = NULL; } | declspecs_nosc_nots { $$ = $1; } ; *************** maybe_type_quals_attrs: *** 1308,1314 **** or are such that any following attributes would be parsed as part of the specifier. ! _nonattr: specifiers. */ typespec_nonattr: typespec_reserved_nonattr --- 1224,1230 ---- or are such that any following attributes would be parsed as part of the specifier. ! _nonattr: other specifiers not ending with attributes. */ typespec_nonattr: typespec_reserved_nonattr *************** typespec_attr: *** 1321,1327 **** typespec_reserved_nonattr: TYPESPEC ! { OBJC_NEED_RAW_IDENTIFIER (1); } | structsp_nonattr ; --- 1237,1245 ---- typespec_reserved_nonattr: TYPESPEC ! { OBJC_NEED_RAW_IDENTIFIER (1); ! $$.kind = ctsk_resword; ! $$.spec = $1; } | structsp_nonattr ; *************** typespec_nonreserved_nonattr: *** 1333,1356 **** TYPENAME { /* For a typedef name, record the meaning, not the name. In case of `foo foo, bar;'. */ ! $$ = lookup_name ($1); } | CLASSNAME protocolrefs ! { $$ = get_static_reference ($1, $2); } ! | OBJECTNAME protocolrefs ! { $$ = get_object_reference ($2); } /* Make "" equivalent to "id " - nisse@lysator.liu.se */ | non_empty_protocolrefs ! { $$ = get_object_reference ($1); } | typeof '(' expr ')' { skip_evaluation--; ! if (TREE_CODE ($3) == COMPONENT_REF ! && DECL_C_BIT_FIELD (TREE_OPERAND ($3, 1))) ! error ("`typeof' applied to a bit-field"); ! $$ = TREE_TYPE ($3); } | typeof '(' typename ')' ! { skip_evaluation--; $$ = groktypename ($3); } ; /* typespec_nonreserved_attr does not exist. */ --- 1251,1287 ---- TYPENAME { /* For a typedef name, record the meaning, not the name. In case of `foo foo, bar;'. */ ! $$.kind = ctsk_typedef; ! $$.spec = lookup_name ($1); } | CLASSNAME protocolrefs ! { $$.kind = ctsk_objc; ! $$.spec = objc_get_protocol_qualified_type ($1, $2); } ! | TYPENAME non_empty_protocolrefs ! { $$.kind = ctsk_objc; ! $$.spec = objc_get_protocol_qualified_type ($1, $2); } /* Make "" equivalent to "id " - nisse@lysator.liu.se */ | non_empty_protocolrefs ! { $$.kind = ctsk_objc; ! $$.spec = objc_get_protocol_qualified_type (NULL_TREE, $1); } | typeof '(' expr ')' { skip_evaluation--; ! in_typeof--; ! if (TREE_CODE ($3.value) == COMPONENT_REF ! && DECL_C_BIT_FIELD (TREE_OPERAND ($3.value, 1))) ! error ("% applied to a bit-field"); ! $$.kind = ctsk_typeof; ! $$.spec = TREE_TYPE ($3.value); ! pop_maybe_used (variably_modified_type_p ($$.spec, ! NULL_TREE)); } | typeof '(' typename ')' ! { skip_evaluation--; ! in_typeof--; ! $$.kind = ctsk_typeof; ! $$.spec = groktypename ($3); ! pop_maybe_used (variably_modified_type_p ($$.spec, ! NULL_TREE)); } ; /* typespec_nonreserved_attr does not exist. */ *************** notype_initdecls: *** 1365,1406 **** | notype_initdecls ',' maybe_resetattrs notype_initdcl ; - maybeasm: - /* empty */ - { $$ = NULL_TREE; } - | ASM_KEYWORD '(' STRING ')' - { $$ = $3; } - ; - initdcl: declarator maybeasm maybe_attribute '=' ! { $$ = start_decl ($1, current_declspecs, 1, chainon ($3, all_prefix_attributes)); start_init ($$, $2, global_bindings_p ()); } init /* Note how the declaration of the variable is in effect while its init is parsed! */ { finish_init (); ! finish_decl ($5, $6, $2); } | declarator maybeasm maybe_attribute ! { tree d = start_decl ($1, current_declspecs, 0, chainon ($3, all_prefix_attributes)); ! finish_decl (d, NULL_TREE, $2); } ; notype_initdcl: notype_declarator maybeasm maybe_attribute '=' ! { $$ = start_decl ($1, current_declspecs, 1, chainon ($3, all_prefix_attributes)); start_init ($$, $2, global_bindings_p ()); } init /* Note how the declaration of the variable is in effect while its init is parsed! */ { finish_init (); ! finish_decl ($5, $6, $2); } | notype_declarator maybeasm maybe_attribute ! { tree d = start_decl ($1, current_declspecs, 0, chainon ($3, all_prefix_attributes)); ! finish_decl (d, NULL_TREE, $2); } ; /* the * rules are dummies to accept the Apollo extended syntax so that the header files compile. */ --- 1296,1346 ---- | notype_initdecls ',' maybe_resetattrs notype_initdcl ; initdcl: declarator maybeasm maybe_attribute '=' ! { $$ = start_decl ($1, current_declspecs, true, chainon ($3, all_prefix_attributes)); + if (!$$) + $$ = error_mark_node; start_init ($$, $2, global_bindings_p ()); } init /* Note how the declaration of the variable is in effect while its init is parsed! */ { finish_init (); ! if ($5 != error_mark_node) ! { ! maybe_warn_string_init (TREE_TYPE ($5), $6); ! finish_decl ($5, $6.value, $2); ! } ! } | declarator maybeasm maybe_attribute ! { tree d = start_decl ($1, current_declspecs, false, chainon ($3, all_prefix_attributes)); ! if (d) ! finish_decl (d, NULL_TREE, $2); } ; notype_initdcl: notype_declarator maybeasm maybe_attribute '=' ! { $$ = start_decl ($1, current_declspecs, true, chainon ($3, all_prefix_attributes)); + if (!$$) + $$ = error_mark_node; start_init ($$, $2, global_bindings_p ()); } init /* Note how the declaration of the variable is in effect while its init is parsed! */ { finish_init (); ! if ($5 != error_mark_node) ! { ! maybe_warn_string_init (TREE_TYPE ($5), $6); ! finish_decl ($5, $6.value, $2); ! } ! } | notype_declarator maybeasm maybe_attribute ! { tree d = start_decl ($1, current_declspecs, false, chainon ($3, all_prefix_attributes)); ! if (d) ! finish_decl (d, NULL_TREE, $2); } ; /* the * rules are dummies to accept the Apollo extended syntax so that the header files compile. */ *************** attributes: *** 1419,1426 **** ; attribute: ! ATTRIBUTE '(' '(' attribute_list ')' ')' ! { $$ = $4; } ; attribute_list: --- 1359,1369 ---- ; attribute: ! ATTRIBUTE stop_string_translation ! '(' '(' attribute_list ')' ')' start_string_translation ! { $$ = $5; } ! | ATTRIBUTE error start_string_translation ! { $$ = NULL_TREE; } ; attribute_list: *************** scspec: *** 1462,1473 **** init: expr_no_commas | '{' { really_start_incremental_init (NULL_TREE); } initlist_maybe_comma '}' { $$ = pop_init_level (0); } | error ! { $$ = error_mark_node; } ; /* `initlist_maybe_comma' is the guts of an initializer in braces. */ --- 1405,1417 ---- init: expr_no_commas + { $$ = $1; } | '{' { really_start_incremental_init (NULL_TREE); } initlist_maybe_comma '}' { $$ = pop_init_level (0); } | error ! { $$.value = error_mark_node; $$.original_code = ERROR_MARK; } ; /* `initlist_maybe_comma' is the guts of an initializer in braces. */ *************** initlist1: *** 1487,1501 **** It may use braces. */ initelt: designator_list '=' initval ! { if (pedantic && ! flag_isoc99) pedwarn ("ISO C90 forbids specifying subobject to initialize"); } ! | designator initval { if (pedantic) ! pedwarn ("obsolete use of designated initializer without `='"); } | identifier ':' { set_init_label ($1); if (pedantic) ! pedwarn ("obsolete use of designated initializer with `:'"); } initval {} | initval --- 1431,1445 ---- It may use braces. */ initelt: designator_list '=' initval ! { if (pedantic && !flag_isoc99) pedwarn ("ISO C90 forbids specifying subobject to initialize"); } ! | array_designator initval { if (pedantic) ! pedwarn ("obsolete use of designated initializer without %<=%>"); } | identifier ':' { set_init_label ($1); if (pedantic) ! pedwarn ("obsolete use of designated initializer with %<:%>"); } initval {} | initval *************** designator_list: *** 1519,1592 **** designator: '.' identifier { set_init_label ($2); } ! | '[' expr_no_commas ELLIPSIS expr_no_commas ']' ! { set_init_index ($2, $4); if (pedantic) pedwarn ("ISO C forbids specifying range of elements to initialize"); } | '[' expr_no_commas ']' ! { set_init_index ($2, NULL_TREE); } ; nested_function: ! declarator { if (pedantic) pedwarn ("ISO C forbids nested functions"); push_function_context (); ! if (! start_function (current_declspecs, $1, ! all_prefix_attributes)) { pop_function_context (); YYERROR1; } - parsing_iso_function_signature = false; /* Don't warn about nested functions. */ } ! old_style_parm_decls save_location { tree decl = current_function_decl; DECL_SOURCE_LOCATION (decl) = $4; store_parm_decls (); } ! /* This used to use compstmt_or_error. ! That caused a bug with input `f(g) int g {}', ! where the use of YYERROR1 above caused an error ! which then was handled by compstmt_or_error. ! There followed a repeated execution of that same rule, ! which called YYERROR1 again, and so on. */ ! compstmt { tree decl = current_function_decl; finish_function (); pop_function_context (); ! add_decl_stmt (decl); } ; notype_nested_function: ! notype_declarator { if (pedantic) pedwarn ("ISO C forbids nested functions"); push_function_context (); ! if (! start_function (current_declspecs, $1, ! all_prefix_attributes)) { pop_function_context (); YYERROR1; } - parsing_iso_function_signature = false; /* Don't warn about nested functions. */ } ! old_style_parm_decls save_location { tree decl = current_function_decl; DECL_SOURCE_LOCATION (decl) = $4; store_parm_decls (); } ! /* This used to use compstmt_or_error. ! That caused a bug with input `f(g) int g {}', ! where the use of YYERROR1 above caused an error ! which then was handled by compstmt_or_error. ! There followed a repeated execution of that same rule, ! which called YYERROR1 again, and so on. */ ! compstmt { tree decl = current_function_decl; finish_function (); pop_function_context (); ! add_decl_stmt (decl); } ; /* Any kind of declarator (thus, all declarators allowed --- 1463,1538 ---- designator: '.' identifier { set_init_label ($2); } ! | array_designator ! ; ! ! array_designator: ! '[' expr_no_commas ELLIPSIS expr_no_commas ']' ! { set_init_index ($2.value, $4.value); if (pedantic) pedwarn ("ISO C forbids specifying range of elements to initialize"); } | '[' expr_no_commas ']' ! { set_init_index ($2.value, NULL_TREE); } ; nested_function: ! declarator { if (pedantic) pedwarn ("ISO C forbids nested functions"); push_function_context (); ! if (!start_function (current_declspecs, $1, ! all_prefix_attributes)) { pop_function_context (); YYERROR1; } } ! old_style_parm_decls save_location { tree decl = current_function_decl; DECL_SOURCE_LOCATION (decl) = $4; store_parm_decls (); } ! /* This used to use compstmt_or_error. That caused a bug with ! input `f(g) int g {}', where the use of YYERROR1 above caused ! an error which then was handled by compstmt_or_error. There ! followed a repeated execution of that same rule, which called ! YYERROR1 again, and so on. */ ! compstmt { tree decl = current_function_decl; + add_stmt ($6); finish_function (); pop_function_context (); ! add_stmt (build_stmt (DECL_EXPR, decl)); } ; notype_nested_function: ! notype_declarator { if (pedantic) pedwarn ("ISO C forbids nested functions"); push_function_context (); ! if (!start_function (current_declspecs, $1, ! all_prefix_attributes)) { pop_function_context (); YYERROR1; } } ! old_style_parm_decls save_location { tree decl = current_function_decl; DECL_SOURCE_LOCATION (decl) = $4; store_parm_decls (); } ! /* This used to use compstmt_or_error. That caused a bug with ! input `f(g) int g {}', where the use of YYERROR1 above caused ! an error which then was handled by compstmt_or_error. There ! followed a repeated execution of that same rule, which called ! YYERROR1 again, and so on. */ ! compstmt { tree decl = current_function_decl; + add_stmt ($6); finish_function (); pop_function_context (); ! add_stmt (build_stmt (DECL_EXPR, decl)); } ; /* Any kind of declarator (thus, all declarators allowed *************** declarator: *** 1601,1618 **** after_type_declarator: '(' maybe_attribute after_type_declarator ')' ! { $$ = $2 ? tree_cons ($2, $3, NULL_TREE) : $3; } | after_type_declarator '(' parmlist_or_identifiers %prec '.' ! { $$ = build_nt (CALL_EXPR, $1, $3, NULL_TREE); } ! /* | after_type_declarator '(' error ')' %prec '.' ! { $$ = build_nt (CALL_EXPR, $1, NULL_TREE, NULL_TREE); ! poplevel (0, 0, 0); } */ | after_type_declarator array_declarator %prec '.' ! { $$ = set_array_declarator_type ($2, $1, 0); } | '*' maybe_type_quals_attrs after_type_declarator %prec UNARY { $$ = make_pointer_declarator ($2, $3); } | TYPENAME ! | OBJECTNAME ; /* Kinds of declarator that can appear in a parameter list --- 1547,1561 ---- after_type_declarator: '(' maybe_attribute after_type_declarator ')' ! { $$ = $2 ? build_attrs_declarator ($2, $3) : $3; } | after_type_declarator '(' parmlist_or_identifiers %prec '.' ! { $$ = build_function_declarator ($3, $1); } | after_type_declarator array_declarator %prec '.' ! { $$ = set_array_declarator_inner ($2, $1, false); } | '*' maybe_type_quals_attrs after_type_declarator %prec UNARY { $$ = make_pointer_declarator ($2, $3); } | TYPENAME ! { $$ = build_id_declarator ($1); } ; /* Kinds of declarator that can appear in a parameter list *************** parm_declarator: *** 1626,1655 **** parm_declarator_starttypename: parm_declarator_starttypename '(' parmlist_or_identifiers %prec '.' ! { $$ = build_nt (CALL_EXPR, $1, $3, NULL_TREE); } ! /* | parm_declarator_starttypename '(' error ')' %prec '.' ! { $$ = build_nt (CALL_EXPR, $1, NULL_TREE, NULL_TREE); ! poplevel (0, 0, 0); } */ | parm_declarator_starttypename array_declarator %prec '.' ! { $$ = set_array_declarator_type ($2, $1, 0); } | TYPENAME ! | OBJECTNAME ; parm_declarator_nostarttypename: parm_declarator_nostarttypename '(' parmlist_or_identifiers %prec '.' ! { $$ = build_nt (CALL_EXPR, $1, $3, NULL_TREE); } ! /* | parm_declarator_nostarttypename '(' error ')' %prec '.' ! { $$ = build_nt (CALL_EXPR, $1, NULL_TREE, NULL_TREE); ! poplevel (0, 0, 0); } */ | parm_declarator_nostarttypename array_declarator %prec '.' ! { $$ = set_array_declarator_type ($2, $1, 0); } | '*' maybe_type_quals_attrs parm_declarator_starttypename %prec UNARY { $$ = make_pointer_declarator ($2, $3); } | '*' maybe_type_quals_attrs parm_declarator_nostarttypename %prec UNARY { $$ = make_pointer_declarator ($2, $3); } | '(' maybe_attribute parm_declarator_nostarttypename ')' ! { $$ = $2 ? tree_cons ($2, $3, NULL_TREE) : $3; } ; /* A declarator allowed whether or not there has been --- 1569,1592 ---- parm_declarator_starttypename: parm_declarator_starttypename '(' parmlist_or_identifiers %prec '.' ! { $$ = build_function_declarator ($3, $1); } | parm_declarator_starttypename array_declarator %prec '.' ! { $$ = set_array_declarator_inner ($2, $1, false); } | TYPENAME ! { $$ = build_id_declarator ($1); } ; parm_declarator_nostarttypename: parm_declarator_nostarttypename '(' parmlist_or_identifiers %prec '.' ! { $$ = build_function_declarator ($3, $1); } | parm_declarator_nostarttypename array_declarator %prec '.' ! { $$ = set_array_declarator_inner ($2, $1, false); } | '*' maybe_type_quals_attrs parm_declarator_starttypename %prec UNARY { $$ = make_pointer_declarator ($2, $3); } | '*' maybe_type_quals_attrs parm_declarator_nostarttypename %prec UNARY { $$ = make_pointer_declarator ($2, $3); } | '(' maybe_attribute parm_declarator_nostarttypename ')' ! { $$ = $2 ? build_attrs_declarator ($2, $3) : $3; } ; /* A declarator allowed whether or not there has been *************** parm_declarator_nostarttypename: *** 1657,1673 **** notype_declarator: notype_declarator '(' parmlist_or_identifiers %prec '.' ! { $$ = build_nt (CALL_EXPR, $1, $3, NULL_TREE); } ! /* | notype_declarator '(' error ')' %prec '.' ! { $$ = build_nt (CALL_EXPR, $1, NULL_TREE, NULL_TREE); ! poplevel (0, 0, 0); } */ | '(' maybe_attribute notype_declarator ')' ! { $$ = $2 ? tree_cons ($2, $3, NULL_TREE) : $3; } | '*' maybe_type_quals_attrs notype_declarator %prec UNARY { $$ = make_pointer_declarator ($2, $3); } | notype_declarator array_declarator %prec '.' ! { $$ = set_array_declarator_type ($2, $1, 0); } | IDENTIFIER ; struct_head: --- 1594,1608 ---- notype_declarator: notype_declarator '(' parmlist_or_identifiers %prec '.' ! { $$ = build_function_declarator ($3, $1); } | '(' maybe_attribute notype_declarator ')' ! { $$ = $2 ? build_attrs_declarator ($2, $3) : $3; } | '*' maybe_type_quals_attrs notype_declarator %prec UNARY { $$ = make_pointer_declarator ($2, $3); } | notype_declarator array_declarator %prec '.' ! { $$ = set_array_declarator_inner ($2, $1, false); } | IDENTIFIER + { $$ = build_id_declarator ($1); } ; struct_head: *************** enum_head: *** 1699,1746 **** structsp_attr: struct_head identifier '{' ! { $$ = start_struct (RECORD_TYPE, $2); /* Start scope of tag before parsing components. */ } component_decl_list '}' maybe_attribute ! { $$ = finish_struct ($4, nreverse ($5), ! chainon ($1, $7)); } | struct_head '{' component_decl_list '}' maybe_attribute ! { $$ = finish_struct (start_struct (RECORD_TYPE, NULL_TREE), ! nreverse ($3), chainon ($1, $5)); } | union_head identifier '{' ! { $$ = start_struct (UNION_TYPE, $2); } component_decl_list '}' maybe_attribute ! { $$ = finish_struct ($4, nreverse ($5), ! chainon ($1, $7)); } | union_head '{' component_decl_list '}' maybe_attribute ! { $$ = finish_struct (start_struct (UNION_TYPE, NULL_TREE), ! nreverse ($3), chainon ($1, $5)); } | enum_head identifier '{' ! { $$ = start_enum ($2); } enumlist maybecomma_warn '}' maybe_attribute ! { $$ = finish_enum ($4, nreverse ($5), ! chainon ($1, $8)); } | enum_head '{' ! { $$ = start_enum (NULL_TREE); } enumlist maybecomma_warn '}' maybe_attribute ! { $$ = finish_enum ($3, nreverse ($4), ! chainon ($1, $7)); } ; structsp_nonattr: struct_head identifier ! { $$ = xref_tag (RECORD_TYPE, $2); } | union_head identifier ! { $$ = xref_tag (UNION_TYPE, $2); } | enum_head identifier ! { $$ = xref_tag (ENUMERAL_TYPE, $2); /* In ISO C, enumerated types can be referred to only if already defined. */ ! if (pedantic && !COMPLETE_TYPE_P ($$)) ! pedwarn ("ISO C forbids forward references to `enum' types"); } ; maybecomma: --- 1634,1689 ---- structsp_attr: struct_head identifier '{' ! { $$ = start_struct (RECORD_TYPE, $2); /* Start scope of tag before parsing components. */ } component_decl_list '}' maybe_attribute ! { $$.spec = finish_struct ($4, nreverse ($5), ! chainon ($1, $7)); ! $$.kind = ctsk_tagdef; } | struct_head '{' component_decl_list '}' maybe_attribute ! { $$.spec = finish_struct (start_struct (RECORD_TYPE, ! NULL_TREE), ! nreverse ($3), chainon ($1, $5)); ! $$.kind = ctsk_tagdef; } | union_head identifier '{' ! { $$ = start_struct (UNION_TYPE, $2); } component_decl_list '}' maybe_attribute ! { $$.spec = finish_struct ($4, nreverse ($5), ! chainon ($1, $7)); ! $$.kind = ctsk_tagdef; } | union_head '{' component_decl_list '}' maybe_attribute ! { $$.spec = finish_struct (start_struct (UNION_TYPE, ! NULL_TREE), ! nreverse ($3), chainon ($1, $5)); ! $$.kind = ctsk_tagdef; } | enum_head identifier '{' ! { $$ = start_enum ($2); } enumlist maybecomma_warn '}' maybe_attribute ! { $$.spec = finish_enum ($4, nreverse ($5), ! chainon ($1, $8)); ! $$.kind = ctsk_tagdef; } | enum_head '{' ! { $$ = start_enum (NULL_TREE); } enumlist maybecomma_warn '}' maybe_attribute ! { $$.spec = finish_enum ($3, nreverse ($4), ! chainon ($1, $7)); ! $$.kind = ctsk_tagdef; } ; structsp_nonattr: struct_head identifier ! { $$ = parser_xref_tag (RECORD_TYPE, $2); } | union_head identifier ! { $$ = parser_xref_tag (UNION_TYPE, $2); } | enum_head identifier ! { $$ = parser_xref_tag (ENUMERAL_TYPE, $2); /* In ISO C, enumerated types can be referred to only if already defined. */ ! if (pedantic && !COMPLETE_TYPE_P ($$.spec)) ! pedwarn ("ISO C forbids forward references to % types"); } ; maybecomma: *************** maybecomma: *** 1751,1757 **** maybecomma_warn: /* empty */ | ',' ! { if (pedantic && ! flag_isoc99) pedwarn ("comma at end of enumerator list"); } ; --- 1694,1700 ---- maybecomma_warn: /* empty */ | ',' ! { if (pedantic && !flag_isoc99) pedwarn ("comma at end of enumerator list"); } ; *************** component_decl_list2: /* empty */ *** 1783,1790 **** { if (pedantic) pedwarn ("extra semicolon in struct or union specified"); } /* foo(sizeof(struct{ @defs(ClassName)})); */ ! | DEFS '(' CLASSNAME ')' ! { $$ = nreverse (get_class_ivars_from_name ($3)); } ; component_decl: --- 1726,1733 ---- { if (pedantic) pedwarn ("extra semicolon in struct or union specified"); } /* foo(sizeof(struct{ @defs(ClassName)})); */ ! | AT_DEFS '(' CLASSNAME ')' ! { $$ = nreverse (objc_get_class_ivars ($3)); } ; component_decl: *************** component_decl: *** 1796,1805 **** /* Support for unnamed structs or unions as members of structs or unions (which is [a] useful and [b] supports MS P-SDK). */ ! if (pedantic) ! pedwarn ("ISO C doesn't support unnamed structs/unions"); ! ! $$ = grokfield(NULL, current_declspecs, NULL_TREE); POP_DECLSPEC_STACK; } | declspecs_nosc_nots setspecs components_notype { $$ = $3; --- 1739,1746 ---- /* Support for unnamed structs or unions as members of structs or unions (which is [a] useful and [b] supports MS P-SDK). */ ! $$ = grokfield (build_id_declarator (NULL_TREE), ! current_declspecs, NULL_TREE); POP_DECLSPEC_STACK; } | declspecs_nosc_nots setspecs components_notype { $$ = $3; *************** component_decl: *** 1807,1813 **** | declspecs_nosc_nots { if (pedantic) pedwarn ("ISO C forbids member declarations with no members"); ! shadow_tag_warned ($1, pedantic); $$ = NULL_TREE; } | error { $$ = NULL_TREE; } --- 1748,1754 ---- | declspecs_nosc_nots { if (pedantic) pedwarn ("ISO C forbids member declarations with no members"); ! shadow_tag_warned (finish_declspecs ($1), pedantic); $$ = NULL_TREE; } | error { $$ = NULL_TREE; } *************** component_declarator: *** 1834,1844 **** decl_attributes (&$$, chainon ($2, all_prefix_attributes), 0); } | declarator ':' expr_no_commas maybe_attribute ! { $$ = grokfield ($1, current_declspecs, $3); decl_attributes (&$$, chainon ($4, all_prefix_attributes), 0); } | ':' expr_no_commas maybe_attribute ! { $$ = grokfield (NULL_TREE, current_declspecs, $2); decl_attributes (&$$, chainon ($3, all_prefix_attributes), 0); } ; --- 1775,1786 ---- decl_attributes (&$$, chainon ($2, all_prefix_attributes), 0); } | declarator ':' expr_no_commas maybe_attribute ! { $$ = grokfield ($1, current_declspecs, $3.value); decl_attributes (&$$, chainon ($4, all_prefix_attributes), 0); } | ':' expr_no_commas maybe_attribute ! { $$ = grokfield (build_id_declarator (NULL_TREE), ! current_declspecs, $2.value); decl_attributes (&$$, chainon ($3, all_prefix_attributes), 0); } ; *************** component_notype_declarator: *** 1849,1859 **** decl_attributes (&$$, chainon ($2, all_prefix_attributes), 0); } | notype_declarator ':' expr_no_commas maybe_attribute ! { $$ = grokfield ($1, current_declspecs, $3); decl_attributes (&$$, chainon ($4, all_prefix_attributes), 0); } | ':' expr_no_commas maybe_attribute ! { $$ = grokfield (NULL_TREE, current_declspecs, $2); decl_attributes (&$$, chainon ($3, all_prefix_attributes), 0); } ; --- 1791,1802 ---- decl_attributes (&$$, chainon ($2, all_prefix_attributes), 0); } | notype_declarator ':' expr_no_commas maybe_attribute ! { $$ = grokfield ($1, current_declspecs, $3.value); decl_attributes (&$$, chainon ($4, all_prefix_attributes), 0); } | ':' expr_no_commas maybe_attribute ! { $$ = grokfield (build_id_declarator (NULL_TREE), ! current_declspecs, $2.value); decl_attributes (&$$, chainon ($3, all_prefix_attributes), 0); } ; *************** enumerator: *** 1877,1912 **** identifier { $$ = build_enumerator ($1, NULL_TREE); } | identifier '=' expr_no_commas ! { $$ = build_enumerator ($1, $3); } ; typename: declspecs_nosc { pending_xref_error (); ! $$ = $1; } absdcl ! { $$ = build_tree_list ($2, $3); } ; absdcl: /* an absolute declarator */ /* empty */ ! { $$ = NULL_TREE; } | absdcl1 ; absdcl_maybe_attribute: /* absdcl maybe_attribute, but not just attributes */ /* empty */ ! { $$ = build_tree_list (build_tree_list (current_declspecs, ! NULL_TREE), ! all_prefix_attributes); } | absdcl1 ! { $$ = build_tree_list (build_tree_list (current_declspecs, ! $1), ! all_prefix_attributes); } | absdcl1_noea attributes ! { $$ = build_tree_list (build_tree_list (current_declspecs, ! $1), ! chainon ($2, all_prefix_attributes)); } ; absdcl1: /* a nonempty absolute declarator */ --- 1820,1855 ---- identifier { $$ = build_enumerator ($1, NULL_TREE); } | identifier '=' expr_no_commas ! { $$ = build_enumerator ($1, $3.value); } ; typename: declspecs_nosc { pending_xref_error (); ! $$ = finish_declspecs ($1); } absdcl ! { $$ = XOBNEW (&parser_obstack, struct c_type_name); ! $$->specs = $2; ! $$->declarator = $3; } ; absdcl: /* an absolute declarator */ /* empty */ ! { $$ = build_id_declarator (NULL_TREE); } | absdcl1 ; absdcl_maybe_attribute: /* absdcl maybe_attribute, but not just attributes */ /* empty */ ! { $$ = build_c_parm (current_declspecs, all_prefix_attributes, ! build_id_declarator (NULL_TREE)); } | absdcl1 ! { $$ = build_c_parm (current_declspecs, all_prefix_attributes, ! $1); } | absdcl1_noea attributes ! { $$ = build_c_parm (current_declspecs, ! chainon ($2, all_prefix_attributes), ! $1); } ; absdcl1: /* a nonempty absolute declarator */ *************** absdcl1_noea: *** 1922,1959 **** absdcl1_ea: '*' maybe_type_quals_attrs ! { $$ = make_pointer_declarator ($2, NULL_TREE); } | '*' maybe_type_quals_attrs absdcl1_ea { $$ = make_pointer_declarator ($2, $3); } ; direct_absdcl1: '(' maybe_attribute absdcl1 ')' ! { $$ = $2 ? tree_cons ($2, $3, NULL_TREE) : $3; } | direct_absdcl1 '(' parmlist ! { $$ = build_nt (CALL_EXPR, $1, $3, NULL_TREE); } | direct_absdcl1 array_declarator ! { $$ = set_array_declarator_type ($2, $1, 1); } | '(' parmlist ! { $$ = build_nt (CALL_EXPR, NULL_TREE, $2, NULL_TREE); } | array_declarator ! { $$ = set_array_declarator_type ($1, NULL_TREE, 1); } ; /* The [...] part of a declarator for an array type. */ array_declarator: '[' maybe_type_quals_attrs expr_no_commas ']' ! { $$ = build_array_declarator ($3, $2, 0, 0); } | '[' maybe_type_quals_attrs ']' ! { $$ = build_array_declarator (NULL_TREE, $2, 0, 0); } | '[' maybe_type_quals_attrs '*' ']' ! { $$ = build_array_declarator (NULL_TREE, $2, 0, 1); } | '[' STATIC maybe_type_quals_attrs expr_no_commas ']' ! { $$ = build_array_declarator ($4, $3, 1, 0); } /* declspecs_nosc_nots is a synonym for type_quals_attrs. */ | '[' declspecs_nosc_nots STATIC expr_no_commas ']' ! { $$ = build_array_declarator ($4, $2, 1, 0); } ; /* A nonempty series of declarations and statements (possibly followed by --- 1865,1905 ---- absdcl1_ea: '*' maybe_type_quals_attrs ! { $$ = make_pointer_declarator ! ($2, build_id_declarator (NULL_TREE)); } | '*' maybe_type_quals_attrs absdcl1_ea { $$ = make_pointer_declarator ($2, $3); } ; direct_absdcl1: '(' maybe_attribute absdcl1 ')' ! { $$ = $2 ? build_attrs_declarator ($2, $3) : $3; } | direct_absdcl1 '(' parmlist ! { $$ = build_function_declarator ($3, $1); } | direct_absdcl1 array_declarator ! { $$ = set_array_declarator_inner ($2, $1, true); } | '(' parmlist ! { $$ = build_function_declarator ! ($2, build_id_declarator (NULL_TREE)); } | array_declarator ! { $$ = set_array_declarator_inner ! ($1, build_id_declarator (NULL_TREE), true); } ; /* The [...] part of a declarator for an array type. */ array_declarator: '[' maybe_type_quals_attrs expr_no_commas ']' ! { $$ = build_array_declarator ($3.value, $2, false, false); } | '[' maybe_type_quals_attrs ']' ! { $$ = build_array_declarator (NULL_TREE, $2, false, false); } | '[' maybe_type_quals_attrs '*' ']' ! { $$ = build_array_declarator (NULL_TREE, $2, false, true); } | '[' STATIC maybe_type_quals_attrs expr_no_commas ']' ! { $$ = build_array_declarator ($4.value, $3, true, false); } /* declspecs_nosc_nots is a synonym for type_quals_attrs. */ | '[' declspecs_nosc_nots STATIC expr_no_commas ']' ! { $$ = build_array_declarator ($4.value, $2, true, false); } ; /* A nonempty series of declarations and statements (possibly followed by *************** lineno_stmt_decl_or_labels: *** 2015,2063 **** errstmt: error ';' ; - pushlevel: /* empty */ - { pushlevel (0); - clear_last_expr (); - add_scope_stmt (/*begin_p=*/1, /*partial_p=*/0); - } - ; - - poplevel: /* empty */ - { - if (c_dialect_objc ()) - objc_clear_super_receiver (); - $$ = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0); - } - ; - /* Start and end blocks created for the new scopes of C99. */ c99_block_start: /* empty */ ! { if (flag_isoc99) ! { ! $$ = c_begin_compound_stmt (); ! pushlevel (0); ! clear_last_expr (); ! add_scope_stmt (/*begin_p=*/1, /*partial_p=*/0); ! } ! else ! $$ = NULL_TREE; ! } ! ; ! ! /* Productions using c99_block_start and c99_block_end will need to do what's ! in compstmt: RECHAIN_STMTS ($1, COMPOUND_BODY ($1)); $$ = $2; where ! $1 is the value of c99_block_start and $2 of c99_block_end. */ ! c99_block_end: /* empty */ ! { if (flag_isoc99) ! { ! tree scope_stmt = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0); ! $$ = poplevel (KEEP_MAYBE, 0, 0); ! SCOPE_STMT_BLOCK (TREE_PURPOSE (scope_stmt)) ! = SCOPE_STMT_BLOCK (TREE_VALUE (scope_stmt)) ! = $$; ! } ! else ! $$ = NULL_TREE; } ; /* Read zero or more forward-declarations for labels --- 1961,1969 ---- errstmt: error ';' ; /* Start and end blocks created for the new scopes of C99. */ c99_block_start: /* empty */ ! { $$ = c_begin_compound_stmt (flag_isoc99); } ; /* Read zero or more forward-declarations for labels *************** label_decl: *** 2081,2087 **** { tree label = declare_label (TREE_VALUE (link)); C_DECLARED_LABEL_FLAG (label) = 1; ! add_decl_stmt (label); } } ; --- 1987,1993 ---- { tree label = declare_label (TREE_VALUE (link)); C_DECLARED_LABEL_FLAG (label) = 1; ! add_stmt (build_stmt (DECL_EXPR, label)); } } ; *************** label_decl: *** 2090,2110 **** It causes syntax errors to ignore to the next openbrace. */ compstmt_or_error: compstmt ! {} | error compstmt ; ! compstmt_start: '{' { compstmt_count++; ! $$ = c_begin_compound_stmt (); } ; compstmt_nostart: '}' ! { $$ = convert (void_type_node, integer_zero_node); } ! | pushlevel maybe_label_decls compstmt_contents_nonempty '}' poplevel ! { $$ = poplevel (KEEP_MAYBE, 0, 0); ! SCOPE_STMT_BLOCK (TREE_PURPOSE ($5)) ! = SCOPE_STMT_BLOCK (TREE_VALUE ($5)) ! = $$; } ; compstmt_contents_nonempty: --- 1996,2010 ---- It causes syntax errors to ignore to the next openbrace. */ compstmt_or_error: compstmt ! { add_stmt ($1); } | error compstmt ; ! compstmt_start: '{' { $$ = c_begin_compound_stmt (true); } ; compstmt_nostart: '}' ! | maybe_label_decls compstmt_contents_nonempty '}' ; compstmt_contents_nonempty: *************** compstmt_contents_nonempty: *** 2114,2189 **** compstmt_primary_start: '(' '{' ! { if (last_tree == NULL) { ! error ("braced-group within expression allowed only inside a function"); YYERROR; } ! /* We must force a BLOCK for this level ! so that, if it is not expanded later, ! there is a way to turn off the entire subtree of blocks ! that are contained in it. */ ! keep_next_level (); ! compstmt_count++; ! $$ = add_stmt (build_stmt (COMPOUND_STMT, last_tree)); ! last_expr_type = NULL_TREE; } ; compstmt: compstmt_start compstmt_nostart ! { RECHAIN_STMTS ($1, COMPOUND_BODY ($1)); ! last_expr_type = NULL_TREE; ! $$ = $1; } ! ; ! ! /* Value is number of statements counted as of the closeparen. */ ! simple_if: ! if_prefix c99_block_lineno_labeled_stmt ! { c_finish_then (); } ! /* Make sure c_expand_end_cond is run once ! for each call to c_expand_start_cond. ! Otherwise a crash is likely. */ ! | if_prefix error ! ; ! ! if_prefix: ! /* We must build the IF_STMT node before parsing its ! condition so that STMT_LINENO refers to the line ! containing the "if", and not the line containing ! the close-parenthesis. ! ! c_begin_if_stmt returns the IF_STMT node, which ! we later pass to c_expand_start_cond to fill ! in the condition and other tidbits. */ ! IF ! { $$ = c_begin_if_stmt (); } ! '(' expr ')' ! { c_expand_start_cond (c_common_truthvalue_conversion ($4), ! compstmt_count,$2); ! $$ = stmt_count; ! if_stmt_locus = $-1; } ! ; ! ! /* This is a subroutine of stmt. ! It is used twice, once for valid DO statements ! and once for catching errors in parsing the end test. */ ! do_stmt_start: ! DO ! { stmt_count++; ! compstmt_count++; ! c_in_iteration_stmt++; ! $$ ! = add_stmt (build_stmt (DO_STMT, NULL_TREE, ! NULL_TREE)); ! /* In the event that a parse error prevents ! parsing the complete do-statement, set the ! condition now. Otherwise, we can get crashes at ! RTL-generation time. */ ! DO_COND ($$) = error_mark_node; } ! c99_block_lineno_labeled_stmt WHILE ! { $$ = $2; ! RECHAIN_STMTS ($$, DO_BODY ($$)); ! c_in_iteration_stmt--; } ; /* The forced readahead in here is because we might be at the end of a --- 2014,2031 ---- compstmt_primary_start: '(' '{' ! { if (cur_stmt_list == NULL) { ! error ("braced-group within expression allowed " ! "only inside a function"); YYERROR; } ! $$ = c_begin_stmt_expr (); } ; compstmt: compstmt_start compstmt_nostart ! { $$ = c_end_compound_stmt ($1, true); } ; /* The forced readahead in here is because we might be at the end of a *************** save_location: *** 2196,2440 **** $$ = input_location; } ; ! lineno_labeled_stmt: ! lineno_stmt ! | lineno_label lineno_labeled_stmt ; ! /* Like lineno_labeled_stmt, but a block in C99. */ c99_block_lineno_labeled_stmt: ! c99_block_start lineno_labeled_stmt c99_block_end ! { if (flag_isoc99) ! RECHAIN_STMTS ($1, COMPOUND_BODY ($1)); } ; lineno_stmt: save_location stmt ! { if ($2) ! { ! STMT_LINENO ($2) = $1.line; ! /* ??? We currently have no way of recording ! the filename for a statement. This probably ! matters little in practice at the moment, ! but I suspect that problems will occur when ! doing inlining at the tree level. */ ! } } ; lineno_label: save_location label ! { if ($2) ! { ! STMT_LINENO ($2) = $1.line; ! } ! } ; ! select_or_iter_stmt: ! simple_if ELSE ! { c_expand_start_else (); ! $1 = stmt_count; } ! c99_block_lineno_labeled_stmt ! { c_finish_else (); ! c_expand_end_cond (); ! if (extra_warnings && stmt_count == $1) ! warning ("empty body in an else-statement"); } ! | simple_if %prec IF ! { c_expand_end_cond (); ! /* This warning is here instead of in simple_if, because we ! do not want a warning if an empty if is followed by an ! else statement. Increment stmt_count so we don't ! give a second error if this is a nested `if'. */ ! if (extra_warnings && stmt_count++ == $1) ! warning ("%Hempty body in an if-statement", ! &if_stmt_locus); } ! /* Make sure c_expand_end_cond is run once ! for each call to c_expand_start_cond. ! Otherwise a crash is likely. */ ! | simple_if ELSE error ! { c_expand_end_cond (); } ! /* We must build the WHILE_STMT node before parsing its ! condition so that STMT_LINENO refers to the line ! containing the "while", and not the line containing ! the close-parenthesis. ! c_begin_while_stmt returns the WHILE_STMT node, which ! we later pass to c_finish_while_stmt_cond to fill ! in the condition and other tidbits. */ ! | WHILE ! { stmt_count++; ! $$ = c_begin_while_stmt (); } ! '(' expr ')' ! { c_in_iteration_stmt++; ! $4 = c_common_truthvalue_conversion ($4); ! c_finish_while_stmt_cond ! (c_common_truthvalue_conversion ($4), $2); ! $$ = add_stmt ($2); } ! c99_block_lineno_labeled_stmt ! { c_in_iteration_stmt--; ! RECHAIN_STMTS ($6, WHILE_BODY ($6)); } ! | do_stmt_start ! '(' expr ')' ';' ! { DO_COND ($1) = c_common_truthvalue_conversion ($3); } ! | do_stmt_start error ! { } ! | FOR ! { $$ = build_stmt (FOR_STMT, NULL_TREE, NULL_TREE, ! NULL_TREE, NULL_TREE); ! add_stmt ($$); } ! '(' for_init_stmt ! { stmt_count++; ! RECHAIN_STMTS ($2, FOR_INIT_STMT ($2)); } ! xexpr ';' ! { if ($6) ! FOR_COND ($2) ! = c_common_truthvalue_conversion ($6); } ! xexpr ')' ! { c_in_iteration_stmt++; ! FOR_EXPR ($2) = $9; } ! c99_block_lineno_labeled_stmt ! { RECHAIN_STMTS ($2, FOR_BODY ($2)); ! c_in_iteration_stmt--;} ! | SWITCH '(' expr ')' ! { stmt_count++; ! $$ = c_start_case ($3); ! c_in_case_stmt++; } ! c99_block_lineno_labeled_stmt ! { c_finish_case (); ! c_in_case_stmt--; } ; for_init_stmt: xexpr ';' ! { add_stmt (build_stmt (EXPR_STMT, $1)); } | decl { check_for_loop_decls (); } ; ! /* Parse a single real statement, not including any labels. */ ! stmt: ! compstmt ! { stmt_count++; $$ = $1; } ! | expr ';' ! { stmt_count++; ! $$ = c_expand_expr_stmt ($1); } ! | c99_block_start select_or_iter_stmt c99_block_end ! { if (flag_isoc99) ! RECHAIN_STMTS ($1, COMPOUND_BODY ($1)); ! $$ = NULL_TREE; } | BREAK ';' ! { stmt_count++; ! if (!(c_in_iteration_stmt || c_in_case_stmt)) ! { ! error ("break statement not within loop or switch"); ! $$ = NULL_TREE; ! } ! else ! $$ = add_stmt (build_break_stmt ()); } | CONTINUE ';' ! { stmt_count++; ! if (!c_in_iteration_stmt) ! { ! error ("continue statement not within a loop"); ! $$ = NULL_TREE; ! } ! else ! $$ = add_stmt (build_continue_stmt ()); } | RETURN ';' ! { stmt_count++; ! $$ = c_expand_return (NULL_TREE); } | RETURN expr ';' ! { stmt_count++; ! $$ = c_expand_return ($2); } ! | ASM_KEYWORD maybe_type_qual '(' expr ')' ';' ! { stmt_count++; ! $$ = simple_asm_stmt ($4); } ! /* This is the case with just output operands. */ ! | ASM_KEYWORD maybe_type_qual '(' expr ':' asm_operands ')' ';' ! { stmt_count++; ! $$ = build_asm_stmt ($2, $4, $6, NULL_TREE, NULL_TREE); } ! /* This is the case with input operands as well. */ ! | ASM_KEYWORD maybe_type_qual '(' expr ':' asm_operands ':' ! asm_operands ')' ';' ! { stmt_count++; ! $$ = build_asm_stmt ($2, $4, $6, $8, NULL_TREE); } ! /* This is the case with clobbered registers as well. */ ! | ASM_KEYWORD maybe_type_qual '(' expr ':' asm_operands ':' ! asm_operands ':' asm_clobbers ')' ';' ! { stmt_count++; ! $$ = build_asm_stmt ($2, $4, $6, $8, $10); } | GOTO identifier ';' ! { tree decl; ! stmt_count++; ! decl = lookup_label ($2); ! if (decl != 0) ! { ! TREE_USED (decl) = 1; ! $$ = add_stmt (build_stmt (GOTO_STMT, decl)); ! } ! else ! $$ = NULL_TREE; ! } | GOTO '*' expr ';' ! { if (pedantic) ! pedwarn ("ISO C forbids `goto *expr;'"); ! stmt_count++; ! $3 = convert (ptr_type_node, $3); ! $$ = add_stmt (build_stmt (GOTO_STMT, $3)); } | ';' { $$ = NULL_TREE; } | AT_THROW expr ';' ! { stmt_count++; ! $$ = objc_build_throw_stmt ($2); ! } | AT_THROW ';' ! { stmt_count++; ! $$ = objc_build_throw_stmt (NULL_TREE); ! } | objc_try_catch_stmt ! { objc_build_finally_prologue (); } ! objc_finally_block ! { $$ = objc_build_try_catch_finally_stmt ($1, $3); } ! | AT_SYNCHRONIZED '(' expr ')' ! { objc_build_synchronized_prologue ($3); } ! compstmt ! { $$ = objc_build_synchronized_epilogue (); } ; ! objc_try_catch_stmt: ! objc_try_stmt ! { objc_build_try_epilogue (1); } ! objc_catch_list ! { objc_build_catch_epilogue (); $$ = 1; } ! | objc_try_stmt ! { objc_build_try_epilogue (0); $$ = 0; } ; ! objc_try_stmt: ! AT_TRY ! { objc_build_try_prologue (); } ! compstmt ; ! objc_catch_list: ! objc_catch_list objc_catch_block ! | objc_catch_block ; ! objc_catch_block: ! AT_CATCH '(' parm ')' ! { objc_build_catch_stmt ($3); } ! compstmt ! { stmt_count++; } ; ! objc_finally_block: ! AT_FINALLY compstmt ! { $$ = 1; } ! | /* NULL */ ! { $$ = 0; } ; /* Any kind of label, including jump labels and case labels. --- 2038,2280 ---- $$ = input_location; } ; ! lineno_labels: ! /* empty */ ! | lineno_labels lineno_label ; ! /* A labeled statement. In C99 it also generates an implicit block. */ c99_block_lineno_labeled_stmt: ! c99_block_start lineno_labels lineno_stmt ! { $$ = c_end_compound_stmt ($1, flag_isoc99); } ; lineno_stmt: save_location stmt ! { ! /* Two cases cannot and do not have line numbers associated: ! If stmt is degenerate, such as "2;", then stmt is an ! INTEGER_CST, which cannot hold line numbers. But that's ! ok because the statement will either be changed to a ! MODIFY_EXPR during gimplification of the statement expr, ! or discarded. If stmt was compound, but without new ! variables, we will have skipped the creation of a BIND ! and will have a bare STATEMENT_LIST. But that's ok ! because (recursively) all of the component statments ! should already have line numbers assigned. */ ! if ($2 && EXPR_P ($2)) ! SET_EXPR_LOCATION ($2, $1); } ; lineno_label: save_location label ! { if ($2) SET_EXPR_LOCATION ($2, $1); } ; ! condition: save_location expr ! { $$ = lang_hooks.truthvalue_conversion ($2.value); ! if (EXPR_P ($$)) ! SET_EXPR_LOCATION ($$, $1); } ! ; ! /* Implement -Wparenthesis by special casing IF statement directly nested ! within IF statement. This requires some amount of duplication of the ! productions under c99_block_lineno_labeled_stmt in order to work out. ! But it's still likely more maintainable than lots of state outside the ! parser... */ ! ! if_statement_1: ! c99_block_start lineno_labels if_statement ! { $$ = c_end_compound_stmt ($1, flag_isoc99); } ! ; ! ! if_statement_2: ! c99_block_start lineno_labels ';' ! { if (extra_warnings) ! add_stmt (build (NOP_EXPR, NULL_TREE, NULL_TREE)); ! $$ = c_end_compound_stmt ($1, flag_isoc99); } ! | c99_block_lineno_labeled_stmt ! ; ! ! if_statement: ! IF c99_block_start save_location '(' condition ')' ! if_statement_1 ELSE if_statement_2 ! { c_finish_if_stmt ($3, $5, $7, $9, true); ! add_stmt (c_end_compound_stmt ($2, flag_isoc99)); } ! | IF c99_block_start save_location '(' condition ')' ! if_statement_2 ELSE if_statement_2 ! { c_finish_if_stmt ($3, $5, $7, $9, false); ! add_stmt (c_end_compound_stmt ($2, flag_isoc99)); } ! | IF c99_block_start save_location '(' condition ')' ! if_statement_1 %prec IF ! { c_finish_if_stmt ($3, $5, $7, NULL, true); ! add_stmt (c_end_compound_stmt ($2, flag_isoc99)); } ! | IF c99_block_start save_location '(' condition ')' ! if_statement_2 %prec IF ! { c_finish_if_stmt ($3, $5, $7, NULL, false); ! add_stmt (c_end_compound_stmt ($2, flag_isoc99)); } ! ; ! ! start_break: /* empty */ ! { $$ = c_break_label; c_break_label = NULL; } ! ; ! ! start_continue: /* empty */ ! { $$ = c_cont_label; c_cont_label = NULL; } ! ; ! ! while_statement: ! WHILE c99_block_start save_location '(' condition ')' ! start_break start_continue c99_block_lineno_labeled_stmt ! { c_finish_loop ($3, $5, NULL, $9, c_break_label, ! c_cont_label, true); ! add_stmt (c_end_compound_stmt ($2, flag_isoc99)); ! c_break_label = $7; c_cont_label = $8; } ! ; ! ! do_statement: ! DO c99_block_start save_location start_break start_continue ! c99_block_lineno_labeled_stmt WHILE ! { $$ = c_break_label; c_break_label = $4; } ! { $$ = c_cont_label; c_cont_label = $5; } ! '(' condition ')' ';' ! { c_finish_loop ($3, $11, NULL, $6, $8, ! $9, false); ! add_stmt (c_end_compound_stmt ($2, flag_isoc99)); } ! ; ! ! xexpr: ! /* empty */ ! { $$ = NULL_TREE; } ! | expr ! { $$ = $1.value; } ; for_init_stmt: xexpr ';' ! { c_finish_expr_stmt ($1); } | decl { check_for_loop_decls (); } ; ! for_cond_expr: save_location xexpr ! { if ($2) ! { ! $$ = lang_hooks.truthvalue_conversion ($2); ! if (EXPR_P ($$)) ! SET_EXPR_LOCATION ($$, $1); ! } ! else ! $$ = NULL; ! } ! ; ! ! for_incr_expr: xexpr ! { $$ = c_process_expr_stmt ($1); } ! ; ! ! for_statement: ! FOR c99_block_start '(' for_init_stmt ! save_location for_cond_expr ';' for_incr_expr ')' ! start_break start_continue c99_block_lineno_labeled_stmt ! { c_finish_loop ($5, $6, $8, $12, c_break_label, ! c_cont_label, true); ! add_stmt (c_end_compound_stmt ($2, flag_isoc99)); ! c_break_label = $10; c_cont_label = $11; } ! ; ! ! switch_statement: ! SWITCH c99_block_start '(' expr ')' ! { $$ = c_start_case ($4.value); } ! start_break c99_block_lineno_labeled_stmt ! { c_finish_case ($8); ! if (c_break_label) ! add_stmt (build (LABEL_EXPR, void_type_node, ! c_break_label)); ! c_break_label = $7; ! add_stmt (c_end_compound_stmt ($2, flag_isoc99)); } ! ; ! ! /* Parse a single real statement, not including any labels or compounds. */ ! stmt_nocomp: ! expr ';' ! { $$ = c_finish_expr_stmt ($1.value); } ! | if_statement ! { $$ = NULL_TREE; } ! | while_statement ! { $$ = NULL_TREE; } ! | do_statement ! { $$ = NULL_TREE; } ! | for_statement ! { $$ = NULL_TREE; } ! | switch_statement ! { $$ = NULL_TREE; } | BREAK ';' ! { $$ = c_finish_bc_stmt (&c_break_label, true); } | CONTINUE ';' ! { $$ = c_finish_bc_stmt (&c_cont_label, false); } | RETURN ';' ! { $$ = c_finish_return (NULL_TREE); } | RETURN expr ';' ! { $$ = c_finish_return ($2.value); } ! | asm_stmt | GOTO identifier ';' ! { $$ = c_finish_goto_label ($2); } | GOTO '*' expr ';' ! { $$ = c_finish_goto_ptr ($3.value); } | ';' { $$ = NULL_TREE; } | AT_THROW expr ';' ! { $$ = objc_build_throw_stmt ($2.value); } | AT_THROW ';' ! { $$ = objc_build_throw_stmt (NULL_TREE); } | objc_try_catch_stmt ! { $$ = NULL_TREE; } ! | AT_SYNCHRONIZED save_location '(' expr ')' compstmt ! { objc_build_synchronized ($2, $4.value, $6); $$ = NULL_TREE; } ; ! objc_catch_prefix: ! AT_CATCH '(' parm ')' ! { objc_begin_catch_clause (grokparm ($3)); } ; + objc_catch_clause: + objc_catch_prefix '{' compstmt_nostart + { objc_finish_catch_clause (); } + | objc_catch_prefix '{' error '}' + { objc_finish_catch_clause (); } + ; ! objc_opt_catch_list: ! /* empty */ ! | objc_opt_catch_list objc_catch_clause ; ! objc_try_catch_clause: ! AT_TRY save_location compstmt ! { objc_begin_try_stmt ($2, $3); } ! objc_opt_catch_list ; ! objc_finally_clause: ! AT_FINALLY save_location compstmt ! { objc_build_finally_clause ($2, $3); } ; ! objc_try_catch_stmt: ! objc_try_catch_clause ! { objc_finish_try_stmt (); } ! | objc_try_catch_clause objc_finally_clause ! { objc_finish_try_stmt (); } ! ; ! ! /* Parse a single or compound real statement, not including any labels. */ ! stmt: ! compstmt ! { add_stmt ($1); $$ = NULL_TREE; } ! | stmt_nocomp ; /* Any kind of label, including jump labels and case labels. *************** objc_finally_block: *** 2442,2481 **** also at the end of a compound statement. */ label: CASE expr_no_commas ':' ! { stmt_count++; ! $$ = do_case ($2, NULL_TREE); } | CASE expr_no_commas ELLIPSIS expr_no_commas ':' ! { stmt_count++; ! $$ = do_case ($2, $4); } | DEFAULT ':' ! { stmt_count++; ! $$ = do_case (NULL_TREE, NULL_TREE); } | identifier save_location ':' maybe_attribute { tree label = define_label ($2, $1); - stmt_count++; if (label) { decl_attributes (&label, $4, 0); ! $$ = add_stmt (build_stmt (LABEL_STMT, label)); } else $$ = NULL_TREE; } ; ! /* Either a type-qualifier or nothing. First thing in an `asm' statement. */ ! maybe_type_qual: ! /* empty */ { $$ = NULL_TREE; } ! | TYPE_QUAL ! { } ; ! xexpr: /* empty */ ! { $$ = NULL_TREE; } ! | expr ; /* These are the operands other than the first string and colon --- 2282,2366 ---- also at the end of a compound statement. */ label: CASE expr_no_commas ':' ! { $$ = do_case ($2.value, NULL_TREE); } | CASE expr_no_commas ELLIPSIS expr_no_commas ':' ! { $$ = do_case ($2.value, $4.value); } | DEFAULT ':' ! { $$ = do_case (NULL_TREE, NULL_TREE); } | identifier save_location ':' maybe_attribute { tree label = define_label ($2, $1); if (label) { decl_attributes (&label, $4, 0); ! $$ = add_stmt (build_stmt (LABEL_EXPR, label)); } else $$ = NULL_TREE; } ; ! /* Asm expressions and statements */ ! /* simple_asm_expr is used in restricted contexts, where a full ! expression with inputs and outputs does not make sense. */ ! simple_asm_expr: ! ASM_KEYWORD stop_string_translation ! '(' asm_string ')' start_string_translation ! { $$ = $4; } ! ; ! ! /* maybeasm: used for assembly names for declarations */ ! maybeasm: ! /* empty */ { $$ = NULL_TREE; } ! | simple_asm_expr ; ! /* asmdef: asm() outside a function body. */ ! asmdef: ! simple_asm_expr ';' ! { assemble_asm ($1); } ! | ASM_KEYWORD error start_string_translation ';' ! {} ! ; ! ! /* Full-blown asm statement with inputs, outputs, clobbers, and ! volatile tag allowed. */ ! asm_stmt: ! ASM_KEYWORD maybe_volatile stop_string_translation ! '(' asm_argument ')' start_string_translation ';' ! { $$ = build_asm_stmt ($2, $5); } ! ; ! ! asm_argument: ! /* no operands */ ! asm_string ! { $$ = build_asm_expr ($1, 0, 0, 0, true); } ! /* output operands */ ! | asm_string ':' asm_operands ! { $$ = build_asm_expr ($1, $3, 0, 0, false); } ! /* output and input operands */ ! | asm_string ':' asm_operands ':' asm_operands ! { $$ = build_asm_expr ($1, $3, $5, 0, false); } ! /* output and input operands and clobbers */ ! | asm_string ':' asm_operands ':' asm_operands ':' asm_clobbers ! { $$ = build_asm_expr ($1, $3, $5, $7, false); } ! ; ! ! /* Either 'volatile' or nothing. First thing in an `asm' statement. */ ! ! maybe_volatile: /* empty */ ! { $$ = 0; } ! | TYPE_QUAL ! { if ($1 != ridpointers[RID_VOLATILE]) ! { ! warning ("%E qualifier ignored on asm", $1); ! $$ = 0; ! } ! else ! $$ = $1; ! } ; /* These are the operands other than the first string and colon *************** nonnull_asm_operands: *** 2492,2511 **** ; asm_operand: ! STRING '(' expr ')' ! { $$ = build_tree_list (build_tree_list (NULL_TREE, $1), $3); } ! | '[' identifier ']' STRING '(' expr ')' { $2 = build_string (IDENTIFIER_LENGTH ($2), IDENTIFIER_POINTER ($2)); ! $$ = build_tree_list (build_tree_list ($2, $4), $6); } ; asm_clobbers: ! STRING { $$ = tree_cons (NULL_TREE, $1, NULL_TREE); } ! | asm_clobbers ',' STRING { $$ = tree_cons (NULL_TREE, $3, $1); } ; /* This is what appears inside the parens in a function declarator. Its value is a list of ..._TYPE nodes. Attributes must appear here --- 2377,2421 ---- ; asm_operand: ! asm_string start_string_translation '(' expr ')' ! stop_string_translation ! { $$ = build_tree_list (build_tree_list (NULL_TREE, $1), ! $4.value); } ! | '[' identifier ']' asm_string start_string_translation ! '(' expr ')' stop_string_translation { $2 = build_string (IDENTIFIER_LENGTH ($2), IDENTIFIER_POINTER ($2)); ! $$ = build_tree_list (build_tree_list ($2, $4), $7.value); } ; asm_clobbers: ! asm_string { $$ = tree_cons (NULL_TREE, $1, NULL_TREE); } ! | asm_clobbers ',' asm_string { $$ = tree_cons (NULL_TREE, $3, $1); } ; + + /* Strings in 'asm' must be narrow strings. */ + asm_string: + STRING + { if (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE ($1))) + != char_type_node) + { + error ("wide string literal in %"); + $$ = build_string (1, ""); + } + else + $$ = $1; } + ; + + stop_string_translation: + { c_lex_string_translate = 0; } + ; + + start_string_translation: + { c_lex_string_translate = 1; } + ; + /* This is what appears inside the parens in a function declarator. Its value is a list of ..._TYPE nodes. Attributes must appear here *************** asm_clobbers: *** 2514,2524 **** "void bar (int (__attribute__((__mode__(SI))) int foo));". */ parmlist: maybe_attribute ! { pushlevel (0); declare_parm_level (); } parmlist_1 { $$ = $3; ! poplevel (0, 0, 0); } ; parmlist_1: --- 2424,2434 ---- "void bar (int (__attribute__((__mode__(SI))) int foo));". */ parmlist: maybe_attribute ! { push_scope (); declare_parm_level (); } parmlist_1 { $$ = $3; ! pop_scope (); } ; parmlist_1: *************** parmlist_1: *** 2531,2562 **** parmlist_1 { $$ = $6; } | error ')' ! { $$ = tree_cons (NULL_TREE, NULL_TREE, NULL_TREE); } ; /* This is what appears inside the parens in a function declarator. ! Is value is represented in the format that grokdeclarator expects. */ parmlist_2: /* empty */ ! { $$ = get_parm_info (0); } | ELLIPSIS ! { $$ = get_parm_info (0); ! /* Gcc used to allow this as an extension. However, it does ! not work for all targets, and thus has been disabled. ! Also, since func (...) and func () are indistinguishable, ! it caused problems with the code in expand_builtin which ! tries to verify that BUILT_IN_NEXT_ARG is being used ! correctly. */ ! error ("ISO C requires a named argument before `...'"); ! parsing_iso_function_signature = true; } | parms ! { $$ = get_parm_info (1); ! parsing_iso_function_signature = true; ! } | parms ',' ELLIPSIS ! { $$ = get_parm_info (0); ! parsing_iso_function_signature = true; ! } ; parms: --- 2441,2474 ---- parmlist_1 { $$ = $6; } | error ')' ! { $$ = XOBNEW (&parser_obstack, struct c_arg_info); ! $$->parms = 0; ! $$->tags = 0; ! $$->types = 0; ! $$->others = 0; } ; /* This is what appears inside the parens in a function declarator. ! Its value is represented in the format that grokdeclarator expects. */ parmlist_2: /* empty */ ! { $$ = XOBNEW (&parser_obstack, struct c_arg_info); ! $$->parms = 0; ! $$->tags = 0; ! $$->types = 0; ! $$->others = 0; } | ELLIPSIS ! { $$ = XOBNEW (&parser_obstack, struct c_arg_info); ! $$->parms = 0; ! $$->tags = 0; ! $$->others = 0; ! /* Suppress -Wold-style-definition for this case. */ ! $$->types = error_mark_node; ! error ("ISO C requires a named argument before %<...%>"); } | parms ! { $$ = get_parm_info (/*ellipsis=*/false); } | parms ',' ELLIPSIS ! { $$ = get_parm_info (/*ellipsis=*/true); } ; parms: *************** parms: *** 2570,2591 **** as found in a parmlist. */ parm: declspecs_ts setspecs parm_declarator maybe_attribute ! { $$ = build_tree_list (build_tree_list (current_declspecs, ! $3), ! chainon ($4, all_prefix_attributes)); POP_DECLSPEC_STACK; } | declspecs_ts setspecs notype_declarator maybe_attribute ! { $$ = build_tree_list (build_tree_list (current_declspecs, ! $3), ! chainon ($4, all_prefix_attributes)); POP_DECLSPEC_STACK; } | declspecs_ts setspecs absdcl_maybe_attribute { $$ = $3; POP_DECLSPEC_STACK; } | declspecs_nots setspecs notype_declarator maybe_attribute ! { $$ = build_tree_list (build_tree_list (current_declspecs, ! $3), ! chainon ($4, all_prefix_attributes)); POP_DECLSPEC_STACK; } | declspecs_nots setspecs absdcl_maybe_attribute --- 2482,2500 ---- as found in a parmlist. */ parm: declspecs_ts setspecs parm_declarator maybe_attribute ! { $$ = build_c_parm (current_declspecs, ! chainon ($4, all_prefix_attributes), $3); POP_DECLSPEC_STACK; } | declspecs_ts setspecs notype_declarator maybe_attribute ! { $$ = build_c_parm (current_declspecs, ! chainon ($4, all_prefix_attributes), $3); POP_DECLSPEC_STACK; } | declspecs_ts setspecs absdcl_maybe_attribute { $$ = $3; POP_DECLSPEC_STACK; } | declspecs_nots setspecs notype_declarator maybe_attribute ! { $$ = build_c_parm (current_declspecs, ! chainon ($4, all_prefix_attributes), $3); POP_DECLSPEC_STACK; } | declspecs_nots setspecs absdcl_maybe_attribute *************** parm: *** 2597,2618 **** stack. */ firstparm: declspecs_ts_nosa setspecs_fp parm_declarator maybe_attribute ! { $$ = build_tree_list (build_tree_list (current_declspecs, ! $3), ! chainon ($4, all_prefix_attributes)); POP_DECLSPEC_STACK; } | declspecs_ts_nosa setspecs_fp notype_declarator maybe_attribute ! { $$ = build_tree_list (build_tree_list (current_declspecs, ! $3), ! chainon ($4, all_prefix_attributes)); POP_DECLSPEC_STACK; } | declspecs_ts_nosa setspecs_fp absdcl_maybe_attribute { $$ = $3; POP_DECLSPEC_STACK; } | declspecs_nots_nosa setspecs_fp notype_declarator maybe_attribute ! { $$ = build_tree_list (build_tree_list (current_declspecs, ! $3), ! chainon ($4, all_prefix_attributes)); POP_DECLSPEC_STACK; } | declspecs_nots_nosa setspecs_fp absdcl_maybe_attribute --- 2506,2524 ---- stack. */ firstparm: declspecs_ts_nosa setspecs_fp parm_declarator maybe_attribute ! { $$ = build_c_parm (current_declspecs, ! chainon ($4, all_prefix_attributes), $3); POP_DECLSPEC_STACK; } | declspecs_ts_nosa setspecs_fp notype_declarator maybe_attribute ! { $$ = build_c_parm (current_declspecs, ! chainon ($4, all_prefix_attributes), $3); POP_DECLSPEC_STACK; } | declspecs_ts_nosa setspecs_fp absdcl_maybe_attribute { $$ = $3; POP_DECLSPEC_STACK; } | declspecs_nots_nosa setspecs_fp notype_declarator maybe_attribute ! { $$ = build_c_parm (current_declspecs, ! chainon ($4, all_prefix_attributes), $3); POP_DECLSPEC_STACK; } | declspecs_nots_nosa setspecs_fp absdcl_maybe_attribute *************** setspecs_fp: *** 2631,2657 **** Its value is a list of ..._TYPE nodes or a list of identifiers. */ parmlist_or_identifiers: maybe_attribute ! { pushlevel (0); declare_parm_level (); } parmlist_or_identifiers_1 { $$ = $3; ! poplevel (0, 0, 0); } ; parmlist_or_identifiers_1: parmlist_1 | identifiers ')' ! { tree t; ! for (t = $1; t; t = TREE_CHAIN (t)) ! if (TREE_VALUE (t) == NULL_TREE) ! error ("`...' in old-style identifier list"); ! $$ = tree_cons (NULL_TREE, NULL_TREE, $1); /* Make sure we have a parmlist after attributes. */ ! if ($-1 != 0 ! && (TREE_CODE ($$) != TREE_LIST ! || TREE_PURPOSE ($$) == 0 ! || TREE_CODE (TREE_PURPOSE ($$)) != PARM_DECL)) YYERROR1; } ; --- 2537,2560 ---- Its value is a list of ..._TYPE nodes or a list of identifiers. */ parmlist_or_identifiers: maybe_attribute ! { push_scope (); declare_parm_level (); } parmlist_or_identifiers_1 { $$ = $3; ! pop_scope (); } ; parmlist_or_identifiers_1: parmlist_1 | identifiers ')' ! { $$ = XOBNEW (&parser_obstack, struct c_arg_info); ! $$->parms = 0; ! $$->tags = 0; ! $$->types = $1; ! $$->others = 0; /* Make sure we have a parmlist after attributes. */ ! if ($-1 != 0) YYERROR1; } ; *************** identifiers_or_typenames: *** 2674,2680 **** extension: EXTENSION ! { $$ = SAVE_EXT_FLAGS(); pedantic = 0; warn_pointer_arith = 0; warn_traditional = 0; --- 2577,2583 ---- extension: EXTENSION ! { $$ = SAVE_EXT_FLAGS (); pedantic = 0; warn_pointer_arith = 0; warn_traditional = 0; *************** objcdef: *** 2689,2704 **** | aliasdecl | protocoldef | methoddef ! | END { ! if (objc_implementation_context) ! { ! finish_class (objc_implementation_context); ! objc_ivar_chain = NULL_TREE; ! objc_implementation_context = NULL_TREE; ! } ! else ! warning ("`@end' must appear in an implementation context"); } ; --- 2592,2600 ---- | aliasdecl | protocoldef | methoddef ! | AT_END { ! objc_finish_implementation (); } ; *************** identifier_list: *** 2711,2724 **** ; classdecl: ! CLASS identifier_list ';' { objc_declare_class ($2); } ; aliasdecl: ! ALIAS identifier identifier ';' { objc_declare_alias ($2, $3); } --- 2607,2620 ---- ; classdecl: ! AT_CLASS identifier_list ';' { objc_declare_class ($2); } ; aliasdecl: ! AT_ALIAS identifier identifier ';' { objc_declare_alias ($2, $3); } *************** class_ivars: *** 2735,2806 **** ; classdef: ! INTERFACE identifier superclass protocolrefs { ! objc_interface_context = objc_ivar_context ! = start_class (CLASS_INTERFACE_TYPE, $2, $3, $4); ! objc_public_flag = 0; } class_ivars { ! continue_class (objc_interface_context); } ! methodprotolist END { ! finish_class (objc_interface_context); ! objc_interface_context = NULL_TREE; } ! | IMPLEMENTATION identifier superclass { ! objc_implementation_context = objc_ivar_context ! = start_class (CLASS_IMPLEMENTATION_TYPE, $2, $3, NULL_TREE); ! objc_public_flag = 0; } class_ivars { ! objc_ivar_chain ! = continue_class (objc_implementation_context); } ! | INTERFACE identifier '(' identifier ')' protocolrefs { ! objc_interface_context ! = start_class (CATEGORY_INTERFACE_TYPE, $2, $4, $6); ! continue_class (objc_interface_context); } ! methodprotolist END { ! finish_class (objc_interface_context); ! objc_interface_context = NULL_TREE; } ! | IMPLEMENTATION identifier '(' identifier ')' { ! objc_implementation_context ! = start_class (CATEGORY_IMPLEMENTATION_TYPE, $2, $4, NULL_TREE); ! objc_ivar_chain ! = continue_class (objc_implementation_context); } ; protocoldef: ! PROTOCOL identifier protocolrefs { objc_pq_context = 1; ! objc_interface_context ! = start_protocol(PROTOCOL_INTERFACE_TYPE, $2, $3); } ! methodprotolist END { objc_pq_context = 0; ! finish_protocol(objc_interface_context); ! objc_interface_context = NULL_TREE; } /* The @protocol forward-declaration production introduces a reduce/reduce conflict on ';', which should be resolved in favor of the production 'identifier_list -> identifier'. */ ! | PROTOCOL identifier_list ';' { objc_declare_protocols ($2); } --- 2631,2688 ---- ; classdef: ! AT_INTERFACE identifier superclass protocolrefs { ! objc_start_class_interface ($2, $3, $4); } class_ivars { ! objc_continue_interface (); } ! methodprotolist AT_END { ! objc_finish_interface (); } ! | AT_IMPLEMENTATION identifier superclass { ! objc_start_class_implementation ($2, $3); } class_ivars { ! objc_continue_implementation (); } ! | AT_INTERFACE identifier '(' identifier ')' protocolrefs { ! objc_start_category_interface ($2, $4, $6); } ! methodprotolist AT_END { ! objc_finish_interface (); } ! | AT_IMPLEMENTATION identifier '(' identifier ')' { ! objc_start_category_implementation ($2, $4); } ; protocoldef: ! AT_PROTOCOL identifier protocolrefs { objc_pq_context = 1; ! objc_start_protocol ($2, $3); } ! methodprotolist AT_END { objc_pq_context = 0; ! objc_finish_interface (); } /* The @protocol forward-declaration production introduces a reduce/reduce conflict on ';', which should be resolved in favor of the production 'identifier_list -> identifier'. */ ! | AT_PROTOCOL identifier_list ';' { objc_declare_protocols ($2); } *************** non_empty_protocolrefs: *** 2825,2933 **** ; ivar_decl_list: ! ivar_decl_list visibility_spec ivar_decls ! | ivar_decls ; visibility_spec: ! PRIVATE { objc_public_flag = 2; } ! | PROTECTED { objc_public_flag = 0; } ! | PUBLIC { objc_public_flag = 1; } ; ivar_decls: ! /* empty */ ! { ! $$ = NULL_TREE; ! } | ivar_decls ivar_decl ';' | ivar_decls ';' { ! if (pedantic) pedwarn ("extra semicolon in struct or union specified"); ! } ; - - /* There is a shift-reduce conflict here, because `components' may - start with a `typename'. It happens that shifting (the default resolution) - does the right thing, because it treats the `typename' as part of - a `typed_typespecs'. - - It is possible that this same technique would allow the distinction - between `notype_initdecls' and `initdecls' to be eliminated. - But I am being cautious and not trying it. */ - ivar_decl: ! declspecs_nosc_ts setspecs ivars ! { $$ = $3; ! POP_DECLSPEC_STACK; } ! | declspecs_nosc_nots setspecs ivars ! { $$ = $3; ! POP_DECLSPEC_STACK; } ! | error ! { $$ = NULL_TREE; } ! ; ! ivars: ! /* empty */ ! { $$ = NULL_TREE; } ! | ivar_declarator ! | ivars ',' maybe_resetattrs ivar_declarator ; ! ivar_declarator: ! declarator ! { ! $$ = add_instance_variable (objc_ivar_context, ! objc_public_flag, ! $1, current_declspecs, ! NULL_TREE); ! } ! | declarator ':' expr_no_commas ! { ! $$ = add_instance_variable (objc_ivar_context, ! objc_public_flag, ! $1, current_declspecs, $3); ! } ! | ':' expr_no_commas { ! $$ = add_instance_variable (objc_ivar_context, ! objc_public_flag, ! NULL_TREE, ! current_declspecs, $2); ! } ; methodtype: '+' - { objc_inherit_code = CLASS_METHOD_DECL; } | '-' - { objc_inherit_code = INSTANCE_METHOD_DECL; } ; methoddef: methodtype { objc_pq_context = 1; - if (!objc_implementation_context) - fatal_error ("method definition not in class context"); } ! methoddecl { objc_pq_context = 0; ! objc_add_method (objc_implementation_context, ! $3, ! objc_inherit_code == CLASS_METHOD_DECL); ! start_method_def ($3); ! } ! optarglist ! { ! continue_method_def (); } compstmt_or_error { ! finish_method_def (); } ; --- 2707,2773 ---- ; ivar_decl_list: ! /* empty */ ! | ivar_decl_list visibility_spec ivar_decls ; visibility_spec: ! /* empty */ ! | AT_PRIVATE { objc_set_visibility (2); } ! | AT_PROTECTED { objc_set_visibility (0); } ! | AT_PUBLIC { objc_set_visibility (1); } ; ivar_decls: ! /* empty */ | ivar_decls ivar_decl ';' | ivar_decls ';' { ! if (pedantic) pedwarn ("extra semicolon in struct or union specified"); ! } ; ivar_decl: ! component_decl ! { ! /* Comma-separated ivars are chained together in ! reverse order; add them one by one. */ ! tree ivar = nreverse ($1); ! for (; ivar; ivar = TREE_CHAIN (ivar)) ! objc_add_instance_variable (copy_node (ivar)); ! } ; ! opt_semi: ! /* NULL */ ! | ';' { ! if (pedantic) ! pedwarn ("extra semicolon in method definition specified"); ! } ; methodtype: '+' | '-' ; methoddef: methodtype { + objc_set_method_type ($1); objc_pq_context = 1; } ! methoddecl opt_semi { objc_pq_context = 0; ! objc_start_method_definition ($3); } compstmt_or_error { ! objc_finish_method_definition (current_function_decl); } ; *************** semi_or_error: *** 2949,2954 **** --- 2789,2795 ---- methodproto: methodtype { + objc_set_method_type ($1); /* Remember protocol qualifiers in prototypes. */ objc_pq_context = 1; } *************** methodproto: *** 2956,3064 **** { /* Forget protocol qualifiers here. */ objc_pq_context = 0; ! objc_add_method (objc_interface_context, ! $3, ! objc_inherit_code == CLASS_METHOD_DECL); } semi_or_error ; methoddecl: ! '(' typename ')' unaryselector { ! $$ = build_method_decl (objc_inherit_code, $2, $4, NULL_TREE); } | unaryselector { ! $$ = build_method_decl (objc_inherit_code, NULL_TREE, $1, NULL_TREE); } ! | '(' typename ')' keywordselector optparmlist { ! $$ = build_method_decl (objc_inherit_code, $2, $4, $5); } | keywordselector optparmlist { ! $$ = build_method_decl (objc_inherit_code, NULL_TREE, $1, $2); } ; ! /* "optarglist" assumes that start_method_def has already been called... ! if it is not, the "xdecls" will not be placed in the proper scope */ ! ! optarglist: ! /* empty */ ! | ';' myxdecls ! ; ! ! /* to get around the following situation: "int foo (int a) int b; {}" that ! is synthesized when parsing "- a:a b:b; id c; id d; { ... }" */ ! ! myxdecls: ! /* empty */ ! | mydecls ! ; ! ! mydecls: ! mydecl ! | errstmt ! | mydecls mydecl ! | mydecl errstmt ! ; ! ! mydecl: ! declspecs_ts setspecs myparms ';' ! { POP_DECLSPEC_STACK; } ! | declspecs_ts ';' ! { shadow_tag ($1); } ! | declspecs_nots ';' ! { pedwarn ("empty declaration"); } ! ; ! ! myparms: ! myparm ! { push_parm_decl ($1); } ! | myparms ',' myparm ! { push_parm_decl ($3); } ! ; ! ! /* A single parameter declaration or parameter type name, ! as found in a parmlist. DOES NOT ALLOW AN INITIALIZER OR ASMSPEC */ ! myparm: ! parm_declarator maybe_attribute ! { $$ = build_tree_list (build_tree_list (current_declspecs, ! $1), ! chainon ($2, all_prefix_attributes)); } ! | notype_declarator maybe_attribute ! { $$ = build_tree_list (build_tree_list (current_declspecs, ! $1), ! chainon ($2, all_prefix_attributes)); } ! | absdcl_maybe_attribute ! { $$ = $1; } ; ! optparmlist: ! /* empty */ { ! $$ = NULL_TREE; } ! | ',' ELLIPSIS { ! /* oh what a kludge! */ ! $$ = objc_ellipsis_node; } ! | ',' { ! pushlevel (0); } ! parmlist_2 { ! /* returns a tree list node generated by get_parm_info */ ! $$ = $3; ! poplevel (0, 0, 0); } ; --- 2797,2859 ---- { /* Forget protocol qualifiers here. */ objc_pq_context = 0; ! objc_add_method_declaration ($3); } semi_or_error ; methoddecl: ! '(' objc_typename ')' unaryselector { ! $$ = objc_build_method_signature ($2, $4, NULL_TREE); } | unaryselector { ! $$ = objc_build_method_signature (NULL_TREE, $1, NULL_TREE); } ! | '(' objc_typename ')' keywordselector optparmlist { ! $$ = objc_build_method_signature ($2, $4, $5); } | keywordselector optparmlist { ! $$ = objc_build_method_signature (NULL_TREE, $1, $2); } ; ! /* Optional ObjC method parameters follow the C syntax, and may include '...' ! to denote a variable number of arguments. */ ! optparmlist: ! optparms optellipsis ! { ! TREE_OVERFLOW ($$) = $2; ! } ; ! optparms: ! /* NULL */ { ! $$ = make_node (TREE_LIST); } ! | optparms ',' parm { ! $$ = chainon ($1, build_tree_list (NULL_TREE, ! grokparm ($3))); } ! ; ! ! optellipsis: ! /* NULL */ { ! $$ = 0; } ! | ',' ELLIPSIS { ! $$ = 1; } ; *************** selector: *** 3079,3114 **** IDENTIFIER | TYPENAME | CLASSNAME - | OBJECTNAME | reservedwords ; reservedwords: ! ENUM | STRUCT | UNION | IF | ELSE | WHILE | DO | FOR | SWITCH | CASE | DEFAULT | BREAK | CONTINUE | RETURN | GOTO | ASM_KEYWORD | SIZEOF | TYPEOF | ALIGNOF ! | TYPESPEC | TYPE_QUAL ; keyworddecl: ! selector ':' '(' typename ')' identifier { ! $$ = build_keyword_decl ($1, $4, $6); } | selector ':' identifier { ! $$ = build_keyword_decl ($1, NULL_TREE, $3); } ! | ':' '(' typename ')' identifier { ! $$ = build_keyword_decl (NULL_TREE, $3, $5); } | ':' identifier { ! $$ = build_keyword_decl (NULL_TREE, NULL_TREE, $2); } ; --- 2874,2934 ---- IDENTIFIER | TYPENAME | CLASSNAME | reservedwords ; reservedwords: ! ENUM | STRUCT | UNION | IF | ELSE | WHILE | DO | FOR | SWITCH | CASE | DEFAULT | BREAK | CONTINUE | RETURN | GOTO | ASM_KEYWORD | SIZEOF | TYPEOF | ALIGNOF ! | TYPESPEC | TYPE_QUAL | OBJC_TYPE_QUAL ! ; ! ! objc_qual: ! OBJC_TYPE_QUAL ! ; ! ! objc_quals: ! objc_quals objc_qual ! { ! $$ = chainon ($1, build_tree_list (NULL_TREE, $2)); ! } ! | /* NULL */ ! { ! $$ = NULL_TREE; ! } ! ; ! ! objc_typename: ! objc_quals typename ! { ! $$ = build_tree_list ($1, groktypename ($2)); ! } ! | objc_quals ! { ! $$ = build_tree_list ($1, NULL_TREE); ! } ; keyworddecl: ! selector ':' '(' objc_typename ')' identifier { ! $$ = objc_build_keyword_decl ($1, $4, $6); } | selector ':' identifier { ! $$ = objc_build_keyword_decl ($1, NULL_TREE, $3); } ! | ':' '(' objc_typename ')' identifier { ! $$ = objc_build_keyword_decl (NULL_TREE, $3, $5); } | ':' identifier { ! $$ = objc_build_keyword_decl (NULL_TREE, NULL_TREE, $2); } ; *************** keywordarg: *** 3151,3163 **** receiver: expr | CLASSNAME { ! $$ = get_class_reference ($1); } | TYPENAME { ! $$ = get_class_reference ($1); } ; --- 2971,2984 ---- receiver: expr + { $$ = $1.value; } | CLASSNAME { ! $$ = objc_get_class_reference ($1); } | TYPENAME { ! $$ = objc_get_class_reference ($1); } ; *************** keywordname: *** 3191,3204 **** ; objcselectorexpr: ! SELECTOR '(' selectorarg ')' { $$ = $3; } ; objcprotocolexpr: ! PROTOCOL '(' identifier ')' { $$ = $3; } --- 3012,3025 ---- ; objcselectorexpr: ! AT_SELECTOR '(' selectorarg ')' { $$ = $3; } ; objcprotocolexpr: ! AT_PROTOCOL '(' identifier ')' { $$ = $3; } *************** objcprotocolexpr: *** 3207,3213 **** /* extension to support C-structures in the archiver */ objcencodeexpr: ! ENCODE '(' typename ')' { $$ = groktypename ($3); } --- 3028,3034 ---- /* extension to support C-structures in the archiver */ objcencodeexpr: ! AT_ENCODE '(' typename ')' { $$ = groktypename ($3); } *************** static const struct resword reswords[] = *** 3248,3253 **** --- 3069,3075 ---- { "__attribute", RID_ATTRIBUTE, 0 }, { "__attribute__", RID_ATTRIBUTE, 0 }, { "__builtin_choose_expr", RID_CHOOSE_EXPR, 0 }, + { "__builtin_offsetof", RID_OFFSETOF, 0 }, { "__builtin_types_compatible_p", RID_TYPES_COMPATIBLE_P, 0 }, { "__builtin_va_arg", RID_VA_ARG, 0 }, { "__complex", RID_COMPLEX, 0 }, *************** static const struct resword reswords[] = *** 3261,3272 **** { "__inline", RID_INLINE, 0 }, { "__inline__", RID_INLINE, 0 }, { "__label__", RID_LABEL, 0 }, - { "__ptrbase", RID_PTRBASE, 0 }, - { "__ptrbase__", RID_PTRBASE, 0 }, - { "__ptrextent", RID_PTREXTENT, 0 }, - { "__ptrextent__", RID_PTREXTENT, 0 }, - { "__ptrvalue", RID_PTRVALUE, 0 }, - { "__ptrvalue__", RID_PTRVALUE, 0 }, { "__real", RID_REALPART, 0 }, { "__real__", RID_REALPART, 0 }, { "__restrict", RID_RESTRICT, 0 }, --- 3083,3088 ---- *************** static const struct resword reswords[] = *** 3314,3320 **** { "void", RID_VOID, 0 }, { "volatile", RID_VOLATILE, 0 }, { "while", RID_WHILE, 0 }, ! { "id", RID_ID, D_OBJC }, /* These objc keywords are recognized only immediately after an '@'. */ --- 3130,3136 ---- { "void", RID_VOID, 0 }, { "volatile", RID_VOLATILE, 0 }, { "while", RID_WHILE, 0 }, ! /* These objc keywords are recognized only immediately after an '@'. */ *************** static const short rid_to_yy[RID_MAX] = *** 3377,3388 **** /* RID_MUTABLE */ 0, /* ObjC */ ! /* RID_IN */ TYPE_QUAL, ! /* RID_OUT */ TYPE_QUAL, ! /* RID_INOUT */ TYPE_QUAL, ! /* RID_BYCOPY */ TYPE_QUAL, ! /* RID_BYREF */ TYPE_QUAL, ! /* RID_ONEWAY */ TYPE_QUAL, /* C */ /* RID_INT */ TYPESPEC, --- 3193,3204 ---- /* RID_MUTABLE */ 0, /* ObjC */ ! /* RID_IN */ OBJC_TYPE_QUAL, ! /* RID_OUT */ OBJC_TYPE_QUAL, ! /* RID_INOUT */ OBJC_TYPE_QUAL, ! /* RID_BYCOPY */ OBJC_TYPE_QUAL, ! /* RID_BYREF */ OBJC_TYPE_QUAL, ! /* RID_ONEWAY */ OBJC_TYPE_QUAL, /* C */ /* RID_INT */ TYPESPEC, *************** static const short rid_to_yy[RID_MAX] = *** 3417,3425 **** /* RID_IMAGPART */ IMAGPART, /* RID_REALPART */ REALPART, /* RID_LABEL */ LABEL, - /* RID_PTRBASE */ PTR_BASE, - /* RID_PTREXTENT */ PTR_EXTENT, - /* RID_PTRVALUE */ PTR_VALUE, /* RID_CHOOSE_EXPR */ CHOOSE_EXPR, /* RID_TYPES_COMPATIBLE_P */ TYPES_COMPATIBLE_P, --- 3233,3238 ---- *************** static const short rid_to_yy[RID_MAX] = *** 3442,3448 **** /* RID_FALSE */ 0, /* RID_NAMESPACE */ 0, /* RID_NEW */ 0, ! /* RID_OFFSETOF */ 0, /* RID_OPERATOR */ 0, /* RID_THIS */ 0, /* RID_THROW */ 0, --- 3255,3261 ---- /* RID_FALSE */ 0, /* RID_NAMESPACE */ 0, /* RID_NEW */ 0, ! /* RID_OFFSETOF */ OFFSETOF, /* RID_OPERATOR */ 0, /* RID_THIS */ 0, /* RID_THROW */ 0, *************** static const short rid_to_yy[RID_MAX] = *** 3459,3482 **** /* RID_STATCAST */ 0, /* Objective C */ ! /* RID_ID */ OBJECTNAME, ! /* RID_AT_ENCODE */ ENCODE, ! /* RID_AT_END */ END, ! /* RID_AT_CLASS */ CLASS, ! /* RID_AT_ALIAS */ ALIAS, ! /* RID_AT_DEFS */ DEFS, ! /* RID_AT_PRIVATE */ PRIVATE, ! /* RID_AT_PROTECTED */ PROTECTED, ! /* RID_AT_PUBLIC */ PUBLIC, ! /* RID_AT_PROTOCOL */ PROTOCOL, ! /* RID_AT_SELECTOR */ SELECTOR, /* RID_AT_THROW */ AT_THROW, /* RID_AT_TRY */ AT_TRY, /* RID_AT_CATCH */ AT_CATCH, /* RID_AT_FINALLY */ AT_FINALLY, /* RID_AT_SYNCHRONIZED */ AT_SYNCHRONIZED, ! /* RID_AT_INTERFACE */ INTERFACE, ! /* RID_AT_IMPLEMENTATION */ IMPLEMENTATION }; static void --- 3272,3294 ---- /* RID_STATCAST */ 0, /* Objective C */ ! /* RID_AT_ENCODE */ AT_ENCODE, ! /* RID_AT_END */ AT_END, ! /* RID_AT_CLASS */ AT_CLASS, ! /* RID_AT_ALIAS */ AT_ALIAS, ! /* RID_AT_DEFS */ AT_DEFS, ! /* RID_AT_PRIVATE */ AT_PRIVATE, ! /* RID_AT_PROTECTED */ AT_PROTECTED, ! /* RID_AT_PUBLIC */ AT_PUBLIC, ! /* RID_AT_PROTOCOL */ AT_PROTOCOL, ! /* RID_AT_SELECTOR */ AT_SELECTOR, /* RID_AT_THROW */ AT_THROW, /* RID_AT_TRY */ AT_TRY, /* RID_AT_CATCH */ AT_CATCH, /* RID_AT_FINALLY */ AT_FINALLY, /* RID_AT_SYNCHRONIZED */ AT_SYNCHRONIZED, ! /* RID_AT_INTERFACE */ AT_INTERFACE, ! /* RID_AT_IMPLEMENTATION */ AT_IMPLEMENTATION }; static void *************** init_reswords (void) *** 3490,3496 **** if (!c_dialect_objc ()) mask |= D_OBJC; ! ridpointers = ggc_calloc ((int) RID_MAX, sizeof (tree)); for (i = 0; i < N_reswords; i++) { /* If a keyword is disabled, do not enter it into the table --- 3302,3308 ---- if (!c_dialect_objc ()) mask |= D_OBJC; ! ridpointers = GGC_CNEWVEC (tree, (int) RID_MAX); for (i = 0; i < N_reswords; i++) { /* If a keyword is disabled, do not enter it into the table *************** yylexname (void) *** 3525,3539 **** { enum rid rid_code = C_RID_CODE (yylval.ttype); - /* Turn non-typedefed refs to "id" into plain identifiers; this - allows constructs like "void foo(id id);" to work. */ - if (rid_code == RID_ID) - { - decl = lookup_name (yylval.ttype); - if (decl == NULL_TREE || TREE_CODE (decl) != TYPE_DECL) - return IDENTIFIER; - } - if (!OBJC_IS_AT_KEYWORD (rid_code) && (!OBJC_IS_PQ_KEYWORD (rid_code) || objc_pq_context)) { --- 3337,3342 ---- *************** yylexname (void) *** 3551,3557 **** } else { ! tree objc_interface_decl = is_class_name (yylval.ttype); /* ObjC class names are in the same namespace as variables and typedefs, and hence are shadowed by local declarations. */ if (objc_interface_decl --- 3354,3360 ---- } else { ! tree objc_interface_decl = objc_is_class_name (yylval.ttype); /* ObjC class names are in the same namespace as variables and typedefs, and hence are shadowed by local declarations. */ if (objc_interface_decl *************** _yylex (void) *** 3661,3667 **** /* These tokens should not survive translation phase 4. */ case CPP_HASH: case CPP_PASTE: ! error ("syntax error at '%s' token", NAME(last_token)); goto get_next; default: --- 3464,3470 ---- /* These tokens should not survive translation phase 4. */ case CPP_HASH: case CPP_PASTE: ! error ("syntax error at %qs token", NAME(last_token)); goto get_next; default: *************** yyprint (FILE *file, int yychar, YYSTYPE *** 3693,3705 **** { case IDENTIFIER: case TYPENAME: - case OBJECTNAME: case TYPESPEC: case TYPE_QUAL: case SCSPEC: case STATIC: if (IDENTIFIER_POINTER (t)) ! fprintf (file, " `%s'", IDENTIFIER_POINTER (t)); break; case CONSTANT: --- 3496,3507 ---- { case IDENTIFIER: case TYPENAME: case TYPESPEC: case TYPE_QUAL: case SCSPEC: case STATIC: if (IDENTIFIER_POINTER (t)) ! fprintf (file, " '%s'", IDENTIFIER_POINTER (t)); break; case CONSTANT: *************** yyprint (FILE *file, int yychar, YYSTYPE *** 3714,3735 **** } } ! /* This is not the ideal place to put these, but we have to get them out ! of c-lex.c because cp/lex.c has its own versions. */ /* Parse the file. */ void c_parse_file (void) { yyparse (); - /* In case there were missing closebraces, get us back to the global - binding level. */ - while (! global_bindings_p ()) - poplevel (0, 0, 0); - /* __FUNCTION__ is defined at file scope (""). This - call may not be necessary as my tests indicate it - still works without it. */ - finish_fname_decls (); if (malloced_yyss) { --- 3516,3529 ---- } } ! /* This is not the ideal place to put this, but we have to get it out ! of c-lex.c because cp/lex.c has its own version. */ /* Parse the file. */ void c_parse_file (void) { yyparse (); if (malloced_yyss) { *************** c_parse_file (void) *** 3739,3742 **** --- 3533,3553 ---- } } + #ifdef __XGETTEXT__ + /* Depending on the version of Bison used to compile this grammar, + it may issue generic diagnostics spelled "syntax error" or + "parse error". To prevent this from changing the translation + template randomly, we list all the variants of this particular + diagnostic here. Translators: there is no fine distinction + between diagnostics with "syntax error" in them, and diagnostics + with "parse error" in them. It's okay to give them both the same + translation. */ + const char d1[] = N_("syntax error"); + const char d2[] = N_("parse error"); + const char d3[] = N_("syntax error; also virtual memory exhausted"); + const char d4[] = N_("parse error; also virtual memory exhausted"); + const char d5[] = N_("syntax error: cannot back up"); + const char d6[] = N_("parse error: cannot back up"); + #endif + #include "gt-c-parse.h" diff -Nrcpad gcc-3.4.3/gcc/objc/objc-tree.def gcc-4.0.0/gcc/objc/objc-tree.def *** gcc-3.4.3/gcc/objc/objc-tree.def Thu Sep 25 01:25:53 2003 --- gcc-4.0.0/gcc/objc/objc-tree.def Fri Sep 17 21:55:02 2004 *************** *** 1,7 **** /* This file contains the definitions and documentation for the additional tree codes used in the Objective C front end (see tree.def for the standard codes). ! Copyright (C) 1990, 1997, 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of GCC. --- 1,7 ---- /* This file contains the definitions and documentation for the additional tree codes used in the Objective C front end (see tree.def for the standard codes). ! Copyright (C) 1990, 1997, 1998, 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. This file is part of GCC. *************** Boston, MA 02111-1307, USA. */ *** 23,39 **** /* Objective-C types. */ ! DEFTREECODE (CLASS_INTERFACE_TYPE, "class_interface_type", 't', 0) ! DEFTREECODE (CLASS_IMPLEMENTATION_TYPE, "class_implementation_type", 't', 0) ! DEFTREECODE (CATEGORY_INTERFACE_TYPE, "category_interface_type", 't', 0) ! DEFTREECODE (CATEGORY_IMPLEMENTATION_TYPE,"category_implementation_type", 't', 0) ! DEFTREECODE (PROTOCOL_INTERFACE_TYPE, "protocol_interface_type", 't', 0) /* Objective-C decls. */ ! DEFTREECODE (KEYWORD_DECL, "keyword_decl", 'd', 0) ! DEFTREECODE (INSTANCE_METHOD_DECL, "instance_method_decl", 'd', 0) ! DEFTREECODE (CLASS_METHOD_DECL, "class_method_decl", 'd', 0) /* Objective-C expressions. */ ! DEFTREECODE (MESSAGE_SEND_EXPR, "message_send_expr", 'e', 3) ! DEFTREECODE (CLASS_REFERENCE_EXPR, "class_reference_expr", 'e', 1) --- 23,47 ---- /* Objective-C types. */ ! DEFTREECODE (CLASS_INTERFACE_TYPE, "class_interface_type", tcc_type, 0) ! DEFTREECODE (CLASS_IMPLEMENTATION_TYPE, "class_implementation_type", ! tcc_type, 0) ! DEFTREECODE (CATEGORY_INTERFACE_TYPE, "category_interface_type", tcc_type, 0) ! DEFTREECODE (CATEGORY_IMPLEMENTATION_TYPE,"category_implementation_type", ! tcc_type, 0) ! DEFTREECODE (PROTOCOL_INTERFACE_TYPE, "protocol_interface_type", tcc_type, 0) /* Objective-C decls. */ ! DEFTREECODE (KEYWORD_DECL, "keyword_decl", tcc_declaration, 0) ! DEFTREECODE (INSTANCE_METHOD_DECL, "instance_method_decl", tcc_declaration, 0) ! DEFTREECODE (CLASS_METHOD_DECL, "class_method_decl", tcc_declaration, 0) /* Objective-C expressions. */ ! DEFTREECODE (MESSAGE_SEND_EXPR, "message_send_expr", tcc_expression, 3) ! DEFTREECODE (CLASS_REFERENCE_EXPR, "class_reference_expr", tcc_expression, 1) ! ! /* ! Local variables: ! mode:c ! End: ! */ diff -Nrcpad gcc-3.4.3/libobjc/.cvsignore gcc-4.0.0/libobjc/.cvsignore *** gcc-3.4.3/libobjc/.cvsignore Thu Jan 1 00:00:00 1970 --- gcc-4.0.0/libobjc/.cvsignore Sat Oct 23 02:34:54 2004 *************** *** 0 **** --- 1 ---- + autom4te.cache diff -Nrcpad gcc-3.4.3/libobjc/ChangeLog gcc-4.0.0/libobjc/ChangeLog *** gcc-3.4.3/libobjc/ChangeLog Fri Nov 5 03:34:48 2004 --- gcc-4.0.0/libobjc/ChangeLog Thu Apr 21 05:20:34 2005 *************** *** 1,23 **** ! 2004-11-04 Release Manager ! * GCC 3.4.3 released. ! 2004-09-06 Release Manager ! * GCC 3.4.2 released. ! 2004-07-01 Release Manager ! * GCC 3.4.1 released. ! 2004-04-18 Release Manager ! * GCC 3.4.0 released. 2004-03-01 Michael Matz * Makefile.in (ALL_CFLAGS): Add -fno-strict-aliasing. 2004-01-17 Andrew Pinski PR target/10781 --- 1,406 ---- ! 2005-04-20 Release Manager ! * GCC 4.0.0 released. ! 2005-03-03 David Ayers ! * objc/hash.h (OBJC_IGNORE_DEPRECATED_API): Update deprecated ! version reference. Correct typo. ! 2005-03-02 David Ayers ! PR libobjc/19024 ! * Makefile.in (OBJS): Add hash_compat.lo. ! (OBJS_GC): Add hash_compat_gc.lo. ! (hash_compat_gc.lo): New target and rule. ! * objc/hash.h (hash_new, hash_delete, hash_add, hash_remove) ! (hash_next, hash_value_for_key, hash_is_key_in_hash) ! (hash_ptr, hash_string, compare_ptrs, compare_strings): Prefix ! with objc_. Add deprecated non prefixed inlined versions. ! (OBJC_IGNORE_DEPRECATED_API): New macro to hide deprecated ! declarations. ! * hash.c (hash_new, hash_delete, hash_add, hash_remove, hash_next) ! (hash_value_for_key, hash_is_key_in_hash): Prefix with objc_ and ! update callers. ! * hash_compat.c: New file. ! * archive.c: Update callers. ! * init.c: Likewise. ! * selector.c: Likewise. ! * libobjc.def: Add objc_ versions of hash functions. ! 2004-12-20 Andrew Pinski ! PR libobjc/12035 ! * gc.c: Remove definition of LOGWL, modWORDSZ, and divWORDSZ since ! they are not used. ! Include limits.h and stdlib.h. ! Define BITS_PER_WORD. ! ! 2004-12-12 Alexander Malmberg ! ! * selector.c (__objc_init_selector_tables): Add missing void to ! definition. ! ! 2004-12-02 Richard Sandiford ! ! * configure.ac: Use TL_AC_GCC_VERSION to set gcc_version. ! * configure, aclocal.m4: Regenerate. ! ! 2004-11-29 Kelley Cook ! ! * configure: Regenerate for libtool change. ! ! 2004-11-25 Kelley Cook ! ! * configure: Regenerate for libtool reversion. ! ! 2004-11-24 Kelley Cook ! ! * configure: Regenerate for libtool change. ! ! 2004-11-24 Kelley Cook ! ! * aclocal.m4, config.h.in: Regenerate. ! ! 2004-10-08 Mike Stump ! Andrew Pinski ! ! * aclocal.m4: Rename to ... ! * acinclude.m4: here and also use m4_include instead of sinclude. ! * aclocal.m4: Regenerate. ! * configure: Regenerate. ! * configure.ac: Add AM_MAINTAINER_MODE and AM_PROG_CC_C_O. ! * Makefile.in (configure): Add @MAINT@ infront of configure.ac ! ! 2004-10-08 Andrew Pinski ! ! * archive.c: Fix all the warnings about passing unsigned char* ! to char* and the other way too. ! ! 2004-09-16 Andrew Pinski ! ! PR libobjc/16448 ! * exception.c: Include config.h ! (objc_exception_throw): Change _GLIBCXX_SJLJ_EXCEPTIONS to ! SJLJ_EXCEPTIONS. ! * configure.ac: Find out what exception handling code we use. ! * configure: Regenerate. ! * config.h.in: New file, regenerate. ! ! 2004-09-16 Andrew Pinski ! ! * encoding.c (ALTIVEC_VECTOR_MODE): Define a bogus macro. ! ! 2004-08-28 Nathanael Nerode ! ! * configure.ac: Switch from _GCC_TOPLEV_NONCANONICAL_TARGET to ! ACX_NONCANONICAL_TARGET. ! * configure: Regenerate. ! ! 2004-08-13 Ziemowit Laski ! ! * objc/sarray.h: Hoist include of assert.h near the top of file, ! and mark the remainder of the file 'extern "C"'. ! ! 2004-08-13 Andrew Pinski ! ! * objc/Object.h: Move includes out of extern "C" blocks. ! * objc/encoding.h: Likewise. ! * objc/hash.h: Likewise. ! * objc/objc-api.h: Likewise. ! * objc/runtime.h: Likewise. ! * objc/sarray.h: Likewise. ! * objc/typedstream.h: Likewise. ! ! 2004-08-12 Ziemowit Laski ! ! * objc/NXConstStr.h: Update copyright date; bracket with ! 'extern "C"' for C++ use; make include syntax consistent ! by using <...> instead of "..."; hoist includes ! above the 'extern "C"' block. ! * objc/Object.h: Likewise. ! * objc/Protocol.h: Likewise. ! * objc/encoding.h: Likewise. ! * objc/hash.h: Likewise. ! * objc/runtime.h: Likewise. ! * objc/sarray.h: Likewise. ! * objc/thr.h: Likewise. ! * objc/typedstream.h: Likewise. ! * objc/objc-api.h: Add 'extern "C"' block for C++ use. ! (objc_static_instances): For C++ case, do away with ! zero-sized array. ! (objc_method): Hoist definition to file scope. ! (_objc_load_callback, _objc_object_alloc, class_get_class_method, ! class_get_instance_method, class_create_instance, ! class_get_class_name, class_get_instance_size, ! class_get_meta_class, class_get_super_class, class_get_version, ! class_is_class, class_is_meta_class, class_set_version, ! class_get_gc_object_type, class_ivar_set_gcinvisible, ! get_imp): Rename 'class' parameter to '_class'. ! * objc/objc-list.h: Add 'extern "C"' block for C++ use. ! * objc/objc.h: Update copyright date. ! (arglist_t): Provide a union tag. ! ! 2004-07-22 Andrew Pinski ! ! * thr.c (__objc_thread_detach_function): Do not mark as volatile ! but instead use the attribute noreturn. ! ! 2004-06-28 Zack Weinberg ! ! * encoding.c: Rename target_flags with a #define to avoid ! conflict with a prior declaration. ! ! 2004-06-24 Andrew Pinski ! ! * objc/encoding.h: Wrap the functions with extern "C" for C++ ! mode. ! * objc/hash.h: Likewise. ! * objc/objc-api.h: Likewise. ! * objc/objc-list.h: Likewise. ! * objc/runtime.h: Likewise. ! * objc/sarray.h: Likewise. ! * objc/thr.h: Likewise. ! * objc/typedstream.h: Likewise. ! ! ! 2004-06-21 Nick Clifton ! ! * encoding.c (BITS_PER_UNIT): Define if a definition is not ! provided. ! ! 2004-06-20 Alexander Malmberg ! ! * Makefile.in (exception.lo): Remove $(OBJC_GCFLAGS). ! (exception_gc.lo): New. ! (OBJS_GC): Add exception_gc.lo. ! ! 2004-06-17 Richard Henderson ! ! * exception.c: New file. ! * Makefile.in (exception.lo): New. ! (OBJS): Add it. ! ! 2004-06-14 Andrew Pinski ! ! * linking.m (_objcInit): New empty function ! for Darwin only. ! ! 2004-06-11 Andrew Pinski ! ! * configure.ac: Support --enable-shared=libobjc. ! * configure: Regenerate. ! ! PR libobjc/15901 ! * configure.ac: Do not disable shared by default. ! * configure: Regenerate. ! ! 2004-06-03 Nicola Pero ! ! * Protocol.m ([-isEqual:]): Small optimizations returning ! immediately if the argument is equal to self, and accessing ! the argument's name directly if it's a protocol. ! ! 2004-06-03 David Ayers ! ! * Protocol.m ([-isEqual:]): Test the class of the argument. ! ! 2004-05-25 Andrew Pinski ! ! * configure.ac (includedir): Rename to ... ! (includedirname). ! * Makefile.in: s/includedir/includedirname/. ! ! PR target/11572 ! * configure.ac (includedir): Set to "include" ! except for Darwin. ! (libext) Set to empty except for Darwin. ! * configure: Regenerate ! * Makefile.in: s/libobjc.la/libobjc$(libext).la/g. ! s/include/$(includedir)/g. ! ! 2004-05-25 Daniel Jacobowitz ! ! * Makefile.in: Add .NOEXPORT. ! ! 2004-05-25 Andrew Pinski ! ! Merge from the libobjc-branch ! 2004-02-09 Andrew Pinski ! ! * Makefile.in (OBJC_H): Change objc-deps.h to objc-decls.h. ! ! 2004-02-03 Andrew Pinski ! ! * Makefile.in (OBJC_H): Add objc-deps.h. ! ! 2004-01-27 Nicola Pero ! ! * Protocol.m ([-conformsTo:]): If the argument is nil, return NO. ! ([-hash], [-isEqual:]): New methods. ! ! 2004-01-27 Richard Frith-Macdonald ! ! * sarray.c (sarray_free): Add a better comment. ! ! 2004-01-27 Adam Fedor ! ! * hash.c (hash_add): Cast cachep to int. ! * selector.c (__sel_register_typed_name): Cast ! soffset_decode to int. ! ! 2004-01-27 Alexander Malmberg ! ! * selector.c: Rename register_selectors_from_list to ! __objc_register_selectors_from_list. Update caller. ! (__objc_register_selectors_from_list): Lock __objc_runtime_mutex ! while registering selectors. Use __sel_register_typed_name instead ! of sel_register_typed_name. Check for NULL method_name:s. ! (pool_alloc_selector): New function. ! (__sel_register_typed_name): Use pool_alloc_selector to allocate ! selector structures. ! * sendmsg.c (class_add_method_list): Use ! __objc_register_selectors_from_list. ! * objc/runtime.h: Add __objc_register_selectors_from_list. ! ! 2004-01-25 Adam Fedor ! Nicola Pero ! Andrew Pinski ! ! * objc/objc-decls.h: New file. ! * objc/objc-api.h (_objc_lookup_class): Mark as export. ! (_objc_load_callback): Likewise. ! (_objc_object_alloc): Likewise. ! (_objc_object_copy): Likewise. ! (_objc_object_dispose): Likewise. ! ! 2004-01-25 Andrew Pinski ! ! * archive.c: s/__inline__/inline ! * sendmsg.c: Likewise. ! ! * encoding.c: Remove FIXME about the warning ! about unused variable. ! * sendmsg.c: Add a FIXME comment saying that ! this should be using libffi. ! ! * Makefile.in (LIBTOOL): Use @LIBTOOL@ now as it works. ! ! ! 2004-05-13 Andrew Pinski ! ! * archive.c (objc_read_class): Initialize class_name. ! (objc_read_selector): Initialize selector_name. ! ! 2004-05-09 Richard Sandiford ! ! * Makefile.in (toolexecdir): Remove trailing space. ! ! 2004-04-15 Nathanael Nerode ! ! PR libobjc/14948 ! * configure.ac: De-precious CC so multilibs work. ! * configure: Regenerate. ! ! 2004-04-14 Nathanael Nerode ! ! * configure.ac: Restore toolexecdir. ! * Makefile.in: Restore toolexecdir. ! * configure: Regenerate. ! ! 2004-04-09 Nathanael Nerode ! ! * configure.ac: Remove (unused) glibcpp_prefixdir. ! * configure: Regenerate. ! ! * configure.in: Rename to configure.ac. ! * Makefile.in: Update to match. ! ! * Makefile.in: Remove toolexecdir, glibcpp_toolexecdir (unused). ! Replace glibcpp_toolexeclibdir with toolexeclibdir. ! * configure.in: Remove glibcpp_toolexecdir (unused). ! Replace glibcpp_toolexeclibdir with toolexeclibdir. Don't generate ! config.h or stamp-h (unused). Move one comment to the right place. ! * configure: Regenerate. ! * config.h.in: Remove (unused). ! ! * config.h.in: Regenerate with autoheader. ! ! * Makefile.in: Remove (unused) gcc_version_trigger. ! * configure.in: Remove (unused) glibcpp_builddir. Don't AC_SUBST ! gcc_version_trigger. ! * configure: Regenerate. ! ! * configure.in: Switch to modern style for AC_INIT, AC_OUTPUT. ! Sort file into sections. Remove dnl where appropriate. Fix ! other style issues. ! * configure: Regenerate. ! ! * configure.in: Replace old AC_PROG_CC hack with new one. ! Define toplevel_srcdir in terms of srcdir, not top_srcdir (there ! are no subdirectory output files, so this is fine). Change prereq ! to autoconf 2.59. ! * aclocal.m4: Include ../config/no-executables.m4. ! * configure: Regenerate with autoconf 2.59. ! ! * configure.in: Improve comments on gthread_cflags. Improve m4 ! quotation, and replace 'if test' with 'case', for --enable-objc-gc. ! * configure: Regenerate. ! ! * configure.in: Move PACKAGE and VERSION settings up top. Remove ! unused call to AC_PROG_LN_S. Default RANLIB to ':'. Remove ! redundant checks for values of RANLIB, AR, INSTALL. ! * configure: Regenerate. ! ! * configure.in: Clean up handling of ! --enable-version-specific-runtime-libs and related variables; ! replace 'if test' with 'case' where reasonable. Fix comments. ! Remove useless libstdcxx_interface. ! * configure: Regenerate. ! ! * configure.in: Use _GCC_TOPLEV_NONCANONICAL_TARGET. ! Replace uses of target_alias with target_noncanonical. ! * aclocal.m4: Include ../config/acx.m4. ! * configure: Regenerate. ! * Makefile.in: Replace uses of target_alias with target_noncanonical. ! Fix copyright statement. ! ! * configure.in: Hand-inline bulky, confusing macros from ! aclocal.m4. Replace references to "GNU Objective C" with "GCC". ! Update copyright notice. Remove stuff for automake, which isn't ! used in this directory. Remove emacs local variables. ! * aclocal.m4: Remove hand-inlined macros. Update copyright notice. ! * configure: Regenerate. ! ! 2004-03-16 Manfred Hollstein ! ! * Makefile.in, configure.in, configure: Update copyright years. ! ! 2004-03-15 Manfred Hollstein ! ! * Makefile.in (LIBOBJC_VERSION, LIBOBJC_GC_VERSION): Use ! definition from configure.in. ! * configure.in (PACKAGE): Add definition. ! (VERSION): Add definition; substitute it in output files. ! * configure: Re-generate. ! ! 2004-03-05 Ziemowit Laski ! ! * objc/hash.h (hash_string, compare_strings): ! Add type-casts to make Objective-C++ happy. ! * objc/typedstream.h (objc_get_stream_class_version): ! Rename parameter from 'class' to 'class_name' to make ! Objective-C++ happy. 2004-03-01 Michael Matz * Makefile.in (ALL_CFLAGS): Add -fno-strict-aliasing. + 2004-02-06 Ziemowit Laski + + * objc/objc-api.h (objc_super): The 'class' field shall + be named 'super_class' #ifdef __cplusplus. + 2004-01-17 Andrew Pinski PR target/10781 diff -Nrcpad gcc-3.4.3/libobjc/Makefile.in gcc-4.0.0/libobjc/Makefile.in *** gcc-3.4.3/libobjc/Makefile.in Mon Mar 1 15:33:48 2004 --- gcc-4.0.0/libobjc/Makefile.in Wed Mar 2 20:12:17 2005 *************** *** 1,5 **** # Makefile for GNU Objective C runtime library. ! # Copyright (C) 1993, 95-98, 1999, 2001, 2002, 2003 # Free Software Foundation, Inc. #This file is part of GCC. --- 1,5 ---- # Makefile for GNU Objective C runtime library. ! # Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. #This file is part of GCC. *************** srcdir = @glibcpp_srcdir@ *** 32,50 **** VPATH = @glibcpp_srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ ! target_alias = @target_alias@ gcc_version = @gcc_version@ - gcc_version_trigger = @gcc_version_trigger@ top_srcdir = @top_srcdir@ toplevel_srcdir = @toplevel_srcdir@ ! toolexecdir = @glibcpp_toolexecdir@ ! glibcpp_toolexecdir = @glibcpp_toolexecdir@ ! glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@ top_builddir = . libdir = $(exec_prefix)/lib ! libsubdir = $(libdir)/gcc/$(target_alias)/$(gcc_version) # Multilib support variables. MULTISRCTOP = --- 32,52 ---- VPATH = @glibcpp_srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ ! target_noncanonical = @target_noncanonical@ gcc_version = @gcc_version@ top_srcdir = @top_srcdir@ toplevel_srcdir = @toplevel_srcdir@ ! toolexecdir = @toolexecdir@ ! # Toolexecdir is used only by toolexeclibdir ! toolexeclibdir = @toolexeclibdir@ ! ! includedirname = @includedirname@ ! libext = @libext@ top_builddir = . libdir = $(exec_prefix)/lib ! libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version) # Multilib support variables. MULTISRCTOP = *************** ALL_CFLAGS = -I. -I$(srcdir) $(CPPFLAGS) *** 78,87 **** # begin compiled and compatibility issues. # Please refer to Libtool documentation about how to manage these # numbers. ! LIBOBJC_VERSION = 1:0:0 ! LIBOBJC_GC_VERSION = 1:0:0 ! # @LIBTOOL@ does not get it right, so we hack it in - FIXME ! LIBTOOL = ./libtool LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile LIBTOOL_LINK = $(LIBTOOL) --mode=link LIBTOOL_INSTALL = $(LIBTOOL) --mode=install --- 80,88 ---- # begin compiled and compatibility issues. # Please refer to Libtool documentation about how to manage these # numbers. ! LIBOBJC_VERSION = @VERSION@ ! LIBOBJC_GC_VERSION = @VERSION@ ! LIBTOOL = @LIBTOOL@ LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile LIBTOOL_LINK = $(LIBTOOL) --mode=link LIBTOOL_INSTALL = $(LIBTOOL) --mode=install *************** FLAGS_TO_PASS = \ *** 130,156 **** "libsubdir=$(libsubdir)" \ "tooldir=$(tooldir)" ! all: libobjc.la $(OBJC_BOEHM_GC) : $(MAKE) ; exec $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all # User-visible header files. OBJC_H = hash.h objc-list.h sarray.h objc.h objc-api.h \ NXConstStr.h Object.h Protocol.h encoding.h typedstream.h \ ! thr.h # Modules that comprise the runtime library. OBJS = archive.lo class.lo encoding.lo gc.lo hash.lo init.lo linking.lo \ misc.lo nil_method.lo NXConstStr.lo Object.lo objects.lo \ Protocol.lo sarray.lo selector.lo sendmsg.lo thr.lo \ ! $(OBJC_THREAD_FILE).lo OBJS_GC = archive_gc.lo class_gc.lo encoding_gc.lo gc_gc.lo hash_gc.lo \ init_gc.lo linking_gc.lo misc_gc.lo nil_method_gc.lo \ NXConstStr_gc.lo Object_gc.lo objects_gc.lo Protocol_gc.lo \ sarray_gc.lo selector_gc.lo sendmsg_gc.lo thr_gc.lo \ ! $(OBJC_THREAD_FILE)_gc.lo runtime-info.h: echo "" > tmp-runtime.m --- 131,157 ---- "libsubdir=$(libsubdir)" \ "tooldir=$(tooldir)" ! all: libobjc$(libext).la $(OBJC_BOEHM_GC) : $(MAKE) ; exec $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all # User-visible header files. OBJC_H = hash.h objc-list.h sarray.h objc.h objc-api.h \ NXConstStr.h Object.h Protocol.h encoding.h typedstream.h \ ! thr.h objc-decls.h # Modules that comprise the runtime library. OBJS = archive.lo class.lo encoding.lo gc.lo hash.lo init.lo linking.lo \ misc.lo nil_method.lo NXConstStr.lo Object.lo objects.lo \ Protocol.lo sarray.lo selector.lo sendmsg.lo thr.lo \ ! $(OBJC_THREAD_FILE).lo exception.lo hash_compat.lo OBJS_GC = archive_gc.lo class_gc.lo encoding_gc.lo gc_gc.lo hash_gc.lo \ init_gc.lo linking_gc.lo misc_gc.lo nil_method_gc.lo \ NXConstStr_gc.lo Object_gc.lo objects_gc.lo Protocol_gc.lo \ sarray_gc.lo selector_gc.lo sendmsg_gc.lo thr_gc.lo \ ! $(OBJC_THREAD_FILE)_gc.lo exception_gc.lo hash_compat_gc.lo runtime-info.h: echo "" > tmp-runtime.m *************** hash_gc.lo: hash.c *** 181,186 **** --- 182,191 ---- $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \ $(INCLUDES) $< + hash_compat_gc.lo: hash_compat.c + $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \ + $(INCLUDES) $< + init_gc.lo: init.c $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \ $(INCLUDES) $< *************** $(OBJC_THREAD_FILE)_gc.lo: $(OBJC_THREAD *** 252,267 **** $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \ $(INCLUDES) $< doc: info dvi html ! libobjc.la: $(OBJS) $(LIBTOOL_LINK) $(CC) -o $@ $(OBJS) \ ! -rpath $(glibcpp_toolexeclibdir) \ -version-info $(LIBOBJC_VERSION) ! libobjc_gc.la: $(OBJS_GC) $(LIBTOOL_LINK) $(CC) -o $@ $(OBJS_GC) \ ! -rpath $(glibcpp_toolexeclibdir) \ -version-info $(LIBOBJC_GC_VERSION) # --- 257,280 ---- $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \ $(INCLUDES) $< + exception.lo: exception.c + $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) \ + -fexceptions $(INCLUDES) $< + + exception_gc.lo: exception.c + $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \ + -fexceptions $(INCLUDES) $< + doc: info dvi html ! libobjc$(libext).la: $(OBJS) $(LIBTOOL_LINK) $(CC) -o $@ $(OBJS) \ ! -rpath $(toolexeclibdir) \ -version-info $(LIBOBJC_VERSION) ! libobjc_gc$(libext).la: $(OBJS_GC) $(LIBTOOL_LINK) $(CC) -o $@ $(OBJS_GC) \ ! -rpath $(toolexeclibdir) \ -version-info $(LIBOBJC_GC_VERSION) # *************** config.status: configure *** 305,338 **** CONFIG_SITE=no-such-file CC='$(CC)' AR='$(AR)' CFLAGS='$(CFLAGS)' \ CPPFLAGS='$(CPPFLAGS)' $(SHELL) config.status --recheck ! ${srcdir}/configure: configure.in rm -f config.cache cd ${srcdir} && autoconf install: install-libs install-headers install-libs: installdirs ! $(SHELL) $(toplevel_srcdir)/mkinstalldirs $(DESTDIR)$(glibcpp_toolexeclibdir) ! $(LIBTOOL_INSTALL) $(INSTALL) libobjc.la $(DESTDIR)$(glibcpp_toolexeclibdir); if [ "$(OBJC_BOEHM_GC)" ]; then \ ! $(LIBTOOL_INSTALL) $(INSTALL) libobjc_gc.la \ ! $(DESTDIR)$(glibcpp_toolexeclibdir);\ fi $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO="$@" ! @-$(LIBTOOL) --mode=finish $(DESTDIR)$(glibcpp_toolexeclibdir) # Copy Objective C headers to installation include directory. install-headers: ! $(SHELL) $(toplevel_srcdir)/mkinstalldirs $(DESTDIR)$(libsubdir)/include/objc for file in $(OBJC_H); do \ realfile=$(srcdir)/objc/$${file}; \ ! $(INSTALL_DATA) $${realfile} $(DESTDIR)$(libsubdir)/include/objc; \ done check uninstall install-strip dist installcheck installdirs: mostlyclean: ! -$(LIBTOOL_CLEAN) rm -f libobjc.la libobjc_gc.la *.lo -rm -f runtime-info.h tmp-runtime.s *.o *.lo libobjc* xforward \ fflags *.aux *.cp *.dvi *.fn *.info *.ky *.log *.pg \ *.toc *.tp *.vr *.html libobj.exp --- 318,351 ---- CONFIG_SITE=no-such-file CC='$(CC)' AR='$(AR)' CFLAGS='$(CFLAGS)' \ CPPFLAGS='$(CPPFLAGS)' $(SHELL) config.status --recheck ! ${srcdir}/configure: @MAINT@ configure.ac rm -f config.cache cd ${srcdir} && autoconf install: install-libs install-headers install-libs: installdirs ! $(SHELL) $(toplevel_srcdir)/mkinstalldirs $(DESTDIR)$(toolexeclibdir) ! $(LIBTOOL_INSTALL) $(INSTALL) libobjc$(libext).la $(DESTDIR)$(toolexeclibdir); if [ "$(OBJC_BOEHM_GC)" ]; then \ ! $(LIBTOOL_INSTALL) $(INSTALL) libobjc_gc$(libext).la \ ! $(DESTDIR)$(toolexeclibdir);\ fi $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO="$@" ! @-$(LIBTOOL) --mode=finish $(DESTDIR)$(toolexeclibdir) # Copy Objective C headers to installation include directory. install-headers: ! $(SHELL) $(toplevel_srcdir)/mkinstalldirs $(DESTDIR)$(libsubdir)/$(includedirname)/objc for file in $(OBJC_H); do \ realfile=$(srcdir)/objc/$${file}; \ ! $(INSTALL_DATA) $${realfile} $(DESTDIR)$(libsubdir)/$(includedirname)/objc; \ done check uninstall install-strip dist installcheck installdirs: mostlyclean: ! -$(LIBTOOL_CLEAN) rm -f libobjc$(libext).la libobjc_gc$(libext).la *.lo -rm -f runtime-info.h tmp-runtime.s *.o *.lo libobjc* xforward \ fflags *.aux *.cp *.dvi *.fn *.info *.ky *.log *.pg \ *.toc *.tp *.vr *.html libobj.exp *************** maintainer-clean realclean: distclean *** 350,352 **** --- 363,369 ---- .PHONY: mostlyclean clean distclean maintainer-clean all check uninstall \ install-strip dist installcheck installdirs + + # Don't export variables to the environment, in order to not confuse + # configure. + .NOEXPORT: diff -Nrcpad gcc-3.4.3/libobjc/Protocol.m gcc-4.0.0/libobjc/Protocol.m *** gcc-3.4.3/libobjc/Protocol.m Mon Dec 1 23:29:59 2003 --- gcc-4.0.0/libobjc/Protocol.m Fri Jun 4 01:12:20 2004 *************** *** 1,5 **** /* This file contains the implementation of class Protocol. ! Copyright (C) 1993 Free Software Foundation, Inc. This file is part of GCC. --- 1,5 ---- /* This file contains the implementation of class Protocol. ! Copyright (C) 1993, 2004 Free Software Foundation, Inc. This file is part of GCC. *************** struct objc_method_description_list { *** 56,61 **** --- 56,64 ---- size_t i; struct objc_protocol_list* proto_list; + if (aProtocolObject == nil) + return NO; + if (!strcmp(aProtocolObject->protocol_name, self->protocol_name)) return YES; *************** struct objc_method_description_list { *** 129,132 **** --- 132,182 ---- return NULL; } + - (unsigned) hash + { + /* Compute a hash of the protocol_name; use the same hash algorithm + * that we use for class names; protocol names and class names are + * somewhat similar types of string spaces. + */ + int hash = 0, index; + + for (index = 0; protocol_name[index] != '\0'; index++) + { + hash = (hash << 4) ^ (hash >> 28) ^ protocol_name[index]; + } + + hash = (hash ^ (hash >> 10) ^ (hash >> 20)); + + return hash; + } + + /* + * Equality between formal protocols is only formal (nothing to do + * with actually checking the list of methods they have!). Two formal + * Protocols are equal if and only if they have the same name. + * + * Please note (for comparisons with other implementations) that + * checking the names is equivalent to checking that Protocol A + * conforms to Protocol B and Protocol B conforms to Protocol A, + * because this happens iff they have the same name. If they have + * different names, A conforms to B if and only if A includes B, but + * the situation where A includes B and B includes A is a circular + * dependency between Protocols which is forbidden by the compiler, so + * A conforms to B and B conforms to A with A and B having different + * names is an impossible case. + */ + - (BOOL) isEqual: (id)obj + { + if (obj == self) + return YES; + + if ([obj isKindOf: [Protocol class]]) + { + if (strcmp (protocol_name, ((Protocol *)obj)->protocol_name) == 0) + return YES; + } + + return NO; + } @end + diff -Nrcpad gcc-3.4.3/libobjc/acinclude.m4 gcc-4.0.0/libobjc/acinclude.m4 *** gcc-3.4.3/libobjc/acinclude.m4 Thu Jan 1 00:00:00 1970 --- gcc-4.0.0/libobjc/acinclude.m4 Wed Oct 20 01:26:37 2004 *************** *** 0 **** --- 1,24 ---- + dnl Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2004 + dnl Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. + + dnl This program is distributed in the hope that it will be useful, + dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without + dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A + dnl PARTICULAR PURPOSE. + + m4_include(../config/acx.m4) + m4_include(../config/no-executables.m4) + + m4_include(../libtool.m4) + dnl The lines below arrange for aclocal not to bring an installed + dnl libtool.m4 into aclocal.m4, while still arranging for automake to + dnl add a definition of LIBTOOL to Makefile.in. + ifelse(yes,no,[ + AC_DEFUN([AM_PROG_LIBTOOL],) + AC_DEFUN([AC_LIBTOOL_DLOPEN],) + AC_DEFUN([AC_LIBLTDL_CONVENIENCE],) + AC_SUBST(LIBTOOL) + ]) diff -Nrcpad gcc-3.4.3/libobjc/aclocal.m4 gcc-4.0.0/libobjc/aclocal.m4 *** gcc-3.4.3/libobjc/aclocal.m4 Thu Aug 28 01:15:06 2003 --- gcc-4.0.0/libobjc/aclocal.m4 Thu Dec 2 11:05:04 2004 *************** *** 1,235 **** ! dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. ! dnl This file is free software; the Free Software Foundation ! dnl gives unlimited permission to copy and/or distribute it, ! dnl with or without modifications, as long as this notice is preserved. ! dnl This program is distributed in the hope that it will be useful, ! dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without ! dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A ! dnl PARTICULAR PURPOSE. ! dnl ! dnl Initialize configure bits. ! dnl ! dnl GLIBCPP_TOPREL_CONFIGURE ! AC_DEFUN(GLIBCPP_TOPREL_CONFIGURE, [ ! dnl Default to --enable-multilib ! AC_ARG_ENABLE(multilib, ! [ --enable-multilib build hella library versions (default)], ! [case "${enableval}" in ! yes) multilib=yes ;; ! no) multilib=no ;; ! *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;; ! esac], [multilib=yes])dnl ! # When building with srcdir == objdir, links to the source files will ! # be created in directories within the target_subdir. We have to ! # adjust toplevel_srcdir accordingly, so that configure finds ! # install-sh and other auxiliary files that live in the top-level ! # source directory. ! if test "${srcdir}" = "."; then ! if test -z "${with_target_subdir}"; then ! toprel=".." ! else ! if test "${with_target_subdir}" != "."; then ! toprel="${with_multisrctop}../.." ! else ! toprel="${with_multisrctop}.." ! fi ! fi ! else ! toprel=".." ! fi ! AC_CONFIG_AUX_DIR(${srcdir}/$toprel) ! toplevel_srcdir=\${top_srcdir}/$toprel ! AC_SUBST(toplevel_srcdir) ! ]) ! dnl ! dnl Initialize configure bits. ! dnl ! dnl GLIBCPP_CONFIGURE ! AC_DEFUN(GLIBCPP_CONFIGURE, [ ! # Export build and source directories. ! # These need to be absolute paths, yet at the same time need to ! # canonicalize only relative paths, because then amd will not unmount ! # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd. ! glibcpp_builddir=`${PWDCMD-pwd}` ! case $srcdir in ! [\\/$]* | ?:[\\/]*) glibcpp_srcdir=${srcdir} ;; ! *) glibcpp_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;; ! esac ! AC_SUBST(glibcpp_builddir) ! AC_SUBST(glibcpp_srcdir) ! dnl This is here just to satisfy automake. ! ifelse(not,equal,[AC_CONFIG_AUX_DIR(..)]) ! # Will set LN_S to either 'ln -s' or 'ln'. With autoconf 2.50+, can also ! # be 'cp -p' if linking isn't available. ! #ac_cv_prog_LN_S='cp -p' ! AC_PROG_LN_S ! # We use these options to decide which functions to include. ! AC_ARG_WITH(target-subdir, ! [ --with-target-subdir=SUBDIR ! configuring in a subdirectory]) ! AC_ARG_WITH(cross-host, ! [ --with-cross-host=HOST configuring with a cross compiler]) ! # Never versions of autoconf add an underscore to these functions. ! # Prevent future problems ... ! ifdef([AC_PROG_CC_G],[],[define([AC_PROG_CC_G],defn([_AC_PROG_CC_G]))]) ! ifdef([AC_PROG_CC_GNU],[],[define([AC_PROG_CC_GNU],defn([_AC_PROG_CC_GNU]))]) ! ifdef([AC_PROG_CXX_G],[],[define([AC_PROG_CXX_G],defn([_AC_PROG_CXX_G]))]) ! ifdef([AC_PROG_CXX_GNU],[],[define([AC_PROG_CXX_GNU],defn([_AC_PROG_CXX_GNU]))]) ! # AC_PROG_CC ! # FIXME: We temporarily define our own version of AC_PROG_CC. This is ! # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We ! # are probably using a cross compiler, which will not be able to fully ! # link an executable. This should really be fixed in autoconf ! # itself. ! AC_DEFUN(LIB_AC_PROG_CC, ! [AC_BEFORE([$0], [AC_PROG_CPP])dnl ! dnl Fool anybody using AC_PROG_CC. ! AC_PROVIDE([AC_PROG_CC]) ! AC_CHECK_PROG(CC, gcc, gcc) ! if test -z "$CC"; then ! AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc) ! test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH]) ! fi ! AC_PROG_CC_GNU ! if test $ac_cv_prog_gcc = yes; then ! GCC=yes ! dnl Check whether -g works, even if CFLAGS is set, in case the package ! dnl plays around with CFLAGS (such as to build both debugging and ! dnl normal versions of a library), tasteless as that idea is. ! ac_test_CFLAGS="${CFLAGS+set}" ! ac_save_CFLAGS="$CFLAGS" ! CFLAGS= ! AC_PROG_CC_G ! if test "$ac_test_CFLAGS" = set; then ! CFLAGS="$ac_save_CFLAGS" ! elif test $ac_cv_prog_cc_g = yes; then ! CFLAGS="-g -O2" ! else ! CFLAGS="-O2" ! fi else ! GCC= ! test "${CFLAGS+set}" = set || CFLAGS="-g" fi ! ]) ! LIB_AC_PROG_CC ! AC_CHECK_TOOL(AS, as) ! AC_CHECK_TOOL(AR, ar) ! AC_CHECK_TOOL(RANLIB, ranlib, ranlib-not-found-in-path-error) ! AC_PROG_INSTALL ! # We need AC_EXEEXT to keep automake happy in cygnus mode. However, ! # at least currently, we never actually build a program, so we never ! # need to use $(EXEEXT). Moreover, the test for EXEEXT normally ! # fails, because we are probably configuring with a cross compiler ! # which can't create executables. So we include AC_EXEEXT to keep ! # automake happy, but we don't execute it, since we don't care about ! # the result. ! if false; then ! # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands ! # to nothing, so nothing would remain between `then' and `fi' if it ! # were not for the `:' below. ! : ! AC_EXEEXT ! fi ! ]) ! dnl ! dnl GLIBCPP_EXPORT_INSTALL_INFO ! dnl calculates gxx_install_dir ! dnl exports glibcpp_toolexecdir ! dnl exports glibcpp_toolexeclibdir ! dnl exports glibcpp_prefixdir ! dnl ! dnl Assumes cross_compiling bits already done, and with_cross_host in ! dnl particular ! dnl ! dnl GLIBCPP_EXPORT_INSTALL_INFO ! AC_DEFUN(GLIBCPP_EXPORT_INSTALL_INFO, [ ! # Assumes glibcpp_builddir, glibcpp_srcdir are alreay set up and ! # exported correctly in GLIBCPP_CONFIGURE. ! glibcpp_toolexecdir=no ! glibcpp_toolexeclibdir=no ! glibcpp_prefixdir=${prefix} ! AC_MSG_CHECKING([for interface version number]) ! libstdcxx_interface=$INTERFACE ! AC_MSG_RESULT($libstdcxx_interface) ! # Process the option "--enable-version-specific-runtime-libs" ! AC_MSG_CHECKING([for --enable-version-specific-runtime-libs]) ! AC_ARG_ENABLE(version-specific-runtime-libs, ! [ --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory ], ! [case "$enableval" in ! yes) version_specific_libs=yes ;; ! no) version_specific_libs=no ;; ! *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);; ! esac], ! version_specific_libs=no)dnl ! # Option set, now we can test it. ! AC_MSG_RESULT($version_specific_libs) ! gcc_version_trigger=${srcdir}/../gcc/version.c ! gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/'` ! gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` ! AC_SUBST(gcc_version) ! AC_SUBST(gcc_version_trigger) ! if test $version_specific_libs = yes; then ! # Need the gcc compiler version to know where to install libraries ! # and header files if --enable-version-specific-runtime-libs option ! # is selected. ! changequote(,)dnl ! glibcpp_toolexecdir='$(libdir)/gcc/$(target_alias)' ! glibcpp_toolexeclibdir='$(toolexecdir)/'${gcc_version}'$(MULTISUBDIR)' ! changequote([,])dnl ! fi ! # Calculate glibcpp_toolexecdir, glibcpp_toolexeclibdir ! # Install a library built with a cross compiler in tooldir, not libdir. ! if test x"$glibcpp_toolexecdir" = x"no"; then ! if test -n "$with_cross_host" && ! test x"$with_cross_host" != x"no"; then ! glibcpp_toolexecdir='$(exec_prefix)/$(target_alias)' ! glibcpp_toolexeclibdir='$(toolexecdir)/lib' ! else ! glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_alias)' ! glibcpp_toolexeclibdir='$(libdir)' ! fi ! multi_os_directory=`$CC -print-multi-os-directory` ! case $multi_os_directory in ! .) ;; # Avoid trailing /. ! *) glibcpp_toolexeclibdir=$glibcpp_toolexeclibdir/$multi_os_directory ;; ! esac ! fi ! AC_SUBST(glibcpp_prefixdir) ! AC_SUBST(glibcpp_toolexecdir) ! AC_SUBST(glibcpp_toolexeclibdir) ! ]) ! sinclude(../libtool.m4) ! dnl The lines below arrange for aclocal not to bring an installed ! dnl libtool.m4 into aclocal.m4, while still arranging for automake to ! dnl add a definition of LIBTOOL to Makefile.in. ! ifelse(,,,[AC_SUBST(LIBTOOL) ! AC_DEFUN([AM_PROG_LIBTOOL]) ! AC_DEFUN([AC_LIBTOOL_DLOPEN]) ! AC_DEFUN([AC_PROG_LD]) ]) --- 1,202 ---- ! # generated automatically by aclocal 1.9.3 -*- Autoconf -*- ! # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 ! # Free Software Foundation, Inc. ! # This file is free software; the Free Software Foundation ! # gives unlimited permission to copy and/or distribute it, ! # with or without modifications, as long as this notice is preserved. ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY, to the extent permitted by law; without ! # even the implied warranty of MERCHANTABILITY or FITNESS FOR A ! # PARTICULAR PURPOSE. ! # AM_AUX_DIR_EXPAND ! # Copyright (C) 2001, 2003 Free Software Foundation, Inc. ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! # 02111-1307, USA. ! # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets ! # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to ! # `$srcdir', `$srcdir/..', or `$srcdir/../..'. ! # ! # Of course, Automake must honor this variable whenever it calls a ! # tool from the auxiliary directory. The problem is that $srcdir (and ! # therefore $ac_aux_dir as well) can be either absolute or relative, ! # depending on how configure is run. This is pretty annoying, since ! # it makes $ac_aux_dir quite unusable in subdirectories: in the top ! # source directory, any form will work fine, but in subdirectories a ! # relative path needs to be adjusted first. ! # ! # $ac_aux_dir/missing ! # fails when called from a subdirectory if $ac_aux_dir is relative ! # $top_srcdir/$ac_aux_dir/missing ! # fails if $ac_aux_dir is absolute, ! # fails when called from a subdirectory in a VPATH build with ! # a relative $ac_aux_dir ! # ! # The reason of the latter failure is that $top_srcdir and $ac_aux_dir ! # are both prefixed by $srcdir. In an in-source build this is usually ! # harmless because $srcdir is `.', but things will broke when you ! # start a VPATH build or use an absolute $srcdir. ! # ! # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, ! # iff we strip the leading $srcdir from $ac_aux_dir. That would be: ! # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` ! # and then we would define $MISSING as ! # MISSING="\${SHELL} $am_aux_dir/missing" ! # This will work as long as MISSING is not called from configure, because ! # unfortunately $(top_srcdir) has no meaning in configure. ! # However there are other variables, like CC, which are often used in ! # configure, and could therefore not use this "fixed" $ac_aux_dir. ! # ! # Another solution, used here, is to always expand $ac_aux_dir to an ! # absolute PATH. The drawback is that using absolute paths prevent a ! # configured tree to be moved without reconfiguration. ! AC_DEFUN([AM_AUX_DIR_EXPAND], ! [dnl Rely on autoconf to set up CDPATH properly. ! AC_PREREQ([2.50])dnl ! # expand $ac_aux_dir to an absolute path ! am_aux_dir=`cd $ac_aux_dir && pwd` ! ]) ! # AM_CONDITIONAL -*- Autoconf -*- ! # Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! # 02111-1307, USA. ! ! # serial 6 ! ! # AM_CONDITIONAL(NAME, SHELL-CONDITION) ! # ------------------------------------- ! # Define a conditional. ! AC_DEFUN([AM_CONDITIONAL], ! [AC_PREREQ(2.52)dnl ! ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], ! [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl ! AC_SUBST([$1_TRUE]) ! AC_SUBST([$1_FALSE]) ! if $2; then ! $1_TRUE= ! $1_FALSE='#' else ! $1_TRUE='#' ! $1_FALSE= fi ! AC_CONFIG_COMMANDS_PRE( ! [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then ! AC_MSG_ERROR([[conditional "$1" was never defined. ! Usually this means the macro was only invoked conditionally.]]) ! fi])]) ! # Add --enable-maintainer-mode option to configure. ! # From Jim Meyering ! # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004 ! # Free Software Foundation, Inc. ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! # 02111-1307, USA. ! # serial 3 ! AC_DEFUN([AM_MAINTAINER_MODE], ! [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) ! dnl maintainer-mode is disabled by default ! AC_ARG_ENABLE(maintainer-mode, ! [ --enable-maintainer-mode enable make rules and dependencies not useful ! (and sometimes confusing) to the casual installer], ! USE_MAINTAINER_MODE=$enableval, ! USE_MAINTAINER_MODE=no) ! AC_MSG_RESULT([$USE_MAINTAINER_MODE]) ! AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) ! MAINT=$MAINTAINER_MODE_TRUE ! AC_SUBST(MAINT)dnl ! ] ! ) ! AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) ! # serial 2 ! # AM_PROG_CC_C_O ! # -------------- ! # Like AC_PROG_CC_C_O, but changed for automake. ! # Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc. ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! # 02111-1307, USA. ! ! AC_DEFUN([AM_PROG_CC_C_O], ! [AC_REQUIRE([AC_PROG_CC_C_O])dnl ! AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl ! # FIXME: we rely on the cache variable name because ! # there is no other way. ! set dummy $CC ! ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` ! if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then ! # Losing compiler, so override with the script. ! # FIXME: It is wrong to rewrite CC. ! # But if we don't then we get into trouble of one sort or another. ! # A longer-term fix would be to have automake use am__CC in this case, ! # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" ! CC="$am_aux_dir/compile $CC" ! fi ]) + + m4_include([../config/gcc-version.m4]) + m4_include([acinclude.m4]) diff -Nrcpad gcc-3.4.3/libobjc/archive.c gcc-4.0.0/libobjc/archive.c *** gcc-3.4.3/libobjc/archive.c Fri May 23 20:04:58 2003 --- gcc-4.0.0/libobjc/archive.c Wed Mar 2 20:12:17 2005 *************** *** 1,5 **** /* GNU Objective C Runtime archiving ! Copyright (C) 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc. Contributed by Kresten Krab Thorup This file is part of GCC. --- 1,5 ---- /* GNU Objective C Runtime archiving ! Copyright (C) 1993, 1995, 1996, 1997, 2002, 2004 Free Software Foundation, Inc. Contributed by Kresten Krab Thorup This file is part of GCC. *************** const char *objc_skip_type (const char * *** 62,68 **** static void __objc_finish_write_root_object (struct objc_typed_stream *); static void __objc_finish_read_root_object (struct objc_typed_stream *); ! static __inline__ int __objc_code_unsigned_char (unsigned char *buf, unsigned char val) { if ((val&_B_VALUE) == val) --- 62,68 ---- static void __objc_finish_write_root_object (struct objc_typed_stream *); static void __objc_finish_read_root_object (struct objc_typed_stream *); ! static inline int __objc_code_unsigned_char (unsigned char *buf, unsigned char val) { if ((val&_B_VALUE) == val) *************** objc_write_unsigned_char (struct objc_ty *** 84,93 **** { unsigned char buf[sizeof (unsigned char) + 1]; int len = __objc_code_unsigned_char (buf, value); ! return (*stream->write) (stream->physical, buf, len); } ! static __inline__ int __objc_code_char (unsigned char *buf, signed char val) { if (val >= 0) --- 84,93 ---- { unsigned char buf[sizeof (unsigned char) + 1]; int len = __objc_code_unsigned_char (buf, value); ! return (*stream->write) (stream->physical, (char*)buf, len); } ! static inline int __objc_code_char (unsigned char *buf, signed char val) { if (val >= 0) *************** objc_write_char (struct objc_typed_strea *** 105,114 **** { unsigned char buf[sizeof (char) + 1]; int len = __objc_code_char (buf, value); ! return (*stream->write) (stream->physical, buf, len); } ! static __inline__ int __objc_code_unsigned_short (unsigned char *buf, unsigned short val) { if ((val&_B_VALUE) == val) --- 105,114 ---- { unsigned char buf[sizeof (char) + 1]; int len = __objc_code_char (buf, value); ! return (*stream->write) (stream->physical, (char*)buf, len); } ! static inline int __objc_code_unsigned_short (unsigned char *buf, unsigned short val) { if ((val&_B_VALUE) == val) *************** objc_write_unsigned_short (struct objc_t *** 143,152 **** { unsigned char buf[sizeof (unsigned short) + 1]; int len = __objc_code_unsigned_short (buf, value); ! return (*stream->write) (stream->physical, buf, len); } ! static __inline__ int __objc_code_short (unsigned char *buf, short val) { int sign = (val < 0); --- 143,152 ---- { unsigned char buf[sizeof (unsigned short) + 1]; int len = __objc_code_unsigned_short (buf, value); ! return (*stream->write) (stream->physical, (char*)buf, len); } ! static inline int __objc_code_short (unsigned char *buf, short val) { int sign = (val < 0); *************** objc_write_short (struct objc_typed_stre *** 161,171 **** { unsigned char buf[sizeof (short) + 1]; int len = __objc_code_short (buf, value); ! return (*stream->write) (stream->physical, buf, len); } ! static __inline__ int __objc_code_unsigned_int (unsigned char *buf, unsigned int val) { if ((val&_B_VALUE) == val) --- 161,171 ---- { unsigned char buf[sizeof (short) + 1]; int len = __objc_code_short (buf, value); ! return (*stream->write) (stream->physical, (char*)buf, len); } ! static inline int __objc_code_unsigned_int (unsigned char *buf, unsigned int val) { if ((val&_B_VALUE) == val) *************** objc_write_unsigned_int (struct objc_typ *** 199,208 **** { unsigned char buf[sizeof (unsigned int) + 1]; int len = __objc_code_unsigned_int (buf, value); ! return (*stream->write) (stream->physical, buf, len); } ! static __inline__ int __objc_code_int (unsigned char *buf, int val) { int sign = (val < 0); --- 199,208 ---- { unsigned char buf[sizeof (unsigned int) + 1]; int len = __objc_code_unsigned_int (buf, value); ! return (*stream->write) (stream->physical, (char*)buf, len); } ! static inline int __objc_code_int (unsigned char *buf, int val) { int sign = (val < 0); *************** objc_write_int (struct objc_typed_stream *** 217,226 **** { unsigned char buf[sizeof (int) + 1]; int len = __objc_code_int (buf, value); ! return (*stream->write) (stream->physical, buf, len); } ! static __inline__ int __objc_code_unsigned_long (unsigned char *buf, unsigned long val) { if ((val&_B_VALUE) == val) --- 217,226 ---- { unsigned char buf[sizeof (int) + 1]; int len = __objc_code_int (buf, value); ! return (*stream->write) (stream->physical, (char*)buf, len); } ! static inline int __objc_code_unsigned_long (unsigned char *buf, unsigned long val) { if ((val&_B_VALUE) == val) *************** objc_write_unsigned_long (struct objc_ty *** 255,264 **** { unsigned char buf[sizeof (unsigned long) + 1]; int len = __objc_code_unsigned_long (buf, value); ! return (*stream->write) (stream->physical, buf, len); } ! static __inline__ int __objc_code_long (unsigned char *buf, long val) { int sign = (val < 0); --- 255,264 ---- { unsigned char buf[sizeof (unsigned long) + 1]; int len = __objc_code_unsigned_long (buf, value); ! return (*stream->write) (stream->physical, (char*)buf, len); } ! static inline int __objc_code_long (unsigned char *buf, long val) { int sign = (val < 0); *************** objc_write_long (struct objc_typed_strea *** 273,279 **** { unsigned char buf[sizeof (long) + 1]; int len = __objc_code_long (buf, value); ! return (*stream->write) (stream->physical, buf, len); } --- 273,279 ---- { unsigned char buf[sizeof (long) + 1]; int len = __objc_code_long (buf, value); ! return (*stream->write) (stream->physical, (char*)buf, len); } *************** objc_write_string (struct objc_typed_str *** 290,297 **** else /* _B_NINT */ buf[0] = (buf[0]&_B_VALUE)|_B_NSTR; ! if ((*stream->write) (stream->physical, buf, len) != 0) ! return (*stream->write) (stream->physical, string, nbytes); else return 0; } --- 290,297 ---- else /* _B_NINT */ buf[0] = (buf[0]&_B_VALUE)|_B_NSTR; ! if ((*stream->write) (stream->physical, (char*)buf, len) != 0) ! return (*stream->write) (stream->physical, (char*)string, nbytes); else return 0; } *************** objc_write_string_atomic (struct objc_ty *** 301,312 **** unsigned char *string, unsigned int nbytes) { unsigned long key; ! if ((key = PTR2LONG(hash_value_for_key (stream->stream_table, string)))) return objc_write_use_common (stream, key); else { int length; ! hash_add (&stream->stream_table, LONG2PTR(key=PTR2LONG(string)), string); if ((length = objc_write_register_common (stream, key))) return objc_write_string (stream, string, nbytes); return length; --- 301,313 ---- unsigned char *string, unsigned int nbytes) { unsigned long key; ! if ((key = PTR2LONG(objc_hash_value_for_key (stream->stream_table, string)))) return objc_write_use_common (stream, key); else { int length; ! objc_hash_add (&stream->stream_table, ! LONG2PTR(key=PTR2LONG(string)), string); if ((length = objc_write_register_common (stream, key))) return objc_write_string (stream, string, nbytes); return length; *************** objc_write_register_common (struct objc_ *** 323,334 **** { buf[0] = _B_RCOMM|0x01; buf[1] &= _B_VALUE; ! return (*stream->write) (stream->physical, buf, len + 1); } else { buf[1] = (buf[1]&_B_VALUE)|_B_RCOMM; ! return (*stream->write) (stream->physical, buf + 1, len); } } --- 324,335 ---- { buf[0] = _B_RCOMM|0x01; buf[1] &= _B_VALUE; ! return (*stream->write) (stream->physical, (char*)buf, len + 1); } else { buf[1] = (buf[1]&_B_VALUE)|_B_RCOMM; ! return (*stream->write) (stream->physical, (char*)buf + 1, len); } } *************** objc_write_use_common (struct objc_typed *** 341,362 **** { buf[0] = _B_UCOMM|0x01; buf[1] &= _B_VALUE; ! return (*stream->write) (stream->physical, buf, 2); } else { buf[1] = (buf[1]&_B_VALUE)|_B_UCOMM; ! return (*stream->write) (stream->physical, buf + 1, len); } } ! static __inline__ int __objc_write_extension (struct objc_typed_stream *stream, unsigned char code) { if (code <= _B_VALUE) { unsigned char buf = code|_B_EXT; ! return (*stream->write) (stream->physical, &buf, 1); } else { --- 342,363 ---- { buf[0] = _B_UCOMM|0x01; buf[1] &= _B_VALUE; ! return (*stream->write) (stream->physical, (char*)buf, 2); } else { buf[1] = (buf[1]&_B_VALUE)|_B_UCOMM; ! return (*stream->write) (stream->physical, (char*)buf + 1, len); } } ! static inline int __objc_write_extension (struct objc_typed_stream *stream, unsigned char code) { if (code <= _B_VALUE) { unsigned char buf = code|_B_EXT; ! return (*stream->write) (stream->physical, (char*)&buf, 1); } else { *************** __objc_write_extension (struct objc_type *** 366,372 **** } } ! __inline__ int __objc_write_object (struct objc_typed_stream *stream, id object) { unsigned char buf = '\0'; --- 367,373 ---- } } ! inline int __objc_write_object (struct objc_typed_stream *stream, id object) { unsigned char buf = '\0'; *************** __objc_write_object (struct objc_typed_s *** 376,382 **** __objc_write_extension (stream, _BX_OBJECT); objc_write_class (stream, object->class_pointer); (*objc_msg_lookup (object, write_sel)) (object, write_sel, stream); ! return (*stream->write) (stream->physical, &buf, 1); } else return objc_write_use_common (stream, 0); --- 377,383 ---- __objc_write_extension (stream, _BX_OBJECT); objc_write_class (stream, object->class_pointer); (*objc_msg_lookup (object, write_sel)) (object, write_sel, stream); ! return (*stream->write) (stream->physical, (char*)&buf, 1); } else return objc_write_use_common (stream, 0); *************** int *** 386,392 **** objc_write_object_reference (struct objc_typed_stream *stream, id object) { unsigned long key; ! if ((key = PTR2LONG(hash_value_for_key (stream->object_table, object)))) return objc_write_use_common (stream, key); __objc_write_extension (stream, _BX_OBJREF); --- 387,393 ---- objc_write_object_reference (struct objc_typed_stream *stream, id object) { unsigned long key; ! if ((key = PTR2LONG(objc_hash_value_for_key (stream->object_table, object)))) return objc_write_use_common (stream, key); __objc_write_extension (stream, _BX_OBJREF); *************** int *** 415,421 **** objc_write_object (struct objc_typed_stream *stream, id object) { unsigned long key; ! if ((key = PTR2LONG(hash_value_for_key (stream->object_table, object)))) return objc_write_use_common (stream, key); else if (object == nil) --- 416,422 ---- objc_write_object (struct objc_typed_stream *stream, id object) { unsigned long key; ! if ((key = PTR2LONG(objc_hash_value_for_key (stream->object_table, object)))) return objc_write_use_common (stream, key); else if (object == nil) *************** objc_write_object (struct objc_typed_str *** 424,441 **** else { int length; ! hash_add (&stream->object_table, LONG2PTR(key=PTR2LONG(object)), object); if ((length = objc_write_register_common (stream, key))) return __objc_write_object (stream, object); return length; } } ! __inline__ int __objc_write_class (struct objc_typed_stream *stream, struct objc_class *class) { __objc_write_extension (stream, _BX_CLASS); ! objc_write_string_atomic (stream, (char *) class->name, strlen ((char *) class->name)); return objc_write_unsigned_long (stream, class->version); } --- 425,443 ---- else { int length; ! objc_hash_add (&stream->object_table, ! LONG2PTR(key=PTR2LONG(object)), object); if ((length = objc_write_register_common (stream, key))) return __objc_write_object (stream, object); return length; } } ! inline int __objc_write_class (struct objc_typed_stream *stream, struct objc_class *class) { __objc_write_extension (stream, _BX_CLASS); ! objc_write_string_atomic (stream, (unsigned char *) class->name, strlen ((char *) class->name)); return objc_write_unsigned_long (stream, class->version); } *************** objc_write_class (struct objc_typed_stre *** 446,457 **** struct objc_class *class) { unsigned long key; ! if ((key = PTR2LONG(hash_value_for_key (stream->stream_table, class)))) return objc_write_use_common (stream, key); else { int length; ! hash_add (&stream->stream_table, LONG2PTR(key = PTR2LONG(class)), class); if ((length = objc_write_register_common (stream, key))) return __objc_write_class (stream, class); return length; --- 448,460 ---- struct objc_class *class) { unsigned long key; ! if ((key = PTR2LONG(objc_hash_value_for_key (stream->stream_table, class)))) return objc_write_use_common (stream, key); else { int length; ! objc_hash_add (&stream->stream_table, ! LONG2PTR(key = PTR2LONG(class)), class); if ((length = objc_write_register_common (stream, key))) return __objc_write_class (stream, class); return length; *************** objc_write_class (struct objc_typed_stre *** 459,474 **** } ! __inline__ int __objc_write_selector (struct objc_typed_stream *stream, SEL selector) { const char *sel_name; __objc_write_extension (stream, _BX_SEL); /* to handle NULL selectors */ if ((SEL)0 == selector) ! return objc_write_string (stream, "", 0); sel_name = sel_get_name (selector); ! return objc_write_string (stream, sel_name, strlen ((char*)sel_name)); } int --- 462,477 ---- } ! inline int __objc_write_selector (struct objc_typed_stream *stream, SEL selector) { const char *sel_name; __objc_write_extension (stream, _BX_SEL); /* to handle NULL selectors */ if ((SEL)0 == selector) ! return objc_write_string (stream, (unsigned char*)"", 0); sel_name = sel_get_name (selector); ! return objc_write_string (stream, (unsigned char*)sel_name, strlen ((char*)sel_name)); } int *************** objc_write_selector (struct objc_typed_s *** 482,493 **** return __objc_write_selector (stream, selector); sel_name = sel_get_name (selector); ! if ((key = PTR2LONG(hash_value_for_key (stream->stream_table, sel_name)))) return objc_write_use_common (stream, key); else { int length; ! hash_add (&stream->stream_table, LONG2PTR(key = PTR2LONG(sel_name)), (char *) sel_name); if ((length = objc_write_register_common (stream, key))) return __objc_write_selector (stream, selector); --- 485,497 ---- return __objc_write_selector (stream, selector); sel_name = sel_get_name (selector); ! if ((key = PTR2LONG(objc_hash_value_for_key (stream->stream_table, ! sel_name)))) return objc_write_use_common (stream, key); else { int length; ! objc_hash_add (&stream->stream_table, LONG2PTR(key = PTR2LONG(sel_name)), (char *) sel_name); if ((length = objc_write_register_common (stream, key))) return __objc_write_selector (stream, selector); *************** objc_write_selector (struct objc_typed_s *** 501,512 **** ** Read operations */ ! __inline__ int objc_read_char (struct objc_typed_stream *stream, char *val) { unsigned char buf; int len; ! len = (*stream->read) (stream->physical, &buf, 1); if (len != 0) { if ((buf & _B_CODE) == _B_SINT) --- 505,516 ---- ** Read operations */ ! inline int objc_read_char (struct objc_typed_stream *stream, char *val) { unsigned char buf; int len; ! len = (*stream->read) (stream->physical, (char*)&buf, 1); if (len != 0) { if ((buf & _B_CODE) == _B_SINT) *************** objc_read_char (struct objc_typed_stream *** 528,545 **** } ! __inline__ int objc_read_unsigned_char (struct objc_typed_stream *stream, unsigned char *val) { unsigned char buf; int len; ! if ((len = (*stream->read) (stream->physical, &buf, 1))) { if ((buf & _B_CODE) == _B_SINT) (*val) = (buf & _B_VALUE); else if ((buf & _B_NUMBER) == 1) ! len = (*stream->read) (stream->physical, val, 1); else objc_error (nil, OBJC_ERR_BAD_DATA, --- 532,549 ---- } ! inline int objc_read_unsigned_char (struct objc_typed_stream *stream, unsigned char *val) { unsigned char buf; int len; ! if ((len = (*stream->read) (stream->physical, (char*)&buf, 1))) { if ((buf & _B_CODE) == _B_SINT) (*val) = (buf & _B_VALUE); else if ((buf & _B_NUMBER) == 1) ! len = (*stream->read) (stream->physical, (char*)val, 1); else objc_error (nil, OBJC_ERR_BAD_DATA, *************** objc_read_unsigned_char (struct objc_typ *** 549,560 **** return len; } ! __inline__ int objc_read_short (struct objc_typed_stream *stream, short *value) { unsigned char buf[sizeof (short) + 1]; int len; ! if ((len = (*stream->read) (stream->physical, buf, 1))) { if ((buf[0] & _B_CODE) == _B_SINT) (*value) = (buf[0] & _B_VALUE); --- 553,564 ---- return len; } ! inline int objc_read_short (struct objc_typed_stream *stream, short *value) { unsigned char buf[sizeof (short) + 1]; int len; ! if ((len = (*stream->read) (stream->physical, (char*)buf, 1))) { if ((buf[0] & _B_CODE) == _B_SINT) (*value) = (buf[0] & _B_VALUE); *************** objc_read_short (struct objc_typed_strea *** 566,572 **** if (nbytes > (int) sizeof (short)) objc_error (nil, OBJC_ERR_BAD_DATA, "expected short, got bigger (%dbits)", nbytes*8); ! len = (*stream->read) (stream->physical, buf + 1, nbytes); (*value) = 0; while (pos <= nbytes) (*value) = ((*value)*0x100) + buf[pos++]; --- 570,576 ---- if (nbytes > (int) sizeof (short)) objc_error (nil, OBJC_ERR_BAD_DATA, "expected short, got bigger (%dbits)", nbytes*8); ! len = (*stream->read) (stream->physical, (char*)buf + 1, nbytes); (*value) = 0; while (pos <= nbytes) (*value) = ((*value)*0x100) + buf[pos++]; *************** objc_read_short (struct objc_typed_strea *** 577,589 **** return len; } ! __inline__ int objc_read_unsigned_short (struct objc_typed_stream *stream, unsigned short *value) { unsigned char buf[sizeof (unsigned short) + 1]; int len; ! if ((len = (*stream->read) (stream->physical, buf, 1))) { if ((buf[0] & _B_CODE) == _B_SINT) (*value) = (buf[0] & _B_VALUE); --- 581,593 ---- return len; } ! inline int objc_read_unsigned_short (struct objc_typed_stream *stream, unsigned short *value) { unsigned char buf[sizeof (unsigned short) + 1]; int len; ! if ((len = (*stream->read) (stream->physical, (char*)buf, 1))) { if ((buf[0] & _B_CODE) == _B_SINT) (*value) = (buf[0] & _B_VALUE); *************** objc_read_unsigned_short (struct objc_ty *** 595,601 **** if (nbytes > (int) sizeof (short)) objc_error (nil, OBJC_ERR_BAD_DATA, "expected short, got int or bigger"); ! len = (*stream->read) (stream->physical, buf + 1, nbytes); (*value) = 0; while (pos <= nbytes) (*value) = ((*value)*0x100) + buf[pos++]; --- 599,605 ---- if (nbytes > (int) sizeof (short)) objc_error (nil, OBJC_ERR_BAD_DATA, "expected short, got int or bigger"); ! len = (*stream->read) (stream->physical, (char*)buf + 1, nbytes); (*value) = 0; while (pos <= nbytes) (*value) = ((*value)*0x100) + buf[pos++]; *************** objc_read_unsigned_short (struct objc_ty *** 605,616 **** } ! __inline__ int objc_read_int (struct objc_typed_stream *stream, int *value) { unsigned char buf[sizeof (int) + 1]; int len; ! if ((len = (*stream->read) (stream->physical, buf, 1))) { if ((buf[0] & _B_CODE) == _B_SINT) (*value) = (buf[0] & _B_VALUE); --- 609,620 ---- } ! inline int objc_read_int (struct objc_typed_stream *stream, int *value) { unsigned char buf[sizeof (int) + 1]; int len; ! if ((len = (*stream->read) (stream->physical, (char*)buf, 1))) { if ((buf[0] & _B_CODE) == _B_SINT) (*value) = (buf[0] & _B_VALUE); *************** objc_read_int (struct objc_typed_stream *** 621,627 **** int nbytes = buf[0] & _B_NUMBER; if (nbytes > (int) sizeof (int)) objc_error (nil, OBJC_ERR_BAD_DATA, "expected int, got bigger"); ! len = (*stream->read) (stream->physical, buf + 1, nbytes); (*value) = 0; while (pos <= nbytes) (*value) = ((*value)*0x100) + buf[pos++]; --- 625,631 ---- int nbytes = buf[0] & _B_NUMBER; if (nbytes > (int) sizeof (int)) objc_error (nil, OBJC_ERR_BAD_DATA, "expected int, got bigger"); ! len = (*stream->read) (stream->physical, (char*)buf + 1, nbytes); (*value) = 0; while (pos <= nbytes) (*value) = ((*value)*0x100) + buf[pos++]; *************** objc_read_int (struct objc_typed_stream *** 632,643 **** return len; } ! __inline__ int objc_read_long (struct objc_typed_stream *stream, long *value) { unsigned char buf[sizeof (long) + 1]; int len; ! if ((len = (*stream->read) (stream->physical, buf, 1))) { if ((buf[0] & _B_CODE) == _B_SINT) (*value) = (buf[0] & _B_VALUE); --- 636,647 ---- return len; } ! inline int objc_read_long (struct objc_typed_stream *stream, long *value) { unsigned char buf[sizeof (long) + 1]; int len; ! if ((len = (*stream->read) (stream->physical, (char*)buf, 1))) { if ((buf[0] & _B_CODE) == _B_SINT) (*value) = (buf[0] & _B_VALUE); *************** objc_read_long (struct objc_typed_stream *** 648,654 **** int nbytes = buf[0] & _B_NUMBER; if (nbytes > (int) sizeof (long)) objc_error (nil, OBJC_ERR_BAD_DATA, "expected long, got bigger"); ! len = (*stream->read) (stream->physical, buf + 1, nbytes); (*value) = 0; while (pos <= nbytes) (*value) = ((*value)*0x100) + buf[pos++]; --- 652,658 ---- int nbytes = buf[0] & _B_NUMBER; if (nbytes > (int) sizeof (long)) objc_error (nil, OBJC_ERR_BAD_DATA, "expected long, got bigger"); ! len = (*stream->read) (stream->physical, (char*)buf + 1, nbytes); (*value) = 0; while (pos <= nbytes) (*value) = ((*value)*0x100) + buf[pos++]; *************** objc_read_long (struct objc_typed_stream *** 659,665 **** return len; } ! __inline__ int __objc_read_nbyte_uint (struct objc_typed_stream *stream, unsigned int nbytes, unsigned int *val) { --- 663,669 ---- return len; } ! inline int __objc_read_nbyte_uint (struct objc_typed_stream *stream, unsigned int nbytes, unsigned int *val) { *************** __objc_read_nbyte_uint (struct objc_type *** 670,676 **** if (nbytes > sizeof (int)) objc_error (nil, OBJC_ERR_BAD_DATA, "expected int, got bigger"); ! len = (*stream->read) (stream->physical, buf, nbytes); (*val) = 0; while (pos < nbytes) (*val) = ((*val)*0x100) + buf[pos++]; --- 674,680 ---- if (nbytes > sizeof (int)) objc_error (nil, OBJC_ERR_BAD_DATA, "expected int, got bigger"); ! len = (*stream->read) (stream->physical, (char*)buf, nbytes); (*val) = 0; while (pos < nbytes) (*val) = ((*val)*0x100) + buf[pos++]; *************** __objc_read_nbyte_uint (struct objc_type *** 678,690 **** } ! __inline__ int objc_read_unsigned_int (struct objc_typed_stream *stream, unsigned int *value) { unsigned char buf[sizeof (unsigned int) + 1]; int len; ! if ((len = (*stream->read) (stream->physical, buf, 1))) { if ((buf[0] & _B_CODE) == _B_SINT) (*value) = (buf[0] & _B_VALUE); --- 682,694 ---- } ! inline int objc_read_unsigned_int (struct objc_typed_stream *stream, unsigned int *value) { unsigned char buf[sizeof (unsigned int) + 1]; int len; ! if ((len = (*stream->read) (stream->physical, (char*)buf, 1))) { if ((buf[0] & _B_CODE) == _B_SINT) (*value) = (buf[0] & _B_VALUE); *************** __objc_read_nbyte_ulong (struct objc_typ *** 707,713 **** if (nbytes > sizeof (long)) objc_error (nil, OBJC_ERR_BAD_DATA, "expected long, got bigger"); ! len = (*stream->read) (stream->physical, buf, nbytes); (*val) = 0; while (pos < nbytes) (*val) = ((*val)*0x100) + buf[pos++]; --- 711,717 ---- if (nbytes > sizeof (long)) objc_error (nil, OBJC_ERR_BAD_DATA, "expected long, got bigger"); ! len = (*stream->read) (stream->physical, (char*)buf, nbytes); (*val) = 0; while (pos < nbytes) (*val) = ((*val)*0x100) + buf[pos++]; *************** __objc_read_nbyte_ulong (struct objc_typ *** 715,727 **** } ! __inline__ int objc_read_unsigned_long (struct objc_typed_stream *stream, unsigned long *value) { unsigned char buf[sizeof (unsigned long) + 1]; int len; ! if ((len = (*stream->read) (stream->physical, buf, 1))) { if ((buf[0] & _B_CODE) == _B_SINT) (*value) = (buf[0] & _B_VALUE); --- 719,731 ---- } ! inline int objc_read_unsigned_long (struct objc_typed_stream *stream, unsigned long *value) { unsigned char buf[sizeof (unsigned long) + 1]; int len; ! if ((len = (*stream->read) (stream->physical, (char*)buf, 1))) { if ((buf[0] & _B_CODE) == _B_SINT) (*value) = (buf[0] & _B_VALUE); *************** objc_read_unsigned_long (struct objc_typ *** 733,752 **** return len; } ! __inline__ int objc_read_string (struct objc_typed_stream *stream, char **string) { unsigned char buf[sizeof (unsigned int) + 1]; int len; ! if ((len = (*stream->read) (stream->physical, buf, 1))) { unsigned long key = 0; if ((buf[0]&_B_CODE) == _B_RCOMM) /* register following */ { len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), &key); ! len = (*stream->read) (stream->physical, buf, 1); } switch (buf[0]&_B_CODE) { --- 737,756 ---- return len; } ! inline int objc_read_string (struct objc_typed_stream *stream, char **string) { unsigned char buf[sizeof (unsigned int) + 1]; int len; ! if ((len = (*stream->read) (stream->physical, (char*)buf, 1))) { unsigned long key = 0; if ((buf[0]&_B_CODE) == _B_RCOMM) /* register following */ { len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), &key); ! len = (*stream->read) (stream->physical, (char*)buf, 1); } switch (buf[0]&_B_CODE) { *************** objc_read_string (struct objc_typed_stre *** 755,761 **** int length = buf[0]&_B_VALUE; (*string) = (char*)objc_malloc (length + 1); if (key) ! hash_add (&stream->stream_table, LONG2PTR(key), *string); len = (*stream->read) (stream->physical, *string, length); (*string)[length] = '\0'; } --- 759,765 ---- int length = buf[0]&_B_VALUE; (*string) = (char*)objc_malloc (length + 1); if (key) ! objc_hash_add (&stream->stream_table, LONG2PTR(key), *string); len = (*stream->read) (stream->physical, *string, length); (*string)[length] = '\0'; } *************** objc_read_string (struct objc_typed_stre *** 765,771 **** { char *tmp; len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), &key); ! tmp = hash_value_for_key (stream->stream_table, LONG2PTR (key)); *string = objc_malloc (strlen (tmp) + 1); strcpy (*string, tmp); } --- 769,775 ---- { char *tmp; len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), &key); ! tmp = objc_hash_value_for_key (stream->stream_table, LONG2PTR (key)); *string = objc_malloc (strlen (tmp) + 1); strcpy (*string, tmp); } *************** objc_read_string (struct objc_typed_stre *** 778,784 **** if (len) { (*string) = (char*)objc_malloc (nbytes + 1); if (key) ! hash_add (&stream->stream_table, LONG2PTR(key), *string); len = (*stream->read) (stream->physical, *string, nbytes); (*string)[nbytes] = '\0'; } --- 782,788 ---- if (len) { (*string) = (char*)objc_malloc (nbytes + 1); if (key) ! objc_hash_add (&stream->stream_table, LONG2PTR(key), *string); len = (*stream->read) (stream->physical, *string, nbytes); (*string)[nbytes] = '\0'; } *************** objc_read_object (struct objc_typed_stre *** 800,806 **** { unsigned char buf[sizeof (unsigned int)]; int len; ! if ((len = (*stream->read) (stream->physical, buf, 1))) { SEL read_sel = sel_get_any_uid ("read:"); unsigned long key = 0; --- 804,810 ---- { unsigned char buf[sizeof (unsigned int)]; int len; ! if ((len = (*stream->read) (stream->physical, (char*)buf, 1))) { SEL read_sel = sel_get_any_uid ("read:"); unsigned long key = 0; *************** objc_read_object (struct objc_typed_stre *** 808,814 **** if ((buf[0]&_B_CODE) == _B_RCOMM) /* register common */ { len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), &key); ! len = (*stream->read) (stream->physical, buf, 1); } if (buf[0] == (_B_EXT | _BX_OBJECT)) --- 812,818 ---- if ((buf[0]&_B_CODE) == _B_RCOMM) /* register common */ { len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), &key); ! len = (*stream->read) (stream->physical, (char*)buf, 1); } if (buf[0] == (_B_EXT | _BX_OBJECT)) *************** objc_read_object (struct objc_typed_stre *** 823,836 **** /* register? */ if (key) ! hash_add (&stream->object_table, LONG2PTR(key), *object); /* send -read: */ if (__objc_responds_to (*object, read_sel)) (*get_imp (class, read_sel)) (*object, read_sel, stream); /* check null-byte */ ! len = (*stream->read) (stream->physical, buf, 1); if (buf[0] != '\0') objc_error (nil, OBJC_ERR_BAD_DATA, "expected null-byte, got opcode %c", buf[0]); --- 827,840 ---- /* register? */ if (key) ! objc_hash_add (&stream->object_table, LONG2PTR(key), *object); /* send -read: */ if (__objc_responds_to (*object, read_sel)) (*get_imp (class, read_sel)) (*object, read_sel, stream); /* check null-byte */ ! len = (*stream->read) (stream->physical, (char*)buf, 1); if (buf[0] != '\0') objc_error (nil, OBJC_ERR_BAD_DATA, "expected null-byte, got opcode %c", buf[0]); *************** objc_read_object (struct objc_typed_stre *** 841,857 **** if (key) objc_error (nil, OBJC_ERR_BAD_KEY, "cannot register use upcode..."); len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), &key); ! (*object) = hash_value_for_key (stream->object_table, LONG2PTR(key)); } else if (buf[0] == (_B_EXT | _BX_OBJREF)) /* a forward reference */ { struct objc_list *other; len = objc_read_unsigned_long (stream, &key); ! other = (struct objc_list *) hash_value_for_key (stream->object_refs, LONG2PTR(key)); ! hash_add (&stream->object_refs, LONG2PTR(key), ! (void *)list_cons (object, other)); } else if (buf[0] == (_B_EXT | _BX_OBJROOT)) /* a root object */ --- 845,863 ---- if (key) objc_error (nil, OBJC_ERR_BAD_KEY, "cannot register use upcode..."); len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), &key); ! (*object) = objc_hash_value_for_key (stream->object_table, ! LONG2PTR(key)); } else if (buf[0] == (_B_EXT | _BX_OBJREF)) /* a forward reference */ { struct objc_list *other; len = objc_read_unsigned_long (stream, &key); ! other ! = (struct objc_list *) objc_hash_value_for_key (stream->object_refs, LONG2PTR(key)); ! objc_hash_add (&stream->object_refs, LONG2PTR(key), ! (void *)list_cons (object, other)); } else if (buf[0] == (_B_EXT | _BX_OBJROOT)) /* a root object */ *************** objc_read_class (struct objc_typed_strea *** 875,893 **** { unsigned char buf[sizeof (unsigned int)]; int len; ! if ((len = (*stream->read) (stream->physical, buf, 1))) { unsigned long key = 0; if ((buf[0]&_B_CODE) == _B_RCOMM) /* register following */ { len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), &key); ! len = (*stream->read) (stream->physical, buf, 1); } if (buf[0] == (_B_EXT | _BX_CLASS)) { ! char *class_name; unsigned long version; /* get class */ --- 881,900 ---- { unsigned char buf[sizeof (unsigned int)]; int len; ! if ((len = (*stream->read) (stream->physical, (char*)buf, 1))) { unsigned long key = 0; if ((buf[0]&_B_CODE) == _B_RCOMM) /* register following */ { len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), &key); ! len = (*stream->read) (stream->physical, (char*)buf, 1); } if (buf[0] == (_B_EXT | _BX_CLASS)) { ! char temp[1] = ""; ! char *class_name = temp; unsigned long version; /* get class */ *************** objc_read_class (struct objc_typed_strea *** 897,906 **** /* register */ if (key) ! hash_add (&stream->stream_table, LONG2PTR(key), *class); objc_read_unsigned_long (stream, &version); ! hash_add (&stream->class_table, (*class)->name, (void *)version); } else if ((buf[0]&_B_CODE) == _B_UCOMM) --- 904,914 ---- /* register */ if (key) ! objc_hash_add (&stream->stream_table, LONG2PTR(key), *class); objc_read_unsigned_long (stream, &version); ! objc_hash_add (&stream->class_table, ! (*class)->name, (void *)version); } else if ((buf[0]&_B_CODE) == _B_UCOMM) *************** objc_read_class (struct objc_typed_strea *** 908,914 **** if (key) objc_error (nil, OBJC_ERR_BAD_KEY, "cannot register use upcode..."); len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), &key); ! *class = hash_value_for_key (stream->stream_table, LONG2PTR(key)); if (! *class) objc_error (nil, OBJC_ERR_BAD_CLASS, "cannot find class for key %lu", key); --- 916,923 ---- if (key) objc_error (nil, OBJC_ERR_BAD_KEY, "cannot register use upcode..."); len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), &key); ! *class = objc_hash_value_for_key (stream->stream_table, ! LONG2PTR(key)); if (! *class) objc_error (nil, OBJC_ERR_BAD_CLASS, "cannot find class for key %lu", key); *************** objc_read_selector (struct objc_typed_st *** 926,944 **** { unsigned char buf[sizeof (unsigned int)]; int len; ! if ((len = (*stream->read) (stream->physical, buf, 1))) { unsigned long key = 0; if ((buf[0]&_B_CODE) == _B_RCOMM) /* register following */ { len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), &key); ! len = (*stream->read) (stream->physical, buf, 1); } if (buf[0] == (_B_EXT|_BX_SEL)) /* selector! */ { ! char *selector_name; /* get selector */ len = objc_read_string (stream, &selector_name); --- 935,954 ---- { unsigned char buf[sizeof (unsigned int)]; int len; ! if ((len = (*stream->read) (stream->physical, (char*)buf, 1))) { unsigned long key = 0; if ((buf[0]&_B_CODE) == _B_RCOMM) /* register following */ { len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), &key); ! len = (*stream->read) (stream->physical, (char*)buf, 1); } if (buf[0] == (_B_EXT|_BX_SEL)) /* selector! */ { ! char temp[1] = ""; ! char *selector_name = temp; /* get selector */ len = objc_read_string (stream, &selector_name); *************** objc_read_selector (struct objc_typed_st *** 954,960 **** /* register */ if (key) ! hash_add (&stream->stream_table, LONG2PTR(key), (void *) *selector); } else if ((buf[0]&_B_CODE) == _B_UCOMM) --- 964,971 ---- /* register */ if (key) ! objc_hash_add (&stream->stream_table, ! LONG2PTR(key), (void *) *selector); } else if ((buf[0]&_B_CODE) == _B_UCOMM) *************** objc_read_selector (struct objc_typed_st *** 962,969 **** if (key) objc_error (nil, OBJC_ERR_BAD_KEY, "cannot register use upcode..."); len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), &key); ! (*selector) = hash_value_for_key (stream->stream_table, ! LONG2PTR(key)); } else --- 973,980 ---- if (key) objc_error (nil, OBJC_ERR_BAD_KEY, "cannot register use upcode..."); len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), &key); ! (*selector) = objc_hash_value_for_key (stream->stream_table, ! LONG2PTR(key)); } else *************** objc_write_type (TypedStream *stream, co *** 1032,1042 **** case _C_CHARPTR: return objc_write_string (stream, ! *(char **) data, strlen (*(char **) data)); break; case _C_ATOM: ! return objc_write_string_atomic (stream, *(char **) data, strlen (*(char **) data)); break; --- 1043,1053 ---- case _C_CHARPTR: return objc_write_string (stream, ! *(unsigned char **) data, strlen (*(char **) data)); break; case _C_ATOM: ! return objc_write_string_atomic (stream, *(unsigned char **) data, strlen (*(char **) data)); break; *************** objc_write_types (TypedStream *stream, c *** 1241,1255 **** case _C_CHARPTR: { ! char **str = va_arg (args, char **); ! res = objc_write_string (stream, *str, strlen (*str)); } break; case _C_ATOM: { ! char **str = va_arg (args, char **); ! res = objc_write_string_atomic (stream, *str, strlen (*str)); } break; --- 1252,1266 ---- case _C_CHARPTR: { ! unsigned char **str = va_arg (args, unsigned char **); ! res = objc_write_string (stream, *str, strlen ((char*)*str)); } break; case _C_ATOM: { ! unsigned char **str = va_arg (args, unsigned char **); ! res = objc_write_string_atomic (stream, *str, strlen ((char*)*str)); } break; *************** __objc_write_typed_stream_signature (Typ *** 1473,1526 **** static void __objc_finish_write_root_object(struct objc_typed_stream *stream) { ! hash_delete (stream->object_table); ! stream->object_table = hash_new(64, ! (hash_func_type)hash_ptr, ! (compare_func_type)compare_ptrs); } static void __objc_finish_read_root_object(struct objc_typed_stream *stream) { node_ptr node; SEL awake_sel = sel_get_any_uid ("awake"); ! cache_ptr free_list = hash_new (64, ! (hash_func_type) hash_ptr, ! (compare_func_type) compare_ptrs); /* resolve object forward references */ ! for (node = hash_next (stream->object_refs, NULL); node; ! node = hash_next (stream->object_refs, node)) { struct objc_list *reflist = node->value; const void *key = node->key; ! id object = hash_value_for_key (stream->object_table, key); while (reflist) { *((id*) reflist->head) = object; ! if (hash_value_for_key (free_list,reflist) == NULL) ! hash_add (&free_list,reflist,reflist); reflist = reflist->tail; } } /* apply __objc_free to all objects stored in free_list */ ! for (node = hash_next (free_list, NULL); node; ! node = hash_next (free_list, node)) objc_free ((void *) node->key); ! hash_delete (free_list); /* empty object reference table */ ! hash_delete (stream->object_refs); ! stream->object_refs = hash_new(8, (hash_func_type)hash_ptr, ! (compare_func_type)compare_ptrs); /* call -awake for all objects read */ if (awake_sel) { ! for (node = hash_next (stream->object_table, NULL); node; ! node = hash_next (stream->object_table, node)) { id object = node->value; if (__objc_responds_to (object, awake_sel)) --- 1484,1537 ---- static void __objc_finish_write_root_object(struct objc_typed_stream *stream) { ! objc_hash_delete (stream->object_table); ! stream->object_table = objc_hash_new (64, ! (hash_func_type) objc_hash_ptr, ! (compare_func_type) objc_compare_ptrs); } static void __objc_finish_read_root_object(struct objc_typed_stream *stream) { node_ptr node; SEL awake_sel = sel_get_any_uid ("awake"); ! cache_ptr free_list = objc_hash_new (64, ! (hash_func_type) objc_hash_ptr, ! (compare_func_type) objc_compare_ptrs); /* resolve object forward references */ ! for (node = objc_hash_next (stream->object_refs, NULL); node; ! node = objc_hash_next (stream->object_refs, node)) { struct objc_list *reflist = node->value; const void *key = node->key; ! id object = objc_hash_value_for_key (stream->object_table, key); while (reflist) { *((id*) reflist->head) = object; ! if (objc_hash_value_for_key (free_list,reflist) == NULL) ! objc_hash_add (&free_list,reflist,reflist); reflist = reflist->tail; } } /* apply __objc_free to all objects stored in free_list */ ! for (node = objc_hash_next (free_list, NULL); node; ! node = objc_hash_next (free_list, node)) objc_free ((void *) node->key); ! objc_hash_delete (free_list); /* empty object reference table */ ! objc_hash_delete (stream->object_refs); ! stream->object_refs = objc_hash_new (8, (hash_func_type) objc_hash_ptr, ! (compare_func_type) objc_compare_ptrs); /* call -awake for all objects read */ if (awake_sel) { ! for (node = objc_hash_next (stream->object_table, NULL); node; ! node = objc_hash_next (stream->object_table, node)) { id object = node->value; if (__objc_responds_to (object, awake_sel)) *************** static void __objc_finish_read_root_obje *** 1529,1538 **** } /* empty object table */ ! hash_delete (stream->object_table); ! stream->object_table = hash_new(64, ! (hash_func_type)hash_ptr, ! (compare_func_type)compare_ptrs); } /* --- 1540,1549 ---- } /* empty object table */ ! objc_hash_delete (stream->object_table); ! stream->object_table = objc_hash_new(64, ! (hash_func_type)objc_hash_ptr, ! (compare_func_type)objc_compare_ptrs); } /* *************** objc_open_typed_stream (FILE *physical, *** 1546,1566 **** s->mode = mode; s->physical = physical; ! s->stream_table = hash_new (64, ! (hash_func_type) hash_ptr, ! (compare_func_type) compare_ptrs); ! s->object_table = hash_new (64, ! (hash_func_type) hash_ptr, ! (compare_func_type) compare_ptrs); s->eof = (objc_typed_eof_func) __objc_feof; s->flush = (objc_typed_flush_func) fflush; s->writing_root_p = 0; if (mode == OBJC_READONLY) { ! s->class_table = hash_new (8, (hash_func_type) hash_string, ! (compare_func_type) compare_strings); ! s->object_refs = hash_new (8, (hash_func_type) hash_ptr, ! (compare_func_type) compare_ptrs); s->read = (objc_typed_read_func) __objc_fread; s->write = (objc_typed_write_func) __objc_no_write; __objc_read_typed_stream_signature (s); --- 1557,1578 ---- s->mode = mode; s->physical = physical; ! s->stream_table = objc_hash_new (64, ! (hash_func_type) objc_hash_ptr, ! (compare_func_type) objc_compare_ptrs); ! s->object_table = objc_hash_new (64, ! (hash_func_type) objc_hash_ptr, ! (compare_func_type) objc_compare_ptrs); s->eof = (objc_typed_eof_func) __objc_feof; s->flush = (objc_typed_flush_func) fflush; s->writing_root_p = 0; if (mode == OBJC_READONLY) { ! s->class_table ! = objc_hash_new (8, (hash_func_type) objc_hash_string, ! (compare_func_type) objc_compare_strings); ! s->object_refs = objc_hash_new (8, (hash_func_type) objc_hash_ptr, ! (compare_func_type) objc_compare_ptrs); s->read = (objc_typed_read_func) __objc_fread; s->write = (objc_typed_write_func) __objc_no_write; __objc_read_typed_stream_signature (s); *************** objc_close_typed_stream (TypedStream *st *** 1619,1630 **** if (stream->mode == OBJC_READONLY) { __objc_finish_read_root_object (stream); /* Just in case... */ ! hash_delete (stream->class_table); ! hash_delete (stream->object_refs); } ! hash_delete (stream->stream_table); ! hash_delete (stream->object_table); if (stream->type == (OBJC_MANAGED_STREAM | OBJC_FILE_STREAM)) fclose ((FILE *)stream->physical); --- 1631,1642 ---- if (stream->mode == OBJC_READONLY) { __objc_finish_read_root_object (stream); /* Just in case... */ ! objc_hash_delete (stream->class_table); ! objc_hash_delete (stream->object_refs); } ! objc_hash_delete (stream->stream_table); ! objc_hash_delete (stream->object_table); if (stream->type == (OBJC_MANAGED_STREAM | OBJC_FILE_STREAM)) fclose ((FILE *)stream->physical); *************** long *** 1648,1654 **** objc_get_stream_class_version (TypedStream *stream, Class class) { if (stream->class_table) ! return PTR2LONG(hash_value_for_key (stream->class_table, class->name)); else return class_get_version (class); } --- 1660,1667 ---- objc_get_stream_class_version (TypedStream *stream, Class class) { if (stream->class_table) ! return PTR2LONG(objc_hash_value_for_key (stream->class_table, ! class->name)); else return class_get_version (class); } diff -Nrcpad gcc-3.4.3/libobjc/config.h.in gcc-4.0.0/libobjc/config.h.in *** gcc-3.4.3/libobjc/config.h.in Tue Aug 15 07:38:54 2000 --- gcc-4.0.0/libobjc/config.h.in Wed Nov 24 21:50:47 2004 *************** *** 1,2 **** ! /* Define this if you have the header file */ #undef HAVE_SCHED_H --- 1,55 ---- ! /* config.h.in. Generated from configure.ac by autoheader. */ ! ! /* Define to 1 if you have the header file. */ ! #undef HAVE_INTTYPES_H ! ! /* Define to 1 if you have the header file. */ ! #undef HAVE_MEMORY_H ! ! /* Define to 1 if you have the header file. */ #undef HAVE_SCHED_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_STDINT_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_STDLIB_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_STRINGS_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_STRING_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_SYS_STAT_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_SYS_TYPES_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_UNISTD_H + + /* Define to 1 if your C compiler doesn't accept -c and -o together. */ + #undef NO_MINUS_C_MINUS_O + + /* Define to the address where bug reports for this package should be sent. */ + #undef PACKAGE_BUGREPORT + + /* Define to the full name of this package. */ + #undef PACKAGE_NAME + + /* Define to the full name and version of this package. */ + #undef PACKAGE_STRING + + /* Define to the one symbol short name of this package. */ + #undef PACKAGE_TARNAME + + /* Define to the version of this package. */ + #undef PACKAGE_VERSION + + /* Define if the compiler is configured for setjmp/longjmp exceptions. */ + #undef SJLJ_EXCEPTIONS + + /* Define to 1 if you have the ANSI C header files. */ + #undef STDC_HEADERS diff -Nrcpad gcc-3.4.3/libobjc/configure gcc-4.0.0/libobjc/configure *** gcc-3.4.3/libobjc/configure Tue May 18 09:08:42 2004 --- gcc-4.0.0/libobjc/configure Thu Apr 21 07:04:10 2005 *************** *** 1,50 **** #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.13 ! # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ! # Defaults: ! ac_help= ac_default_prefix=/usr/local ! # Any additions from configure.in: ! ac_help="$ac_help ! --enable-multilib build hella library versions (default)" ! ac_help="$ac_help ! --with-target-subdir=SUBDIR ! configuring in a subdirectory" ! ac_help="$ac_help ! --with-cross-host=HOST configuring with a cross compiler" ! ac_help="$ac_help ! --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory " ! ac_help="$ac_help ! --enable-shared[=PKGS] build shared libraries [default=no]" ! ac_help="$ac_help ! --enable-static[=PKGS] build static libraries [default=yes]" ! ac_help="$ac_help ! --enable-fast-install[=PKGS] optimize for fast installation [default=yes]" ! ac_help="$ac_help ! --with-gnu-ld assume the C compiler uses GNU ld [default=no]" ! ac_help="$ac_help ! --disable-libtool-lock avoid locking (might break parallel builds)" ! ac_help="$ac_help ! --with-pic try to use only PIC/non-PIC objects [default=use both]" ! ac_help="$ac_help ! --enable-objc-gc enable the use of Boehm's garbage collector with ! the GNU Objective-C runtime." # Initialize some variables set by options. # The variables have the same names as the options, with # dashes changed to underlines. ! build=NONE ! cache_file=./config.cache exec_prefix=NONE - host=NONE no_create= - nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE --- 1,325 ---- #! /bin/sh # Guess values for system-dependent variables and create Makefiles. ! # Generated by GNU Autoconf 2.59 for package-unused version-unused. # + # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. + ## --------------------- ## + ## M4sh Initialization. ## + ## --------------------- ## ! # Be Bourne compatible ! if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then ! emulate sh ! NULLCMD=: ! # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which ! # is contrary to our usage. Disable this feature. ! alias -g '${1+"$@"}'='"$@"' ! elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then ! set -o posix ! fi ! DUALCASE=1; export DUALCASE # for MKS sh ! ! # Support unset when possible. ! if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then ! as_unset=unset ! else ! as_unset=false ! fi ! ! ! # Work around bugs in pre-3.0 UWIN ksh. ! $as_unset ENV MAIL MAILPATH ! PS1='$ ' ! PS2='> ' ! PS4='+ ' ! ! # NLS nuisances. ! for as_var in \ ! LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ ! LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ ! LC_TELEPHONE LC_TIME ! do ! if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then ! eval $as_var=C; export $as_var ! else ! $as_unset $as_var ! fi ! done ! ! # Required to use basename. ! if expr a : '\(a\)' >/dev/null 2>&1; then ! as_expr=expr ! else ! as_expr=false ! fi ! ! if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then ! as_basename=basename ! else ! as_basename=false ! fi ! ! ! # Name of the executable. ! as_me=`$as_basename "$0" || ! $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ ! X"$0" : 'X\(//\)$' \| \ ! X"$0" : 'X\(/\)$' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X/"$0" | ! sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } ! /^X\/\(\/\/\)$/{ s//\1/; q; } ! /^X\/\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` ! ! ! # PATH needs CR, and LINENO needs CR and PATH. ! # Avoid depending upon Character Ranges. ! as_cr_letters='abcdefghijklmnopqrstuvwxyz' ! as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' ! as_cr_Letters=$as_cr_letters$as_cr_LETTERS ! as_cr_digits='0123456789' ! as_cr_alnum=$as_cr_Letters$as_cr_digits ! ! # The user is always right. ! if test "${PATH_SEPARATOR+set}" != set; then ! echo "#! /bin/sh" >conf$$.sh ! echo "exit 0" >>conf$$.sh ! chmod +x conf$$.sh ! if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then ! PATH_SEPARATOR=';' ! else ! PATH_SEPARATOR=: ! fi ! rm -f conf$$.sh ! fi ! ! ! as_lineno_1=$LINENO ! as_lineno_2=$LINENO ! as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` ! test "x$as_lineno_1" != "x$as_lineno_2" && ! test "x$as_lineno_3" = "x$as_lineno_2" || { ! # Find who we are. Look in the path if we contain no path at all ! # relative or not. ! case $0 in ! *[\\/]* ) as_myself=$0 ;; ! *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break ! done ! ! ;; ! esac ! # We did not find ourselves, most probably we were run as `sh COMMAND' ! # in which case we are not to be found in the path. ! if test "x$as_myself" = x; then ! as_myself=$0 ! fi ! if test ! -f "$as_myself"; then ! { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 ! { (exit 1); exit 1; }; } ! fi ! case $CONFIG_SHELL in ! '') ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for as_base in sh bash ksh sh5; do ! case $as_dir in ! /*) ! if ("$as_dir/$as_base" -c ' ! as_lineno_1=$LINENO ! as_lineno_2=$LINENO ! as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` ! test "x$as_lineno_1" != "x$as_lineno_2" && ! test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then ! $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } ! $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } ! CONFIG_SHELL=$as_dir/$as_base ! export CONFIG_SHELL ! exec "$CONFIG_SHELL" "$0" ${1+"$@"} ! fi;; ! esac ! done ! done ! ;; ! esac ! ! # Create $as_me.lineno as a copy of $as_myself, but with $LINENO ! # uniformly replaced by the line number. The first 'sed' inserts a ! # line-number line before each line; the second 'sed' does the real ! # work. The second script uses 'N' to pair each line-number line ! # with the numbered line, and appends trailing '-' during ! # substitution so that $LINENO is not a special case at line end. ! # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the ! # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) ! sed '=' <$as_myself | ! sed ' ! N ! s,$,-, ! : loop ! s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, ! t loop ! s,-$,, ! s,^['$as_cr_digits']*\n,, ! ' >$as_me.lineno && ! chmod +x $as_me.lineno || ! { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 ! { (exit 1); exit 1; }; } ! ! # Don't try to exec as it changes $[0], causing all sort of problems ! # (the dirname of $[0] is not the place where we might find the ! # original and so on. Autoconf is especially sensible to this). ! . ./$as_me.lineno ! # Exit status is that of the last command. ! exit ! } ! ! ! case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in ! *c*,-n*) ECHO_N= ECHO_C=' ! ' ECHO_T=' ' ;; ! *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; ! *) ECHO_N= ECHO_C='\c' ECHO_T= ;; ! esac ! ! if expr a : '\(a\)' >/dev/null 2>&1; then ! as_expr=expr ! else ! as_expr=false ! fi ! ! rm -f conf$$ conf$$.exe conf$$.file ! echo >conf$$.file ! if ln -s conf$$.file conf$$ 2>/dev/null; then ! # We could just check for DJGPP; but this test a) works b) is more generic ! # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). ! if test -f conf$$.exe; then ! # Don't use ln at all; we don't have any links ! as_ln_s='cp -p' ! else ! as_ln_s='ln -s' ! fi ! elif ln conf$$.file conf$$ 2>/dev/null; then ! as_ln_s=ln ! else ! as_ln_s='cp -p' ! fi ! rm -f conf$$ conf$$.exe conf$$.file ! ! if mkdir -p . 2>/dev/null; then ! as_mkdir_p=: ! else ! test -d ./-p && rmdir ./-p ! as_mkdir_p=false ! fi ! ! as_executable_p="test -f" ! ! # Sed expression to map a string onto a valid CPP name. ! as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" ! ! # Sed expression to map a string onto a valid variable name. ! as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" ! ! ! # IFS ! # We need space, tab and new line, in precisely that order. ! as_nl=' ! ' ! IFS=" $as_nl" ! ! # CDPATH. ! $as_unset CDPATH ! ! ! # Name of the host. ! # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, ! # so uname gets run too. ! ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` ! ! exec 6>&1 ! ! # ! # Initializations. ! # ac_default_prefix=/usr/local ! ac_config_libobj_dir=. ! cross_compiling=no ! subdirs= ! MFLAGS= ! MAKEFLAGS= ! SHELL=${CONFIG_SHELL-/bin/sh} ! ! # Maximum number of lines to put in a shell here document. ! # This variable seems obsolete. It should probably be removed, and ! # only ac_max_sed_lines should be used. ! : ${ac_max_here_lines=38} ! ! # Identity of this package. ! PACKAGE_NAME='package-unused' ! PACKAGE_TARNAME='libobjc' ! PACKAGE_VERSION='version-unused' ! PACKAGE_STRING='package-unused version-unused' ! PACKAGE_BUGREPORT='' ! ! ac_unique_file="objc/objc.h" ! # Factoring default headers for most tests. ! ac_includes_default="\ ! #include ! #if HAVE_SYS_TYPES_H ! # include ! #endif ! #if HAVE_SYS_STAT_H ! # include ! #endif ! #if STDC_HEADERS ! # include ! # include ! #else ! # if HAVE_STDLIB_H ! # include ! # endif ! #endif ! #if HAVE_STRING_H ! # if !STDC_HEADERS && HAVE_MEMORY_H ! # include ! # endif ! # include ! #endif ! #if HAVE_STRINGS_H ! # include ! #endif ! #if HAVE_INTTYPES_H ! # include ! #else ! # if HAVE_STDINT_H ! # include ! # endif ! #endif ! #if HAVE_UNISTD_H ! # include ! #endif" ! ! ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS VERSION OBJC_BOEHM_GC toplevel_srcdir build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical glibcpp_srcdir gcc_version_trigger gcc_version_full gcc_version toolexecdir toolexeclibdir includedirname libext CC ac_ct_CC EXEEXT OBJEXT CFLAGS AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LN_S STRIP ac_ct_STRIP LIBTOOL SET_MAKE CPP CPPFLAGS EGREP GTHREAD_FLAGS LIBOBJS LTLIBOBJS' ! ac_subst_files='' # Initialize some variables set by options. + ac_init_help= + ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. ! cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE *************** program_transform_name=s,x,x, *** 53,62 **** silent= site= srcdir= - target=NONE verbose= x_includes=NONE x_libraries=NONE bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' --- 328,342 ---- silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE + + # Installation directory options. + # These are left unexpanded so users can "make install exec_prefix=/foo" + # and all the variables that are supposed to be based on exec_prefix + # by default will actually change. + # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' *************** oldincludedir='/usr/include' *** 70,86 **** infodir='${prefix}/info' mandir='${prefix}/man' - # Initialize some other variables. - subdirs= - MFLAGS= MAKEFLAGS= - SHELL=${CONFIG_SHELL-/bin/sh} - # Maximum number of lines to put in a shell here document. - ac_max_here_lines=12 - ac_prev= for ac_option do - # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" --- 350,358 ---- *************** do *** 88,146 **** continue fi ! case "$ac_option" in ! -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; ! *) ac_optarg= ;; ! esac # Accept the important Cygnus configure options, so we can diagnose typos. ! case "$ac_option" in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) ! bindir="$ac_optarg" ;; -build | --build | --buil | --bui | --bu) ! ac_prev=build ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) ! build="$ac_optarg" ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) ! cache_file="$ac_optarg" ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) ! datadir="$ac_optarg" ;; -disable-* | --disable-*) ! ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` # Reject names that are not valid shell variable names. ! if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then ! { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } ! fi ! ac_feature=`echo $ac_feature| sed 's/-/_/g'` ! eval "enable_${ac_feature}=no" ;; -enable-* | --enable-*) ! ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. ! if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then ! { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } ! fi ! ac_feature=`echo $ac_feature| sed 's/-/_/g'` ! case "$ac_option" in ! *=*) ;; *) ac_optarg=yes ;; esac ! eval "enable_${ac_feature}='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ --- 360,418 ---- continue fi ! ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. ! case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) ! bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ! ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) ! build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) ! cache_file=$ac_optarg ;; ! ! --config-cache | -C) ! cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) ! datadir=$ac_optarg ;; -disable-* | --disable-*) ! ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. ! expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && ! { echo "$as_me: error: invalid feature name: $ac_feature" >&2 ! { (exit 1); exit 1; }; } ! ac_feature=`echo $ac_feature | sed 's/-/_/g'` ! eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ! ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. ! expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && ! { echo "$as_me: error: invalid feature name: $ac_feature" >&2 ! { (exit 1); exit 1; }; } ! ac_feature=`echo $ac_feature | sed 's/-/_/g'` ! case $ac_option in ! *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac ! eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ *************** do *** 149,243 **** -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) ! exec_prefix="$ac_optarg" ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; ! -help | --help | --hel | --he) ! # Omit some internal or obsolete options to make the list less imposing. ! # This message is too long to be a string in the A/UX 3.1 sh. ! cat << EOF ! Usage: configure [options] [host] ! Options: [defaults in brackets after descriptions] ! Configuration: ! --cache-file=FILE cache test results in FILE ! --help print this message ! --no-create do not create output files ! --quiet, --silent do not print \`checking...' messages ! --version print the version of autoconf that created configure ! Directory and file names: ! --prefix=PREFIX install architecture-independent files in PREFIX ! [$ac_default_prefix] ! --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX ! [same as prefix] ! --bindir=DIR user executables in DIR [EPREFIX/bin] ! --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] ! --libexecdir=DIR program executables in DIR [EPREFIX/libexec] ! --datadir=DIR read-only architecture-independent data in DIR ! [PREFIX/share] ! --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] ! --sharedstatedir=DIR modifiable architecture-independent data in DIR ! [PREFIX/com] ! --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] ! --libdir=DIR object code libraries in DIR [EPREFIX/lib] ! --includedir=DIR C header files in DIR [PREFIX/include] ! --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] ! --infodir=DIR info documentation in DIR [PREFIX/info] ! --mandir=DIR man documentation in DIR [PREFIX/man] ! --srcdir=DIR find the sources in DIR [configure dir or ..] ! --program-prefix=PREFIX prepend PREFIX to installed program names ! --program-suffix=SUFFIX append SUFFIX to installed program names ! --program-transform-name=PROGRAM ! run sed PROGRAM on installed program names ! EOF ! cat << EOF ! Host type: ! --build=BUILD configure for building on BUILD [BUILD=HOST] ! --host=HOST configure for HOST [guessed] ! --target=TARGET configure for TARGET [TARGET=HOST] ! Features and packages: ! --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) ! --enable-FEATURE[=ARG] include FEATURE [ARG=yes] ! --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] ! --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) ! --x-includes=DIR X include files are in DIR ! --x-libraries=DIR X library files are in DIR ! EOF ! if test -n "$ac_help"; then ! echo "--enable and --with options recognized:$ac_help" ! fi ! exit 0 ;; -host | --host | --hos | --ho) ! ac_prev=host ;; -host=* | --host=* | --hos=* | --ho=*) ! host="$ac_optarg" ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) ! includedir="$ac_optarg" ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) ! infodir="$ac_optarg" ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) ! libdir="$ac_optarg" ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) ! libexecdir="$ac_optarg" ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ --- 421,467 ---- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) ! exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; ! -help | --help | --hel | --he | -h) ! ac_init_help=long ;; ! -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ! ac_init_help=recursive ;; ! -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ! ac_init_help=short ;; -host | --host | --hos | --ho) ! ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) ! host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) ! includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) ! infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) ! libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) ! libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ *************** EOF *** 246,264 **** -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) ! localstatedir="$ac_optarg" ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) ! mandir="$ac_optarg" ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ ! | --no-cr | --no-c) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ --- 470,488 ---- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) ! localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) ! mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ ! | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ *************** EOF *** 272,297 **** -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) ! oldincludedir="$ac_optarg" ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) ! prefix="$ac_optarg" ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) ! program_prefix="$ac_optarg" ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) ! program_suffix="$ac_optarg" ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ --- 496,521 ---- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) ! oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) ! prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) ! program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) ! program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ *************** EOF *** 308,314 **** | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) ! program_transform_name="$ac_optarg" ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) --- 532,538 ---- | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) ! program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) *************** EOF *** 318,324 **** ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) ! sbindir="$ac_optarg" ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ --- 542,548 ---- ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) ! sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ *************** EOF *** 329,386 **** | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) ! sharedstatedir="$ac_optarg" ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) ! site="$ac_optarg" ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ! srcdir="$ac_optarg" ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) ! sysconfdir="$ac_optarg" ;; -target | --target | --targe | --targ | --tar | --ta | --t) ! ac_prev=target ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) ! target="$ac_optarg" ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; ! -version | --version | --versio | --versi | --vers) ! echo "configure generated by autoconf version 2.13" ! exit 0 ;; -with-* | --with-*) ! ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. ! if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then ! { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } ! fi ac_package=`echo $ac_package| sed 's/-/_/g'` ! case "$ac_option" in ! *=*) ;; *) ac_optarg=yes ;; esac ! eval "with_${ac_package}='$ac_optarg'" ;; -without-* | --without-*) ! ac_package=`echo $ac_option|sed -e 's/-*without-//'` # Reject names that are not valid shell variable names. ! if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then ! { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } ! fi ! ac_package=`echo $ac_package| sed 's/-/_/g'` ! eval "with_${ac_package}=no" ;; --x) # Obsolete; use --with-x. --- 553,609 ---- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) ! sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) ! site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ! srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) ! sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ! ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) ! target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; ! -version | --version | --versio | --versi | --vers | -V) ! ac_init_version=: ;; -with-* | --with-*) ! ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. ! expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && ! { echo "$as_me: error: invalid package name: $ac_package" >&2 ! { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` ! case $ac_option in ! *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac ! eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ! ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. ! expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && ! { echo "$as_me: error: invalid package name: $ac_package" >&2 ! { (exit 1); exit 1; }; } ! ac_package=`echo $ac_package | sed 's/-/_/g'` ! eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. *************** EOF *** 391,489 **** ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) ! x_includes="$ac_optarg" ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) ! x_libraries="$ac_optarg" ;; ! -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } ;; *) ! if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then ! echo "configure: warning: $ac_option: invalid host type" 1>&2 ! fi ! if test "x$nonopt" != xNONE; then ! { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ! fi ! nonopt="$ac_option" ;; esac done if test -n "$ac_prev"; then ! { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } ! fi ! ! trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 ! ! # File descriptor usage: ! # 0 standard input ! # 1 file creation ! # 2 errors and warnings ! # 3 some systems may open it to /dev/tty ! # 4 used on the Kubota Titan ! # 6 checking for... messages and results ! # 5 compiler messages saved in config.log ! if test "$silent" = yes; then ! exec 6>/dev/null ! else ! exec 6>&1 fi - exec 5>./config.log ! echo "\ ! This file contains any messages produced by compilers while ! running configure, to aid debugging if configure makes a mistake. ! " 1>&5 ! # Strip out --no-create and --no-recursion so they do not pile up. ! # Also quote any args containing shell metacharacters. ! ac_configure_args= ! for ac_arg do ! case "$ac_arg" in ! -no-create | --no-create | --no-creat | --no-crea | --no-cre \ ! | --no-cr | --no-c) ;; ! -no-recursion | --no-recursion | --no-recursio | --no-recursi \ ! | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; ! *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) ! ac_configure_args="$ac_configure_args '$ac_arg'" ;; ! *) ac_configure_args="$ac_configure_args $ac_arg" ;; esac done ! # NLS nuisances. ! # Only set these to C if already set. These must not be set unconditionally ! # because not all systems understand e.g. LANG=C (notably SCO). ! # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! ! # Non-C LC_CTYPE values break the ctype check. ! if test "${LANG+set}" = set; then LANG=C; export LANG; fi ! if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi ! if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi ! if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi ! # confdefs.h avoids OS command line length limits that DEFS can exceed. ! rm -rf conftest* confdefs.h ! # AIX cpp loses on an empty file, so make sure it contains at least a newline. ! echo > confdefs.h - # A filename unique to this package, relative to the directory that - # configure is in, which we can look for to find out if srcdir is correct. - ac_unique_file=objc/objc.h # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ! ac_prog=$0 ! ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` ! test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. --- 614,723 ---- ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) ! x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) ! x_libraries=$ac_optarg ;; ! -*) { echo "$as_me: error: unrecognized option: $ac_option ! Try \`$0 --help' for more information." >&2 ! { (exit 1); exit 1; }; } ;; + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + *) ! # FIXME: should be removed in autoconf 3.0. ! echo "$as_me: WARNING: you should use --build, --host, --target" >&2 ! expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && ! echo "$as_me: WARNING: invalid host type: $ac_option" >&2 ! : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ! ac_option=--`echo $ac_prev | sed 's/_/-/g'` ! { echo "$as_me: error: missing argument to $ac_option" >&2 ! { (exit 1); exit 1; }; } fi ! # Be sure to have absolute paths. ! for ac_var in exec_prefix prefix ! do ! eval ac_val=$`echo $ac_var` ! case $ac_val in ! [\\/$]* | ?:[\\/]* | NONE | '' ) ;; ! *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 ! { (exit 1); exit 1; }; };; ! esac ! done ! # Be sure to have absolute paths. ! for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ ! localstatedir libdir includedir oldincludedir infodir mandir do ! eval ac_val=$`echo $ac_var` ! case $ac_val in ! [\\/$]* | ?:[\\/]* ) ;; ! *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 ! { (exit 1); exit 1; }; };; esac done ! # There might be people who depend on the old broken behavior: `$host' ! # used to hold the argument of --host etc. ! # FIXME: To remove some day. ! build=$build_alias ! host=$host_alias ! target=$target_alias ! # FIXME: To remove some day. ! if test "x$host_alias" != x; then ! if test "x$build_alias" = x; then ! cross_compiling=maybe ! echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. ! If a cross compiler is detected then cross compile mode will be used." >&2 ! elif test "x$build_alias" != "x$host_alias"; then ! cross_compiling=yes ! fi ! fi ! ! ac_tool_prefix= ! test -n "$host_alias" && ac_tool_prefix=$host_alias- ! ! test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ! ac_confdir=`(dirname "$0") 2>/dev/null || ! $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ! X"$0" : 'X\(//\)[^/]' \| \ ! X"$0" : 'X\(//\)$' \| \ ! X"$0" : 'X\(/\)' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X"$0" | ! sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ! /^X\(\/\/\)[^/].*/{ s//\1/; q; } ! /^X\(\/\/\)$/{ s//\1/; q; } ! /^X\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. *************** else *** 493,505 **** fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then ! { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } else ! { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } fi fi ! srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then --- 727,1202 ---- fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then ! { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 ! { (exit 1); exit 1; }; } else ! { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 ! { (exit 1); exit 1; }; } fi fi ! (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || ! { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 ! { (exit 1); exit 1; }; } ! srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ! ac_env_build_alias_set=${build_alias+set} ! ac_env_build_alias_value=$build_alias ! ac_cv_env_build_alias_set=${build_alias+set} ! ac_cv_env_build_alias_value=$build_alias ! ac_env_host_alias_set=${host_alias+set} ! ac_env_host_alias_value=$host_alias ! ac_cv_env_host_alias_set=${host_alias+set} ! ac_cv_env_host_alias_value=$host_alias ! ac_env_target_alias_set=${target_alias+set} ! ac_env_target_alias_value=$target_alias ! ac_cv_env_target_alias_set=${target_alias+set} ! ac_cv_env_target_alias_value=$target_alias ! ac_env_CPP_set=${CPP+set} ! ac_env_CPP_value=$CPP ! ac_cv_env_CPP_set=${CPP+set} ! ac_cv_env_CPP_value=$CPP ! ac_env_CPPFLAGS_set=${CPPFLAGS+set} ! ac_env_CPPFLAGS_value=$CPPFLAGS ! ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ! ac_cv_env_CPPFLAGS_value=$CPPFLAGS ! ! # ! # Report the --help message. ! # ! if test "$ac_init_help" = "long"; then ! # Omit some internal or obsolete options to make the list less imposing. ! # This message is too long to be a string in the A/UX 3.1 sh. ! cat <<_ACEOF ! \`configure' configures package-unused version-unused to adapt to many kinds of systems. ! ! Usage: $0 [OPTION]... [VAR=VALUE]... ! ! To assign environment variables (e.g., CC, CFLAGS...), specify them as ! VAR=VALUE. See below for descriptions of some of the useful variables. ! ! Defaults for the options are specified in brackets. ! ! Configuration: ! -h, --help display this help and exit ! --help=short display options specific to this package ! --help=recursive display the short help of all the included packages ! -V, --version display version information and exit ! -q, --quiet, --silent do not print \`checking...' messages ! --cache-file=FILE cache test results in FILE [disabled] ! -C, --config-cache alias for \`--cache-file=config.cache' ! -n, --no-create do not create output files ! --srcdir=DIR find the sources in DIR [configure dir or \`..'] ! ! _ACEOF ! ! cat <<_ACEOF ! Installation directories: ! --prefix=PREFIX install architecture-independent files in PREFIX ! [$ac_default_prefix] ! --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX ! [PREFIX] ! ! By default, \`make install' will install all the files in ! \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify ! an installation prefix other than \`$ac_default_prefix' using \`--prefix', ! for instance \`--prefix=\$HOME'. ! ! For better control, use the options below. ! ! Fine tuning of the installation directories: ! --bindir=DIR user executables [EPREFIX/bin] ! --sbindir=DIR system admin executables [EPREFIX/sbin] ! --libexecdir=DIR program executables [EPREFIX/libexec] ! --datadir=DIR read-only architecture-independent data [PREFIX/share] ! --sysconfdir=DIR read-only single-machine data [PREFIX/etc] ! --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] ! --localstatedir=DIR modifiable single-machine data [PREFIX/var] ! --libdir=DIR object code libraries [EPREFIX/lib] ! --includedir=DIR C header files [PREFIX/include] ! --oldincludedir=DIR C header files for non-gcc [/usr/include] ! --infodir=DIR info documentation [PREFIX/info] ! --mandir=DIR man documentation [PREFIX/man] ! _ACEOF ! ! cat <<\_ACEOF ! ! System types: ! --build=BUILD configure for building on BUILD [guessed] ! --host=HOST cross-compile to build programs to run on HOST [BUILD] ! --target=TARGET configure for building compilers for TARGET [HOST] ! _ACEOF ! fi + if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of package-unused version-unused:";; + esac + cat <<\_ACEOF + + Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-multilib build hella library versions (default) + --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory + --enable-objc-gc enable the use of Boehm's garbage collector with + the GNU Objective-C runtime. + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + --enable-shared=PKGS build shared libraries default=yes + --enable-static=PKGS build static libraries default=yes + --enable-fast-install=PKGS optimize for fast installation default=yes + --disable-libtool-lock avoid locking (might break parallel builds) + --enable-sjlj-exceptions + force use of builtin_setjmp for exceptions + + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-target-subdir=SUBDIR + configuring in a subdirectory + --with-cross-host=HOST configuring with a cross compiler + --with-gnu-ld assume the C compiler uses GNU ld default=no + --with-pic try to use only PIC/non-PIC objects default=use both + + Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory + CPP C preprocessor + + Use these variables to override the choices made by `configure' or to help + it to find libraries and programs with nonstandard names/locations. + + _ACEOF + fi + + if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + ac_popdir=`pwd` + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d $ac_dir || continue + ac_builddir=. + + if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` + else + ac_dir_suffix= ac_top_builddir= + fi + + case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; + esac + + # Do not use `cd foo && pwd` to compute absolute paths, because + # the directories may not exist. + case `pwd` in + .) ac_abs_builddir="$ac_dir";; + *) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; + esac + case $ac_abs_builddir in + .) ac_abs_top_builddir=${ac_top_builddir}.;; + *) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; + esac + case $ac_abs_builddir in + .) ac_abs_srcdir=$ac_srcdir;; + *) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; + esac + case $ac_abs_builddir in + .) ac_abs_top_srcdir=$ac_top_srcdir;; + *) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; + esac + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi + cd $ac_popdir + done + fi + + test -n "$ac_init_help" && exit 0 + if $ac_init_version; then + cat <<\_ACEOF + package-unused configure version-unused + generated by GNU Autoconf 2.59 + + Copyright (C) 2003 Free Software Foundation, Inc. + This configure script is free software; the Free Software Foundation + gives unlimited permission to copy, distribute and modify it. + _ACEOF + exit 0 + fi + exec 5>config.log + cat >&5 <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + + It was created by package-unused $as_me version-unused, which was + generated by GNU Autoconf 2.59. Invocation command line was + + $ $0 $@ + + _ACEOF + { + cat <<_ASUNAME + ## --------- ## + ## Platform. ## + ## --------- ## + + hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` + uname -m = `(uname -m) 2>/dev/null || echo unknown` + uname -r = `(uname -r) 2>/dev/null || echo unknown` + uname -s = `(uname -s) 2>/dev/null || echo unknown` + uname -v = `(uname -v) 2>/dev/null || echo unknown` + + /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` + /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + + /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` + /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` + /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` + hostinfo = `(hostinfo) 2>/dev/null || echo unknown` + /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` + /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` + /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + + _ASUNAME + + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" + done + + } >&5 + + cat >&5 <<_ACEOF + + + ## ----------- ## + ## Core tests. ## + ## ----------- ## + + _ACEOF + + + # Keep a trace of the command line. + # Strip out --no-create and --no-recursion so they do not pile up. + # Strip out --silent because we don't want to record it for future runs. + # Also quote any args containing shell meta-characters. + # Make two passes to allow for proper duplicate-argument suppression. + ac_configure_args= + ac_configure_args0= + ac_configure_args1= + ac_sep= + ac_must_keep_next=false + for ac_pass in 1 2 + do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " + ;; + esac + done + done + $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } + $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + + # When interrupted or exit'd, cleanup temporary files, and complete + # config.log. We remove comments because anyway the quotes in there + # would cause problems or look ugly. + # WARNING: Be sure not to use single quotes in there, as some shells, + # such as our DU 5.0 friend, will then `close' the trap. + trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX + ## ---------------- ## + ## Cache variables. ## + ## ---------------- ## + _ASBOX + echo + # The following way of writing the cache mishandles newlines in values, + { + (set) 2>&1 | + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) + sed -n \ + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; + *) + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; + } + echo + + cat <<\_ASBOX + ## ----------------- ## + ## Output variables. ## + ## ----------------- ## + _ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX + ## ------------- ## + ## Output files. ## + ## ------------- ## + _ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX + ## ----------- ## + ## confdefs.h. ## + ## ----------- ## + _ASBOX + echo + sed "/^$/d" confdefs.h | sort + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status + ' 0 + for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal + done + ac_signal=0 + + # confdefs.h avoids OS command line length limits that DEFS can exceed. + rm -rf conftest* confdefs.h + # AIX cpp loses on an empty file, so make sure it contains at least a newline. + echo >confdefs.h + + # Predefined preprocessor variables. + + cat >>confdefs.h <<_ACEOF + #define PACKAGE_NAME "$PACKAGE_NAME" + _ACEOF + + + cat >>confdefs.h <<_ACEOF + #define PACKAGE_TARNAME "$PACKAGE_TARNAME" + _ACEOF + + + cat >>confdefs.h <<_ACEOF + #define PACKAGE_VERSION "$PACKAGE_VERSION" + _ACEOF + + + cat >>confdefs.h <<_ACEOF + #define PACKAGE_STRING "$PACKAGE_STRING" + _ACEOF + + + cat >>confdefs.h <<_ACEOF + #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" + _ACEOF + + + # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then *************** if test -z "$CONFIG_SITE"; then *** 510,570 **** fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then ! echo "loading site script $ac_site_file" . "$ac_site_file" fi done if test -r "$cache_file"; then ! echo "loading cache $cache_file" ! . $cache_file else ! echo "creating cache $cache_file" ! > $cache_file fi ac_ext=c - # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ! ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ! cross_compiling=$ac_cv_prog_cc_cross - ac_exeext= - ac_objext=o - if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' - ' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi - else - ac_n= ac_c='\c' ac_t= - fi # This works around the fact that libtool configuration may change LD # for this particular configuration, but some shells, instead of # keeping the changes in LD private, export them just because LD is # exported. ORIGINAL_LD_FOR_MULTILIBS=$LD ! # Check whether --enable-multilib or --disable-multilib was given. if test "${enable_multilib+set}" = set; then enableval="$enable_multilib" case "${enableval}" in yes) multilib=yes ;; no) multilib=no ;; ! *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;; esac else multilib=yes ! fi # When building with srcdir == objdir, links to the source files will # be created in directories within the target_subdir. We have to --- 1207,1399 ---- fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then ! { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 ! echo "$as_me: loading site script $ac_site_file" >&6;} ! sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then ! # Some versions of bash will fail to source /dev/null (special ! # files actually), so we avoid doing that. ! if test -f "$cache_file"; then ! { echo "$as_me:$LINENO: loading cache $cache_file" >&5 ! echo "$as_me: loading cache $cache_file" >&6;} ! case $cache_file in ! [\\/]* | ?:[\\/]* ) . $cache_file;; ! *) . ./$cache_file;; ! esac ! fi else ! { echo "$as_me:$LINENO: creating cache $cache_file" >&5 ! echo "$as_me: creating cache $cache_file" >&6;} ! >$cache_file ! fi ! ! # Check that the precious variables saved in the cache have kept the same ! # value. ! ac_cache_corrupted=false ! for ac_var in `(set) 2>&1 | ! sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do ! eval ac_old_set=\$ac_cv_env_${ac_var}_set ! eval ac_new_set=\$ac_env_${ac_var}_set ! eval ac_old_val="\$ac_cv_env_${ac_var}_value" ! eval ac_new_val="\$ac_env_${ac_var}_value" ! case $ac_old_set,$ac_new_set in ! set,) ! { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 ! echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ! ac_cache_corrupted=: ;; ! ,set) ! { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 ! echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ! ac_cache_corrupted=: ;; ! ,);; ! *) ! if test "x$ac_old_val" != "x$ac_new_val"; then ! { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 ! echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ! { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 ! echo "$as_me: former value: $ac_old_val" >&2;} ! { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 ! echo "$as_me: current value: $ac_new_val" >&2;} ! ac_cache_corrupted=: ! fi;; ! esac ! # Pass precious variables to config.status. ! if test "$ac_new_set" = set; then ! case $ac_new_val in ! *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ! ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; ! *) ac_arg=$ac_var=$ac_new_val ;; ! esac ! case " $ac_configure_args " in ! *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. ! *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; ! esac ! fi ! done ! if $ac_cache_corrupted; then ! { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 ! echo "$as_me: error: changes in the environment can compromise the build" >&2;} ! { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 ! echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} ! { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ! ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ! ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ! ac_compiler_gnu=$ac_cv_c_compiler_gnu ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! + + + + + + # We need the following definitions because AC_PROG_LIBTOOL relies on them + PACKAGE=libobjc + # Version is pulled out to make it a bit easier to change using sed. + VERSION=1:0:0 + + # This works around the fact that libtool configuration may change LD # for this particular configuration, but some shells, instead of # keeping the changes in LD private, export them just because LD is # exported. ORIGINAL_LD_FOR_MULTILIBS=$LD + # ------- + # Options + # ------- ! # Default to --enable-multilib ! # Check whether --enable-multilib or --disable-multilib was given. if test "${enable_multilib+set}" = set; then enableval="$enable_multilib" case "${enableval}" in yes) multilib=yes ;; no) multilib=no ;; ! *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for multilib option" >&5 ! echo "$as_me: error: bad value ${enableval} for multilib option" >&2;} ! { (exit 1); exit 1; }; } ;; esac else multilib=yes ! fi; ! ! # We use these options to decide which functions to include. ! ! # Check whether --with-target-subdir or --without-target-subdir was given. ! if test "${with_target_subdir+set}" = set; then ! withval="$with_target_subdir" ! ! fi; ! ! # Check whether --with-cross-host or --without-cross-host was given. ! if test "${with_cross_host+set}" = set; then ! withval="$with_cross_host" ! ! fi; ! ! echo "$as_me:$LINENO: checking for --enable-version-specific-runtime-libs" >&5 ! echo $ECHO_N "checking for --enable-version-specific-runtime-libs... $ECHO_C" >&6 ! # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given. ! if test "${enable_version_specific_runtime_libs+set}" = set; then ! enableval="$enable_version_specific_runtime_libs" ! case "$enableval" in ! yes) version_specific_libs=yes ;; ! no) version_specific_libs=no ;; ! *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable version-specific libs" >&5 ! echo "$as_me: error: Unknown argument to enable/disable version-specific libs" >&2;} ! { (exit 1); exit 1; }; };; ! esac ! else ! version_specific_libs=no ! fi; ! echo "$as_me:$LINENO: result: $version_specific_libs" >&5 ! echo "${ECHO_T}$version_specific_libs" >&6 ! ! # Check whether --enable-objc-gc or --disable-objc-gc was given. ! if test "${enable_objc_gc+set}" = set; then ! enableval="$enable_objc_gc" ! case $enable_objc_gc in ! no) OBJC_BOEHM_GC='' ;; ! *) OBJC_BOEHM_GC=libobjc_gc.la ;; ! esac ! else ! OBJC_BOEHM_GC='' ! fi; ! ! ! # ----------- ! # Directories ! # ----------- # When building with srcdir == objdir, links to the source files will # be created in directories within the target_subdir. We have to *************** for ac_dir in ${srcdir}/$toprel $srcdir/ *** 594,1289 **** ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break fi done if test -z "$ac_aux_dir"; then ! { echo "configure: error: can not find install-sh or install.sh in ${srcdir}/$toprel $srcdir/${srcdir}/$toprel" 1>&2; exit 1; } fi ! ac_config_guess=$ac_aux_dir/config.guess ! ac_config_sub=$ac_aux_dir/config.sub ! ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. ! toplevel_srcdir=\${top_srcdir}/$toprel ! # Do some error checking and defaulting for the host and target type. ! # The inputs are: ! # configure --host=HOST --target=TARGET --build=BUILD NONOPT ! # ! # The rules are: ! # 1. You are not allowed to specify --host, --target, and nonopt at the ! # same time. ! # 2. Host defaults to nonopt. ! # 3. If nonopt is not specified, then host defaults to the current host, ! # as determined by config.guess. ! # 4. Target and build default to nonopt. ! # 5. If nonopt is not specified, then target and build default to host. - # The aliases save the names the user supplied, while $host etc. - # will get canonicalized. - case $host---$target---$nonopt in - NONE---*---* | *---NONE---* | *---*---NONE) ;; - *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; - esac - # Make sure we can run config.sub. - if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : - else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi - echo $ac_n "checking host system type""... $ac_c" 1>&6 - echo "configure:639: checking host system type" >&5 ! host_alias=$host ! case "$host_alias" in ! NONE) ! case $nonopt in ! NONE) ! if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : ! else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } ! fi ;; ! *) host_alias=$nonopt ;; ! esac ;; ! esac ! host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` ! host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` ! host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` ! host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` ! echo "$ac_t""$host" 1>&6 - echo $ac_n "checking target system type""... $ac_c" 1>&6 - echo "configure:660: checking target system type" >&5 ! target_alias=$target ! case "$target_alias" in ! NONE) ! case $nonopt in ! NONE) target_alias=$host_alias ;; ! *) target_alias=$nonopt ;; ! esac ;; esac ! target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` ! target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` ! target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` ! target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` ! echo "$ac_t""$target" 1>&6 ! ! echo $ac_n "checking build system type""... $ac_c" 1>&6 ! echo "configure:678: checking build system type" >&5 ! build_alias=$build ! case "$build_alias" in ! NONE) ! case $nonopt in ! NONE) build_alias=$host_alias ;; ! *) build_alias=$nonopt ;; ! esac ;; esac - build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` - build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` - build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` - build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - echo "$ac_t""$build" 1>&6 - test "$host_alias" != "$target_alias" && - test "$program_prefix$program_suffix$program_transform_name" = \ - NONENONEs,x,x, && - program_prefix=${target_alias}- - - target_alias=${target_alias-$target} ! if test $host != $build; then ! ac_tool_prefix=${host_alias}- ! else ! ac_tool_prefix= ! fi - echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 - echo "configure:710: checking for Cygwin environment" >&5 - if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ! rm -rf conftest* ! ac_cv_cygwin=yes else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! ac_cv_cygwin=no fi ! rm -f conftest* ! rm -f conftest* fi - echo "$ac_t""$ac_cv_cygwin" 1>&6 - CYGWIN= - test "$ac_cv_cygwin" = yes && CYGWIN=yes - echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 - echo "configure:743: checking for mingw32 environment" >&5 - if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_mingw32=yes - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_mingw32=no - fi - rm -f conftest* - rm -f conftest* - fi - echo "$ac_t""$ac_cv_mingw32" 1>&6 - MINGW32= - test "$ac_cv_mingw32" = yes && MINGW32=yes ! # Export build and source directories. ! # These need to be absolute paths, yet at the same time need to ! # canonicalize only relative paths, because then amd will not unmount ! # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd. ! glibcpp_builddir=`${PWDCMD-pwd}` ! case $srcdir in ! \\/$* | ?:\\/*) glibcpp_srcdir=${srcdir} ;; ! *) glibcpp_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;; esac ! # Will set LN_S to either 'ln -s' or 'ln'. With autoconf 2.50+, can also ! # be 'cp -p' if linking isn't available. ! #ac_cv_prog_LN_S='cp -p' ! echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 ! echo "configure:790: checking whether ln -s works" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! rm -f conftestdata ! if ln -s X conftestdata 2>/dev/null ! then ! rm -f conftestdata ! ac_cv_prog_LN_S="ln -s" else ! ac_cv_prog_LN_S=ln fi fi ! LN_S="$ac_cv_prog_LN_S" ! if test "$ac_cv_prog_LN_S" = "ln -s"; then ! echo "$ac_t""yes" 1>&6 else ! echo "$ac_t""no" 1>&6 fi - - # We use these options to decide which functions to include. - # Check whether --with-target-subdir or --without-target-subdir was given. - if test "${with_target_subdir+set}" = set; then - withval="$with_target_subdir" - : fi ! # Check whether --with-cross-host or --without-cross-host was given. ! if test "${with_cross_host+set}" = set; then ! withval="$with_cross_host" ! : fi ! # Never versions of autoconf add an underscore to these functions. ! # Prevent future problems ... ! ! ! ! ! ! # AC_PROG_CC ! ! # FIXME: We temporarily define our own version of AC_PROG_CC. This is ! # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We ! # are probably using a cross compiler, which will not be able to fully ! # link an executable. This should really be fixed in autoconf ! # itself. ! ! ! ! ! # Extract the first word of "gcc", so it can be a program name with args. ! set dummy gcc; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:846: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_prog_CC="gcc" ! break ! fi ! done ! IFS="$ac_save_ifs" fi fi ! CC="$ac_cv_prog_CC" if test -n "$CC"; then ! echo "$ac_t""$CC" 1>&6 else ! echo "$ac_t""no" 1>&6 fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:876: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then ! ac_prog_rejected=yes ! continue ! fi ! ac_cv_prog_CC="cc" ! break ! fi ! done ! IFS="$ac_save_ifs" if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift ! if test $# -gt 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ! set dummy "$ac_dir/$ac_word" "$@" ! shift ! ac_cv_prog_CC="$@" fi fi fi fi ! CC="$ac_cv_prog_CC" if test -n "$CC"; then ! echo "$ac_t""$CC" 1>&6 else ! echo "$ac_t""no" 1>&6 fi ! test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi ! echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ! echo "configure:925: checking whether we are using GNU C" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ! ac_cv_prog_gcc=yes else ! ac_cv_prog_gcc=no fi fi ! echo "$ac_t""$ac_cv_prog_gcc" 1>&6 ! if test $ac_cv_prog_gcc = yes; then ! GCC=yes ! ac_test_CFLAGS="${CFLAGS+set}" ! ac_save_CFLAGS="$CFLAGS" ! CFLAGS= ! echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:949: checking whether ${CC-cc} accepts -g" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! echo 'void f(){}' > conftest.c ! if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ! ac_cv_prog_cc_g=yes else ! ac_cv_prog_cc_g=no fi - rm -f conftest* fi ! echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 ! if test "$ac_test_CFLAGS" = set; then ! CFLAGS="$ac_save_CFLAGS" ! elif test $ac_cv_prog_cc_g = yes; then CFLAGS="-g -O2" else CFLAGS="-O2" fi else ! GCC= ! test "${CFLAGS+set}" = set || CFLAGS="-g" fi # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:980: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_prog_AS="${ac_tool_prefix}as" ! break ! fi ! done ! IFS="$ac_save_ifs" ! test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as" fi fi ! AS="$ac_cv_prog_AS" if test -n "$AS"; then ! echo "$ac_t""$AS" 1>&6 else ! echo "$ac_t""no" 1>&6 fi # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1012: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_prog_AR="${ac_tool_prefix}ar" ! break ! fi ! done ! IFS="$ac_save_ifs" ! test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" fi fi ! AR="$ac_cv_prog_AR" if test -n "$AR"; then ! echo "$ac_t""$AR" 1>&6 else ! echo "$ac_t""no" 1>&6 fi # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1044: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" ! break ! fi ! done ! IFS="$ac_save_ifs" fi fi ! RANLIB="$ac_cv_prog_RANLIB" if test -n "$RANLIB"; then ! echo "$ac_t""$RANLIB" 1>&6 else ! echo "$ac_t""no" 1>&6 fi ! if test -z "$ac_cv_prog_RANLIB"; then ! if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1076: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! if test -n "$RANLIB"; then ! ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_prog_RANLIB="ranlib" ! break ! fi ! done ! IFS="$ac_save_ifs" ! test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB="ranlib-not-found-in-path-error" fi fi ! RANLIB="$ac_cv_prog_RANLIB" ! if test -n "$RANLIB"; then ! echo "$ac_t""$RANLIB" 1>&6 else ! echo "$ac_t""no" 1>&6 fi else ! RANLIB="ranlib-not-found-in-path-error" ! fi fi ! # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. ! echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:1120: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then ! if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" ! for ac_dir in $PATH; do ! # Account for people who put trailing slashes in PATH elements. ! case "$ac_dir/" in ! /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; ! *) ! # OSF1 and SCO ODT 3.0 have their own names for install. ! # Don't use installbsd from OSF since it installs stuff as root ! # by default. ! for ac_prog in ginstall scoinst install; do ! if test -f $ac_dir/$ac_prog; then if test $ac_prog = install && ! grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : else ! ac_cv_path_install="$ac_dir/$ac_prog -c" ! break 2 fi fi done ! ;; ! esac ! done ! IFS="$ac_save_IFS" fi if test "${ac_cv_path_install+set}" = set; then ! INSTALL="$ac_cv_path_install" else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. ! INSTALL="$ac_install_sh" fi fi ! echo "$ac_t""$INSTALL" 1>&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' ! test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' ! # We need AC_EXEEXT to keep automake happy in cygnus mode. However, ! # at least currently, we never actually build a program, so we never ! # need to use $(EXEEXT). Moreover, the test for EXEEXT normally ! # fails, because we are probably configuring with a cross compiler ! # which can't create executables. So we include AC_EXEEXT to keep ! # automake happy, but we don't execute it, since we don't care about ! # the result. ! if false; then ! # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands ! # to nothing, so nothing would remain between `then' and `fi' if it ! # were not for the `:' below. ! : ! ! ! echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 ! echo "configure:1188: checking for executable suffix" >&5 ! if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 ! else ! if test "$CYGWIN" = yes || test "$MINGW32" = yes; then ! ac_cv_exeext=.exe else ! rm -f conftest* ! echo 'int main () { return 0; }' > conftest.$ac_ext ! ac_cv_exeext= ! if { (eval echo configure:1198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then ! for file in conftest.*; do ! case $file in ! *.c | *.o | *.obj) ;; ! *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; ! esac ! done ! else ! { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } ! fi ! rm -f conftest* ! test x"${ac_cv_exeext}" = x && ac_cv_exeext=no ! fi ! fi ! ! EXEEXT="" ! test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} ! echo "$ac_t""${ac_cv_exeext}" 1>&6 ! ac_exeext=$EXEEXT ! ! fi ! ! ! # Assumes glibcpp_builddir, glibcpp_srcdir are alreay set up and ! # exported correctly in GLIBCPP_CONFIGURE. ! glibcpp_toolexecdir=no ! glibcpp_toolexeclibdir=no ! glibcpp_prefixdir=${prefix} - echo $ac_n "checking for interface version number""... $ac_c" 1>&6 - echo "configure:1228: checking for interface version number" >&5 - libstdcxx_interface=$INTERFACE - echo "$ac_t""$libstdcxx_interface" 1>&6 ! # Process the option "--enable-version-specific-runtime-libs" ! echo $ac_n "checking for --enable-version-specific-runtime-libs""... $ac_c" 1>&6 ! echo "configure:1234: checking for --enable-version-specific-runtime-libs" >&5 ! # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given. ! if test "${enable_version_specific_runtime_libs+set}" = set; then ! enableval="$enable_version_specific_runtime_libs" ! case "$enableval" in ! yes) version_specific_libs=yes ;; ! no) version_specific_libs=no ;; ! *) { echo "configure: error: Unknown argument to enable/disable version-specific libs" 1>&2; exit 1; };; ! esac else ! version_specific_libs=no ! fi ! # Option set, now we can test it. ! echo "$ac_t""$version_specific_libs" 1>&6 ! ! gcc_version_trigger=${srcdir}/../gcc/version.c ! gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'` ! gcc_version=`echo ${gcc_version_full} | sed -e 's/\(^ *\) .*/\1/'` ! ! ! ! if test $version_specific_libs = yes; then ! # Need the gcc compiler version to know where to install libraries ! # and header files if --enable-version-specific-runtime-libs option ! # is selected. ! glibcpp_toolexecdir='$(libdir)/gcc/$(target_alias)' ! glibcpp_toolexeclibdir='$(toolexecdir)/'${gcc_version}'$(MULTISUBDIR)' ! fi ! ! # Calculate glibcpp_toolexecdir, glibcpp_toolexeclibdir ! # Install a library built with a cross compiler in tooldir, not libdir. ! if test x"$glibcpp_toolexecdir" = x"no"; then ! if test -n "$with_cross_host" && ! test x"$with_cross_host" != x"no"; then ! glibcpp_toolexecdir='$(exec_prefix)/$(target_alias)' ! glibcpp_toolexeclibdir='$(toolexecdir)/lib' ! else ! glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_alias)' ! glibcpp_toolexeclibdir='$(libdir)' ! fi ! multi_os_directory=`$CC -print-multi-os-directory` ! case $multi_os_directory in ! .) ;; # Avoid trailing /. ! *) glibcpp_toolexeclibdir=$glibcpp_toolexeclibdir/$multi_os_directory ;; ! esac fi - - # Disable shared libs by default # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then enableval="$enable_shared" --- 1423,2945 ---- ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break + elif test -f $ac_dir/shtool; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break fi done if test -z "$ac_aux_dir"; then ! { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in ${srcdir}/$toprel $srcdir/${srcdir}/$toprel" >&5 ! echo "$as_me: error: cannot find install-sh or install.sh in ${srcdir}/$toprel $srcdir/${srcdir}/$toprel" >&2;} ! { (exit 1); exit 1; }; } fi ! ac_config_guess="$SHELL $ac_aux_dir/config.guess" ! ac_config_sub="$SHELL $ac_aux_dir/config.sub" ! ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. ! toplevel_srcdir=\${srcdir}/$toprel + # Make sure we can run config.sub. + $ac_config_sub sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 + echo "$as_me: error: cannot run $ac_config_sub" >&2;} + { (exit 1); exit 1; }; } + echo "$as_me:$LINENO: checking build system type" >&5 + echo $ECHO_N "checking build system type... $ECHO_C" >&6 + if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_cv_build_alias=$build_alias + test -z "$ac_cv_build_alias" && + ac_cv_build_alias=`$ac_config_guess` + test -z "$ac_cv_build_alias" && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 + echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } + ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 + echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} + { (exit 1); exit 1; }; } ! fi ! echo "$as_me:$LINENO: result: $ac_cv_build" >&5 ! echo "${ECHO_T}$ac_cv_build" >&6 ! build=$ac_cv_build ! build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` ! build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` ! build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + echo "$as_me:$LINENO: checking host system type" >&5 + echo $ECHO_N "checking host system type... $ECHO_C" >&6 + if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_cv_host_alias=$host_alias + test -z "$ac_cv_host_alias" && + ac_cv_host_alias=$ac_cv_build_alias + ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 + echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + { (exit 1); exit 1; }; } fi + echo "$as_me:$LINENO: result: $ac_cv_host" >&5 + echo "${ECHO_T}$ac_cv_host" >&6 + host=$ac_cv_host + host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` + host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` ! echo "$as_me:$LINENO: checking target system type" >&5 ! echo $ECHO_N "checking target system type... $ECHO_C" >&6 ! if test "${ac_cv_target+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! ac_cv_target_alias=$target_alias ! test "x$ac_cv_target_alias" = "x" && ! ac_cv_target_alias=$ac_cv_host_alias ! ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || ! { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 ! echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} ! { (exit 1); exit 1; }; } ! fi ! echo "$as_me:$LINENO: result: $ac_cv_target" >&5 ! echo "${ECHO_T}$ac_cv_target" >&6 ! target=$ac_cv_target ! target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` ! target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` ! target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` ! # The aliases save the names the user supplied, while $host etc. ! # will get canonicalized. ! test -n "$target_alias" && ! test "$program_prefix$program_suffix$program_transform_name" = \ ! NONENONEs,x,x, && ! program_prefix=${target_alias}- ! case ${build_alias} in ! "") build_noncanonical=${build} ;; ! *) build_noncanonical=${build_alias} ;; esac ! case ${host_alias} in ! "") host_noncanonical=${build_noncanonical} ;; ! *) host_noncanonical=${host_alias} ;; ! esac ! case ${target_alias} in ! "") target_noncanonical=${host_noncanonical} ;; ! *) target_noncanonical=${target_alias} ;; esac ! # Export source directory. ! # These need to be absolute paths, yet at the same time need to ! # canonicalize only relative paths, because then amd will not unmount ! # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd. ! case $srcdir in ! \\/$* | ?:\\/*) glibcpp_srcdir=${srcdir} ;; ! *) glibcpp_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;; ! esac ! if test "${with_gcc_version_trigger+set}" = set; then ! gcc_version_trigger=$with_gcc_version_trigger else ! gcc_version_trigger=$srcdir/../gcc/version.c fi ! if test -f "${gcc_version_trigger}"; then ! gcc_version_full=`grep version_string "${gcc_version_trigger}" | sed -e 's/.*"\([^"]*\)".*/\1/'` ! else ! gcc_version_full=`$CC -v 2>&1 | sed -n 's/^gcc version //p'` fi + gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` ! ! # Calculate toolexeclibdir ! # Also toolexecdir, though it's only used in toolexeclibdir ! case ${version_specific_libs} in ! yes) ! # Need the gcc compiler version to know where to install libraries ! # and header files if --enable-version-specific-runtime-libs option ! # is selected. ! toolexecdir='$(libdir)/gcc/$(target_noncanonical)' ! toolexeclibdir='$(toolexecdir)/'${gcc_version}'$(MULTISUBDIR)' ! ;; ! no) ! if test -n "$with_cross_host" && ! test x"$with_cross_host" != x"no"; then ! # Install a library built with a cross compiler in tooldir, not libdir. ! toolexecdir='$(exec_prefix)/$(target_noncanonical)' ! toolexeclibdir='$(toolexecdir)/lib' ! else ! toolexecdir='$(libdir)/gcc-lib/$(target_noncanonical)' ! toolexeclibdir='$(libdir)' ! fi ! multi_os_directory=`$CC -print-multi-os-directory` ! case $multi_os_directory in ! .) ;; # Avoid trailing /. ! *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; ! esac ! ;; esac + # Figure out if we want to name the include directory and the + # library name changes differently. + includedirname=include + libext= + case "${host}" in + *-darwin*) + # Darwin is the only target so far that needs a different include directory. + includedirname=include-gnu-runtime + libext=-gnu + ;; + esac ! ! ac_config_headers="$ac_config_headers config.h" ! ! ! # -------- ! # Programs ! # -------- ! ! ! ! # We must force CC to /not/ be a precious variable; otherwise ! # the wrong, non-multilib-adjusted value will be used in multilibs. ! # As a side effect, we have to subst CFLAGS ourselves. ! ! ! ac_ext=c ! ac_cpp='$CPP $CPPFLAGS' ! ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ! ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ! ac_compiler_gnu=$ac_cv_c_compiler_gnu ! if test -n "$ac_tool_prefix"; then ! # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. ! set dummy ${ac_tool_prefix}gcc; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_CC+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! if test -n "$CC"; then ! ac_cv_prog_CC="$CC" # Let the user override the test. else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_CC="${ac_tool_prefix}gcc" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! fi fi ! CC=$ac_cv_prog_CC ! if test -n "$CC"; then ! echo "$as_me:$LINENO: result: $CC" >&5 ! echo "${ECHO_T}$CC" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi fi + if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. + set dummy gcc; ac_word=$2 + echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 + if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ! fi ! fi ! ac_ct_CC=$ac_cv_prog_ac_ct_CC ! if test -n "$ac_ct_CC"; then ! echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 ! echo "${ECHO_T}$ac_ct_CC" >&6 ! else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi + CC=$ac_ct_CC + else + CC="$ac_cv_prog_CC" + fi ! if test -z "$CC"; then ! if test -n "$ac_tool_prefix"; then ! # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. ! set dummy ${ac_tool_prefix}cc; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_CC+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_CC="${ac_tool_prefix}cc" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! fi fi ! CC=$ac_cv_prog_CC if test -n "$CC"; then ! echo "$as_me:$LINENO: result: $CC" >&5 ! echo "${ECHO_T}$CC" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 ! fi ! ! fi ! if test -z "$ac_cv_prog_CC"; then ! ac_ct_CC=$CC ! # Extract the first word of "cc", so it can be a program name with args. ! set dummy cc; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_ac_ct_CC+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! if test -n "$ac_ct_CC"; then ! ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. ! else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_ac_ct_CC="cc" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! ! fi ! fi ! ac_ct_CC=$ac_cv_prog_ac_ct_CC ! if test -n "$ac_ct_CC"; then ! echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 ! echo "${ECHO_T}$ac_ct_CC" >&6 ! else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi + CC=$ac_ct_CC + else + CC="$ac_cv_prog_CC" + fi + + fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_CC+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ! ac_prog_rejected=yes ! continue ! fi ! ac_cv_prog_CC="cc" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift ! if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ! ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi ! CC=$ac_cv_prog_CC if test -n "$CC"; then ! echo "$as_me:$LINENO: result: $CC" >&5 ! echo "${ECHO_T}$CC" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi ! fi ! if test -z "$CC"; then ! if test -n "$ac_tool_prefix"; then ! for ac_prog in cl ! do ! # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. ! set dummy $ac_tool_prefix$ac_prog; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_CC+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! if test -n "$CC"; then ! ac_cv_prog_CC="$CC" # Let the user override the test. ! else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_CC="$ac_tool_prefix$ac_prog" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! ! fi ! fi ! CC=$ac_cv_prog_CC ! if test -n "$CC"; then ! echo "$as_me:$LINENO: result: $CC" >&5 ! echo "${ECHO_T}$CC" >&6 ! else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi ! test -n "$CC" && break ! done ! fi ! if test -z "$CC"; then ! ac_ct_CC=$CC ! for ac_prog in cl ! do ! # Extract the first word of "$ac_prog", so it can be a program name with args. ! set dummy $ac_prog; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_ac_ct_CC+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! if test -n "$ac_ct_CC"; then ! ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_ac_ct_CC="$ac_prog" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! fi fi + ac_ct_CC=$ac_cv_prog_ac_ct_CC + if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 + echo "${ECHO_T}$ac_ct_CC" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + fi ! test -n "$ac_ct_CC" && break ! done ! CC=$ac_ct_CC ! fi ! ! fi ! ! ! test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH ! See \`config.log' for more details." >&5 ! echo "$as_me: error: no acceptable C compiler found in \$PATH ! See \`config.log' for more details." >&2;} ! { (exit 1); exit 1; }; } ! ! # Provide some information about the compiler. ! echo "$as_me:$LINENO:" \ ! "checking for C compiler version" >&5 ! ac_compiler=`set X $ac_compile; echo $2` ! { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 ! (eval $ac_compiler --version &5) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } ! { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 ! (eval $ac_compiler -v &5) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } ! { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 ! (eval $ac_compiler -V &5) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } ! ! cat >conftest.$ac_ext <<_ACEOF ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! int ! main () ! { ! ! ; ! return 0; ! } ! _ACEOF ! # FIXME: Cleanup? ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; then ! gcc_no_link=no else ! gcc_no_link=yes ! fi ! ! if test x$gcc_no_link = xyes; then ! # Setting cross_compile will disable run tests; it will ! # also disable AC_CHECK_FILE but that's generally ! # correct if we can't link. ! cross_compiling=yes ! EXEEXT= else ! cat >conftest.$ac_ext <<_ACEOF ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! int ! main () ! { ! ! ; ! return 0; ! } ! _ACEOF ! ac_clean_files_save=$ac_clean_files ! ac_clean_files="$ac_clean_files a.out a.exe b.out" ! # Try to create an executable without -o first, disregard a.out. ! # It will help us diagnose broken compilers, and finding out an intuition ! # of exeext. ! echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 ! echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ! ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` ! if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 ! (eval $ac_link_default) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; then ! # Find the output, starting from the most likely. This scheme is ! # not robust to junk in `.', hence go to wildcards (a.*) only as a last ! # resort. ! ! # Be careful to initialize this variable, since it used to be cached. ! # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ! ac_cv_exeext= ! # b.out is created by i960 compilers. ! for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out ! do ! test -f "$ac_file" || continue ! case $ac_file in ! *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ! ;; ! conftest.$ac_ext ) ! # This is the source file. ! ;; ! [ab].out ) ! # We found the default executable, but exeext='' is most ! # certainly right. ! break;; ! *.* ) ! ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` ! # FIXME: I believe we export ac_cv_exeext for Libtool, ! # but it would be cool to find out if it's true. Does anybody ! # maintain Libtool? --akim. ! export ac_cv_exeext ! break;; ! * ) ! break;; ! esac ! done ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! { { echo "$as_me:$LINENO: error: C compiler cannot create executables ! See \`config.log' for more details." >&5 ! echo "$as_me: error: C compiler cannot create executables ! See \`config.log' for more details." >&2;} ! { (exit 77); exit 77; }; } fi + ac_exeext=$ac_cv_exeext + echo "$as_me:$LINENO: result: $ac_file" >&5 + echo "${ECHO_T}$ac_file" >&6 + + # Check the compiler produces executables we can run. If not, either + # the compiler is broken, or we cross compile. + echo "$as_me:$LINENO: checking whether the C compiler works" >&5 + echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 + # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 + # If not cross compiling, check that we can run a simple program. + if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. + If you meant to cross compile, use \`--host'. + See \`config.log' for more details." >&5 + echo "$as_me: error: cannot run C compiled programs. + If you meant to cross compile, use \`--host'. + See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi fi + echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6 ! rm -f a.out a.exe conftest$ac_cv_exeext b.out ! ac_clean_files=$ac_clean_files_save ! # Check the compiler produces executables we can run. If not, either ! # the compiler is broken, or we cross compile. ! echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 ! echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 ! echo "$as_me:$LINENO: result: $cross_compiling" >&5 ! echo "${ECHO_T}$cross_compiling" >&6 ! ! echo "$as_me:$LINENO: checking for suffix of executables" >&5 ! echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; then ! # If both `conftest.exe' and `conftest' are `present' (well, observable) ! # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will ! # work properly (i.e., refer to `conftest.exe'), while it won't with ! # `rm'. ! for ac_file in conftest.exe conftest conftest.*; do ! test -f "$ac_file" || continue ! case $ac_file in ! *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; ! *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` ! export ac_cv_exeext ! break;; ! * ) break;; ! esac ! done ! else ! { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link ! See \`config.log' for more details." >&5 ! echo "$as_me: error: cannot compute suffix of executables: cannot compile and link ! See \`config.log' for more details." >&2;} ! { (exit 1); exit 1; }; } ! fi ! ! rm -f conftest$ac_cv_exeext ! echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 ! echo "${ECHO_T}$ac_cv_exeext" >&6 ! ! rm -f conftest.$ac_ext ! EXEEXT=$ac_cv_exeext ! ac_exeext=$EXEEXT ! fi ! echo "$as_me:$LINENO: checking for suffix of object files" >&5 ! echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 ! if test "${ac_cv_objext+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! cat >conftest.$ac_ext <<_ACEOF ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! int ! main () ! { ! ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.o conftest.obj ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; then ! for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do ! case $ac_file in ! *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; ! *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` ! break;; ! esac ! done ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile ! See \`config.log' for more details." >&5 ! echo "$as_me: error: cannot compute suffix of object files: cannot compile ! See \`config.log' for more details." >&2;} ! { (exit 1); exit 1; }; } ! fi ! ! rm -f conftest.$ac_cv_objext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 ! echo "${ECHO_T}$ac_cv_objext" >&6 ! OBJEXT=$ac_cv_objext ! ac_objext=$OBJEXT ! echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 ! echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 ! if test "${ac_cv_c_compiler_gnu+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! cat >conftest.$ac_ext <<_ACEOF ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! int ! main () ! { ! #ifndef __GNUC__ ! choke me ! #endif ! ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -z "$ac_c_werror_flag" ! || test ! -s conftest.err' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_compiler_gnu=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_compiler_gnu=no ! fi ! rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ! ac_cv_c_compiler_gnu=$ac_compiler_gnu ! ! fi ! echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 ! echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 ! GCC=`test $ac_compiler_gnu = yes && echo yes` ! ac_test_CFLAGS=${CFLAGS+set} ! ac_save_CFLAGS=$CFLAGS ! CFLAGS="-g" ! echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 ! echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 ! if test "${ac_cv_prog_cc_g+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! cat >conftest.$ac_ext <<_ACEOF ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! int ! main () ! { ! ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -z "$ac_c_werror_flag" ! || test ! -s conftest.err' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_prog_cc_g=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_prog_cc_g=no ! fi ! rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 ! echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 ! if test "$ac_test_CFLAGS" = set; then ! CFLAGS=$ac_save_CFLAGS ! elif test $ac_cv_prog_cc_g = yes; then ! if test "$GCC" = yes; then CFLAGS="-g -O2" else + CFLAGS="-g" + fi + else + if test "$GCC" = yes; then CFLAGS="-O2" + else + CFLAGS= fi + fi + echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 + echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 + if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ! ac_cv_prog_cc_stdc=no ! ac_save_CC=$CC ! cat >conftest.$ac_ext <<_ACEOF ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #include ! #include ! #include ! #include ! /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ ! struct buf { int x; }; ! FILE * (*rcsopen) (struct buf *, struct stat *, int); ! static char *e (p, i) ! char **p; ! int i; ! { ! return p[i]; ! } ! static char *f (char * (*g) (char **, int), char **p, ...) ! { ! char *s; ! va_list v; ! va_start (v,p); ! s = g (p, va_arg (v,int)); ! va_end (v); ! return s; ! } ! ! /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has ! function prototypes and stuff, but not '\xHH' hex character constants. ! These don't provoke an error unfortunately, instead are silently treated ! as 'x'. The following induces an error, until -std1 is added to get ! proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an ! array size at least. It's necessary to write '\x00'==0 to get something ! that's true only with -std1. */ ! int osf4_cc_array ['\x00' == 0 ? 1 : -1]; ! ! int test (int i, double x); ! struct s1 {int (*f) (int a);}; ! struct s2 {int (*f) (double a);}; ! int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); ! int argc; ! char **argv; ! int ! main () ! { ! return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ! ; ! return 0; ! } ! _ACEOF ! # Don't try gcc -ansi; that turns off useful extensions and ! # breaks some systems' header files. ! # AIX -qlanglvl=ansi ! # Ultrix and OSF/1 -std1 ! # HP-UX 10.20 and later -Ae ! # HP-UX older versions -Aa -D_HPUX_SOURCE ! # SVR4 -Xc -D__EXTENSIONS__ ! for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" ! do ! CC="$ac_save_CC $ac_arg" ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -z "$ac_c_werror_flag" ! || test ! -s conftest.err' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_prog_cc_stdc=$ac_arg ! break ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! fi ! rm -f conftest.err conftest.$ac_objext ! done ! rm -f conftest.$ac_ext conftest.$ac_objext ! CC=$ac_save_CC ! ! fi ! ! case "x$ac_cv_prog_cc_stdc" in ! x|xno) ! echo "$as_me:$LINENO: result: none needed" >&5 ! echo "${ECHO_T}none needed" >&6 ;; ! *) ! echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 ! echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 ! CC="$CC $ac_cv_prog_cc_stdc" ;; ! esac ! ! # Some people use a C++ compiler to compile C. Since we use `exit', ! # in C++ we need to declare it. In case someone uses the same compiler ! # for both compiling C and C++ we need to have the C++ compiler decide ! # the declaration of exit, since it's the most demanding environment. ! cat >conftest.$ac_ext <<_ACEOF ! #ifndef __cplusplus ! choke me ! #endif ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -z "$ac_c_werror_flag" ! || test ! -s conftest.err' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! for ac_declaration in \ ! '' \ ! 'extern "C" void std::exit (int) throw (); using std::exit;' \ ! 'extern "C" void std::exit (int); using std::exit;' \ ! 'extern "C" void exit (int) throw ();' \ ! 'extern "C" void exit (int);' \ ! 'void exit (int);' ! do ! cat >conftest.$ac_ext <<_ACEOF ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! $ac_declaration ! #include ! int ! main () ! { ! exit (42); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -z "$ac_c_werror_flag" ! || test ! -s conftest.err' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! : ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! continue fi + rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + $ac_declaration + int + main () + { + exit (42); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + fi + rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done + rm -f conftest* + if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h + fi + + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + fi + rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_AS+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_AS="${ac_tool_prefix}as" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! fi fi ! AS=$ac_cv_prog_AS if test -n "$AS"; then ! echo "$as_me:$LINENO: result: $AS" >&5 ! echo "${ECHO_T}$AS" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi + fi + if test -z "$ac_cv_prog_AS"; then + ac_ct_AS=$AS + # Extract the first word of "as", so it can be a program name with args. + set dummy as; ac_word=$2 + echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 + if test "${ac_cv_prog_ac_ct_AS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$ac_ct_AS"; then + ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AS="as" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + fi + fi + ac_ct_AS=$ac_cv_prog_ac_ct_AS + if test -n "$ac_ct_AS"; then + echo "$as_me:$LINENO: result: $ac_ct_AS" >&5 + echo "${ECHO_T}$ac_ct_AS" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + fi + AS=$ac_ct_AS + else + AS="$ac_cv_prog_AS" + fi + + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_AR+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_AR="${ac_tool_prefix}ar" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! fi fi ! AR=$ac_cv_prog_AR if test -n "$AR"; then ! echo "$as_me:$LINENO: result: $AR" >&5 ! echo "${ECHO_T}$AR" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi + fi + if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. + set dummy ar; ac_word=$2 + echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 + if test "${ac_cv_prog_ac_ct_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + + fi + fi + ac_ct_AR=$ac_cv_prog_ac_ct_AR + if test -n "$ac_ct_AR"; then + echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 + echo "${ECHO_T}$ac_ct_AR" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + fi + AR=$ac_ct_AR + else + AR="$ac_cv_prog_AR" + fi + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_RANLIB+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! fi fi ! RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then ! echo "$as_me:$LINENO: result: $RANLIB" >&5 ! echo "${ECHO_T}$RANLIB" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi ! fi if test -z "$ac_cv_prog_RANLIB"; then ! ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! if test -n "$ac_ct_RANLIB"; then ! ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_ac_ct_RANLIB="ranlib" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! ! test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ! ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB ! if test -n "$ac_ct_RANLIB"; then ! echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 ! echo "${ECHO_T}$ac_ct_RANLIB" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi + RANLIB=$ac_ct_RANLIB else ! RANLIB="$ac_cv_prog_RANLIB" fi ! # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install + # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" + # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. ! echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 ! echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then ! if test "${ac_cv_path_install+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! # Account for people who put trailing slashes in PATH elements. ! case $as_dir/ in ! ./ | .// | /cC/* | \ ! /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ! ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ ! /usr/ucb/* ) ;; ! *) ! # OSF1 and SCO ODT 3.0 have their own names for install. ! # Don't use installbsd from OSF since it installs stuff as root ! # by default. ! for ac_prog in ginstall scoinst install; do ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && ! grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : else ! ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" ! break 3 fi fi done ! done ! ;; ! esac ! done ! fi if test "${ac_cv_path_install+set}" = set; then ! INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. ! INSTALL=$ac_install_sh fi fi ! echo "$as_me:$LINENO: result: $INSTALL" >&5 ! echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' ! test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' ! echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 ! echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 ! # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. ! if test "${enable_maintainer_mode+set}" = set; then ! enableval="$enable_maintainer_mode" ! USE_MAINTAINER_MODE=$enableval else ! USE_MAINTAINER_MODE=no ! fi; ! echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 ! echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6 ! if test $USE_MAINTAINER_MODE = yes; then ! MAINTAINER_MODE_TRUE= ! MAINTAINER_MODE_FALSE='#' else ! MAINTAINER_MODE_TRUE='#' ! MAINTAINER_MODE_FALSE= fi + MAINT=$MAINTAINER_MODE_TRUE + # Enable Win32 DLL on MS Windows - FIXME # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then enableval="$enable_shared" *************** no) enable_shared=no ;; *** 1304,1315 **** ;; esac else ! enable_shared=no ! fi ! ! # Enable Win32 DLL on MS Windows - FIXME ! ! # Check whether --enable-static or --disable-static was given. if test "${enable_static+set}" = set; then enableval="$enable_static" --- 2960,2967 ---- ;; esac else ! enable_shared=yes ! fi; # Check whether --enable-static or --disable-static was given. if test "${enable_static+set}" = set; then enableval="$enable_static" *************** no) enable_static=no ;; *** 1331,1338 **** esac else enable_static=yes ! fi ! # Check whether --enable-fast-install or --disable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval="$enable_fast_install" --- 2983,2989 ---- esac else enable_static=yes ! fi; # Check whether --enable-fast-install or --disable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval="$enable_fast_install" *************** no) enable_fast_install=no ;; *** 1354,1360 **** esac else enable_fast_install=yes ! fi # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then --- 3005,3011 ---- esac else enable_fast_install=yes ! fi; # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then *************** if test "${with_gnu_ld+set}" = set; then *** 1362,1374 **** test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no ! fi ! ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. ! echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 ! echo "configure:1372: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw --- 3013,3024 ---- test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no ! fi; ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. ! echo "$as_me:$LINENO: checking for ld used by GCC" >&5 ! echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw *************** echo "configure:1372: checking for ld us *** 1397,1410 **** ;; esac elif test "$with_gnu_ld" = yes; then ! echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 ! echo "configure:1402: checking for GNU ld" >&5 else ! echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 ! echo "configure:1405: checking for non-GNU ld" >&5 fi ! if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" --- 3047,3060 ---- ;; esac elif test "$with_gnu_ld" = yes; then ! echo "$as_me:$LINENO: checking for GNU ld" >&5 ! echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 else ! echo "$as_me:$LINENO: checking for non-GNU ld" >&5 ! echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 fi ! if test "${lt_cv_path_LD+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" *************** fi *** 1430,1444 **** LD="$lt_cv_path_LD" if test -n "$LD"; then ! echo "$ac_t""$LD" 1>&6 else ! echo "$ac_t""no" 1>&6 fi ! test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } ! echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 ! echo "configure:1440: checking if the linker ($LD) is GNU ld" >&5 ! if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LD -v 2>&1 &5; then --- 3080,3098 ---- LD="$lt_cv_path_LD" if test -n "$LD"; then ! echo "$as_me:$LINENO: result: $LD" >&5 ! echo "${ECHO_T}$LD" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi ! test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 ! echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} ! { (exit 1); exit 1; }; } ! echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 ! echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 ! if test "${lt_cv_prog_gnu_ld+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LD -v 2>&1 &5; then *************** else *** 1447,1473 **** lt_cv_prog_gnu_ld=no fi fi ! ! echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6 with_gnu_ld=$lt_cv_prog_gnu_ld ! echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 ! echo "configure:1457: checking for $LD option to reload object files" >&5 ! if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else lt_cv_ld_reload_flag='-r' fi ! ! echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6 reload_flag=$lt_cv_ld_reload_flag test -n "$reload_flag" && reload_flag=" $reload_flag" ! echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 ! echo "configure:1469: checking for BSD-compatible nm" >&5 ! if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$NM"; then # Let the user override the test. --- 3101,3127 ---- lt_cv_prog_gnu_ld=no fi fi ! echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 ! echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 with_gnu_ld=$lt_cv_prog_gnu_ld ! echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 ! echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 ! if test "${lt_cv_ld_reload_flag+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_ld_reload_flag='-r' fi ! echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 ! echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 reload_flag=$lt_cv_ld_reload_flag test -n "$reload_flag" && reload_flag=" $reload_flag" ! echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 ! echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 ! if test "${lt_cv_path_NM+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NM"; then # Let the user override the test. *************** fi *** 1500,1511 **** fi NM="$lt_cv_path_NM" ! echo "$ac_t""$NM" 1>&6 ! echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 ! echo "configure:1507: checking how to recognise dependant libraries" >&5 ! if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= --- 3154,3177 ---- fi NM="$lt_cv_path_NM" ! echo "$as_me:$LINENO: result: $NM" >&5 ! echo "${ECHO_T}$NM" >&6 ! echo "$as_me:$LINENO: checking whether ln -s works" >&5 ! echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 ! LN_S=$as_ln_s ! if test "$LN_S" = "ln -s"; then ! echo "$as_me:$LINENO: result: yes" >&5 ! echo "${ECHO_T}yes" >&6 ! else ! echo "$as_me:$LINENO: result: no, using $LN_S" >&5 ! echo "${ECHO_T}no, using $LN_S" >&6 ! fi ! ! echo "$as_me:$LINENO: checking how to recognise dependant libraries" >&5 ! echo $ECHO_N "checking how to recognise dependant libraries... $ECHO_C" >&6 ! if test "${lt_cv_deplibs_check_method+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= *************** cygwin* | mingw* |pw32*) *** 1542,1547 **** --- 3208,3214 ---- ;; darwin* | rhapsody*) + # this will be overwritten by pass_all, but leave it in just in case lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' lt_cv_file_magic_cmd='/usr/bin/file -L' case "$host_os" in *************** darwin* | rhapsody*) *** 1552,1560 **** lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' ;; esac ;; ! freebsd* ) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) --- 3219,3228 ---- lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' ;; esac + lt_cv_deplibs_check_method=pass_all ;; ! freebsd* | kfreebsd*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) *************** irix5* | irix6*) *** 1612,1628 **** # This must be Linux ELF. linux-gnu*) ! case $host_cpu in ! alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* ) ! lt_cv_deplibs_check_method=pass_all ;; ! *) ! # glibc up to 2.1.1 does not perform some relocations on ARM ! lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; ! esac ! lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` ;; ! netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' else --- 3280,3289 ---- # This must be Linux ELF. linux-gnu*) ! lt_cv_deplibs_check_method=pass_all ;; ! netbsd* | knetbsd*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' else *************** sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) *** 1670,1703 **** esac fi ! ! echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6 file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method - echo $ac_n "checking for object suffix""... $ac_c" 1>&6 - echo "configure:1680: checking for object suffix" >&5 - if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - rm -f conftest* - echo 'int i = 1;' > conftest.$ac_ext - if { (eval echo configure:1686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - for ac_file in conftest.*; do - case $ac_file in - *.c) ;; - *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;; - esac - done - else - { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; } - fi - rm -f conftest* - fi ! echo "$ac_t""$ac_cv_objext" 1>&6 ! OBJEXT=$ac_cv_objext ! ac_objext=$ac_cv_objext # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! --- 3331,3344 ---- esac fi ! echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 ! echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method ! ! # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! *************** ac_objext=$ac_cv_objext *** 1705,1714 **** case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then ! echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 ! echo "configure:1710: checking for ${ac_tool_prefix}file" >&5 ! if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else case $MAGIC_CMD in /*) --- 3346,3355 ---- case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then ! echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 ! echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 ! if test "${lt_cv_path_MAGIC_CMD+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in /*) *************** fi *** 1760,1776 **** MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then ! echo "$ac_t""$MAGIC_CMD" 1>&6 else ! echo "$ac_t""no" 1>&6 fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then ! echo $ac_n "checking for file""... $ac_c" 1>&6 ! echo "configure:1772: checking for file" >&5 ! if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else case $MAGIC_CMD in /*) --- 3401,3419 ---- MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then ! echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 ! echo "${ECHO_T}$MAGIC_CMD" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then ! echo "$as_me:$LINENO: checking for file" >&5 ! echo $ECHO_N "checking for file... $ECHO_C" >&6 ! if test "${lt_cv_path_MAGIC_CMD+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in /*) *************** fi *** 1822,1830 **** MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then ! echo "$ac_t""$MAGIC_CMD" 1>&6 else ! echo "$ac_t""no" 1>&6 fi else --- 3465,3475 ---- MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then ! echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 ! echo "${ECHO_T}$MAGIC_CMD" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi else *************** fi *** 1836,1973 **** ;; esac ! # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1843: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" ! break ! fi ! done ! IFS="$ac_save_ifs" fi fi ! RANLIB="$ac_cv_prog_RANLIB" if test -n "$RANLIB"; then ! echo "$ac_t""$RANLIB" 1>&6 else ! echo "$ac_t""no" 1>&6 fi ! if test -z "$ac_cv_prog_RANLIB"; then ! if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1875: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! if test -n "$RANLIB"; then ! ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_prog_RANLIB="ranlib" ! break ! fi ! done ! IFS="$ac_save_ifs" ! test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" fi fi ! RANLIB="$ac_cv_prog_RANLIB" ! if test -n "$RANLIB"; then ! echo "$ac_t""$RANLIB" 1>&6 else ! echo "$ac_t""no" 1>&6 fi else ! RANLIB=":" ! fi fi ! # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1910: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_prog_STRIP="${ac_tool_prefix}strip" ! break ! fi ! done ! IFS="$ac_save_ifs" fi fi ! STRIP="$ac_cv_prog_STRIP" if test -n "$STRIP"; then ! echo "$ac_t""$STRIP" 1>&6 else ! echo "$ac_t""no" 1>&6 fi ! if test -z "$ac_cv_prog_STRIP"; then ! if test -n "$ac_tool_prefix"; then # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1942: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! if test -n "$STRIP"; then ! ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_prog_STRIP="strip" ! break ! fi ! done ! IFS="$ac_save_ifs" ! test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":" fi fi ! STRIP="$ac_cv_prog_STRIP" ! if test -n "$STRIP"; then ! echo "$ac_t""$STRIP" 1>&6 else ! echo "$ac_t""no" 1>&6 fi else ! STRIP=":" ! fi fi --- 3481,3644 ---- ;; esac ! if test -n "$ac_tool_prefix"; then ! # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_RANLIB+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! fi fi ! RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then ! echo "$as_me:$LINENO: result: $RANLIB" >&5 ! echo "${ECHO_T}$RANLIB" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi ! fi if test -z "$ac_cv_prog_RANLIB"; then ! ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! if test -n "$ac_ct_RANLIB"; then ! ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_ac_ct_RANLIB="ranlib" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! ! test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ! ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB ! if test -n "$ac_ct_RANLIB"; then ! echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 ! echo "${ECHO_T}$ac_ct_RANLIB" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi + RANLIB=$ac_ct_RANLIB else ! RANLIB="$ac_cv_prog_RANLIB" fi ! if test -n "$ac_tool_prefix"; then ! # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_STRIP+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_STRIP="${ac_tool_prefix}strip" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! fi fi ! STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then ! echo "$as_me:$LINENO: result: $STRIP" >&5 ! echo "${ECHO_T}$STRIP" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi ! fi if test -z "$ac_cv_prog_STRIP"; then ! ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! if test -n "$ac_ct_STRIP"; then ! ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_ac_ct_STRIP="strip" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! ! test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ! ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP ! if test -n "$ac_ct_STRIP"; then ! echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 ! echo "${ECHO_T}$ac_ct_STRIP" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi + STRIP=$ac_ct_STRIP else ! STRIP="$ac_cv_prog_STRIP" fi *************** test "$enable_fast_install" = no && libt *** 1979,2002 **** test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc" test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" ! libtool_flags="$libtool_flags --enable-win32-dll" # Check whether --enable-libtool-lock or --disable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval="$enable_libtool_lock" - : - fi test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" # Check whether --with-pic or --without-pic was given. if test "${with_pic+set}" = set; then withval="$with_pic" pic_mode="$withval" else pic_mode=default ! fi ! test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic" test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" --- 3650,3672 ---- test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc" test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" ! # Check whether --enable-libtool-lock or --disable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval="$enable_libtool_lock" + fi; test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" + # Check whether --with-pic or --without-pic was given. if test "${with_pic+set}" = set; then withval="$with_pic" pic_mode="$withval" else pic_mode=default ! fi; test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic" test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" *************** test x"$pic_mode" = xno && libtool_flags *** 2005,2012 **** case $host in *-*-irix6*) # Find out which ABI we are using. ! echo '#line 2009 "configure"' > conftest.$ac_ext ! if { (eval echo configure:2010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) --- 3675,3686 ---- case $host in *-*-irix6*) # Find out which ABI we are using. ! echo '#line 3678 "configure"' > conftest.$ac_ext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) *************** case $host in *** 2039,2045 **** ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext ! if { (eval echo configure:2043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *ELF-32*) HPUX_IA64_MODE="32" --- 3713,3723 ---- ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; then case "`/usr/bin/file conftest.o`" in *ELF-32*) HPUX_IA64_MODE="32" *************** ia64-*-hpux*) *** 2055,2061 **** x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext ! if { (eval echo configure:2059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) case $host in --- 3733,3743 ---- x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; then case "`/usr/bin/file conftest.o`" in *32-bit*) case $host in *************** x86_64-*linux*|ppc*-*linux*|powerpc*-*li *** 2098,2475 **** # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" ! echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 ! echo "configure:2103: checking whether the C compiler needs -belf" >&5 ! if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! ac_ext=c - # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ! ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ! cross_compiling=$ac_cv_prog_cc_cross ! cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* lt_cv_cc_needs_belf=yes else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! lt_cv_cc_needs_belf=no fi ! rm -f conftest* ac_ext=c - # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ! ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ! cross_compiling=$ac_cv_prog_cc_cross fi ! ! echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; - *-*-cygwin* | *-*-mingw* | *-*-pw32*) - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. - set dummy ${ac_tool_prefix}dlltool; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 - echo "configure:2153: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. - else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - break - fi - done - IFS="$ac_save_ifs" - fi - fi - DLLTOOL="$ac_cv_prog_DLLTOOL" - if test -n "$DLLTOOL"; then - echo "$ac_t""$DLLTOOL" 1>&6 - else - echo "$ac_t""no" 1>&6 - fi - - - if test -z "$ac_cv_prog_DLLTOOL"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "dlltool", so it can be a program name with args. - set dummy dlltool; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 - echo "configure:2185: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. - else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_DLLTOOL="dlltool" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false" - fi - fi - DLLTOOL="$ac_cv_prog_DLLTOOL" - if test -n "$DLLTOOL"; then - echo "$ac_t""$DLLTOOL" 1>&6 - else - echo "$ac_t""no" 1>&6 - fi - - else - DLLTOOL="false" - fi - fi - - # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. - set dummy ${ac_tool_prefix}as; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 - echo "configure:2220: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - if test -n "$AS"; then - ac_cv_prog_AS="$AS" # Let the user override the test. - else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_AS="${ac_tool_prefix}as" - break - fi - done - IFS="$ac_save_ifs" - fi - fi - AS="$ac_cv_prog_AS" - if test -n "$AS"; then - echo "$ac_t""$AS" 1>&6 - else - echo "$ac_t""no" 1>&6 - fi - - - if test -z "$ac_cv_prog_AS"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "as", so it can be a program name with args. - set dummy as; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 - echo "configure:2252: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - if test -n "$AS"; then - ac_cv_prog_AS="$AS" # Let the user override the test. - else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_AS="as" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false" - fi - fi - AS="$ac_cv_prog_AS" - if test -n "$AS"; then - echo "$ac_t""$AS" 1>&6 - else - echo "$ac_t""no" 1>&6 - fi - - else - AS="false" - fi - fi - - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. - set dummy ${ac_tool_prefix}objdump; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 - echo "configure:2287: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. - else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - break - fi - done - IFS="$ac_save_ifs" - fi - fi - OBJDUMP="$ac_cv_prog_OBJDUMP" - if test -n "$OBJDUMP"; then - echo "$ac_t""$OBJDUMP" 1>&6 - else - echo "$ac_t""no" 1>&6 - fi - - - if test -z "$ac_cv_prog_OBJDUMP"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "objdump", so it can be a program name with args. - set dummy objdump; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 - echo "configure:2319: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. - else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_OBJDUMP="objdump" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false" - fi - fi - OBJDUMP="$ac_cv_prog_OBJDUMP" - if test -n "$OBJDUMP"; then - echo "$ac_t""$OBJDUMP" 1>&6 - else - echo "$ac_t""no" 1>&6 - fi - - else - OBJDUMP="false" - fi - fi - - - # recent cygwin and mingw systems supply a stub DllMain which the user - # can override, but on older systems we have to supply one - echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6 - echo "configure:2355: checking if libtool should supply DllMain function" >&5 - if eval "test \"`echo '$''{'lt_cv_need_dllmain'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - lt_cv_need_dllmain=no - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - lt_cv_need_dllmain=yes - fi - rm -f conftest* - fi - - echo "$ac_t""$lt_cv_need_dllmain" 1>&6 - - case $host/$CC in - *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*) - # old mingw systems require "-dll" to link a DLL, while more recent ones - # require "-mdll" - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -mdll" - echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6 - echo "configure:2389: checking how to link DLLs" >&5 - if eval "test \"`echo '$''{'lt_cv_cc_dll_switch'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - lt_cv_cc_dll_switch=-mdll - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - lt_cv_cc_dll_switch=-dll - fi - rm -f conftest* - fi - echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6 - CFLAGS="$SAVE_CFLAGS" ;; - *-*-cygwin* | *-*-pw32*) - # cygwin systems need to pass --dll to the linker, and not link - # crt.o which will require a WinMain@16 definition. - lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;; - esac - ;; - esac # Save cache, so that ltconfig can load it ! cat > confcache <<\EOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure ! # scripts and configure runs. It is not useful on other systems. ! # If it contains results you don't want to keep, you may remove or edit it. # ! # By default, configure uses ./config.cache as the cache file, ! # creating it if it does not exist already. You can give configure ! # the --cache-file=FILE option to use a different cache file; that is ! # what configure does when it calls configure scripts in ! # subdirectories, so they share the cache. ! # Giving --cache-file=/dev/null disables caching, for debugging configure. ! # config.status only pays attention to the cache file if you give it the ! # --recheck option to rerun configure. # ! EOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ! (set) 2>&1 | ! case `(ac_space=' '; set | grep ac_space) 2>&1` in ! *ac_space=\ *) ! # `set' does not quote correctly, so add quotes (double-quote substitution ! # turns \\\\ into \\, and sed turns \\ into \). ! sed -n \ ! -e "s/'/'\\\\''/g" \ ! -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" ! ;; ! *) ! # `set' quotes correctly as required by POSIX, so do not add quotes. ! sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ! ;; ! esac >> confcache ! if cmp -s $cache_file confcache; then ! : ! else if test -w $cache_file; then ! echo "updating cache $cache_file" ! cat confcache > $cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache - # Actually configure libtool. ac_aux_dir is where install-sh is found. AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ --- 3780,3924 ---- # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" ! echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 ! echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 ! if test "${lt_cv_cc_needs_belf+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! ! ac_ext=c ac_cpp='$CPP $CPPFLAGS' ! ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ! ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ! ac_compiler_gnu=$ac_cv_c_compiler_gnu ! if test x$gcc_no_link = xyes; then ! { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 ! echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} ! { (exit 1); exit 1; }; } ! fi ! cat >conftest.$ac_ext <<_ACEOF ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! int ! main () ! { ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -z "$ac_c_werror_flag" ! || test ! -s conftest.err' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then lt_cv_cc_needs_belf=yes else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! lt_cv_cc_needs_belf=no fi ! rm -f conftest.err conftest.$ac_objext \ ! conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ! ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ! ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ! ac_compiler_gnu=$ac_cv_c_compiler_gnu fi ! echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 ! echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; esac # Save cache, so that ltconfig can load it ! cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure ! # scripts and configure runs, see configure's option --config-cache. ! # It is not useful on other systems. If it contains results you don't ! # want to keep, you may remove or edit it. # ! # config.status only pays attention to the cache file if you give it ! # the --recheck option to rerun configure. # ! # `ac_cv_env_foo' variables (set or unset) will be overridden when ! # loading this file, other *unset* `ac_cv_foo' will be assigned the ! # following values. ! ! _ACEOF ! # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ! { ! (set) 2>&1 | ! case `(ac_space=' '; set | grep ac_space) 2>&1` in ! *ac_space=\ *) ! # `set' does not quote correctly, so add quotes (double-quote ! # substitution turns \\\\ into \\, and sed turns \\ into \). ! sed -n \ ! "s/'/'\\\\''/g; ! s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ! ;; ! *) ! # `set' quotes correctly as required by POSIX, so do not add quotes. ! sed -n \ ! "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ! ;; ! esac; ! } | ! sed ' ! t clear ! : clear ! s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ ! t end ! /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ ! : end' >>confcache ! if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then ! test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" ! cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache # Actually configure libtool. ac_aux_dir is where install-sh is found. AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ *************** objext="$OBJEXT" exeext="$EXEEXT" reload *** 2479,2493 **** deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \ ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \ ! || { echo "configure: error: libtool configure failed" 1>&2; exit 1; } # Reload cache, that may have been modified by ltconfig if test -r "$cache_file"; then ! echo "loading cache $cache_file" ! . $cache_file else ! echo "creating cache $cache_file" ! > $cache_file fi --- 3928,3953 ---- deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \ ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \ ! || { { echo "$as_me:$LINENO: error: libtool configure failed" >&5 ! echo "$as_me: error: libtool configure failed" >&2;} ! { (exit 1); exit 1; }; } # Reload cache, that may have been modified by ltconfig if test -r "$cache_file"; then ! # Some versions of bash will fail to source /dev/null (special ! # files actually), so we avoid doing that. ! if test -f "$cache_file"; then ! { echo "$as_me:$LINENO: loading cache $cache_file" >&5 ! echo "$as_me: loading cache $cache_file" >&6;} ! case $cache_file in ! [\\/]* | ?:[\\/]* ) . $cache_file;; ! *) . ./$cache_file;; ! esac ! fi else ! { echo "$as_me:$LINENO: creating cache $cache_file" >&5 ! echo "$as_me: creating cache $cache_file" >&6;} ! >$cache_file fi *************** LIBTOOL='$(SHELL) $(top_builddir)/libtoo *** 2501,2800 **** # clobbered by the next message. exec 5>>./config.log - - - - - test "$AR" || AR=ar ! if test "$RANLIB"; then : ! ! else ! # Extract the first word of "ranlib", so it can be a program name with args. ! set dummy ranlib; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2519: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! if test -n "$RANLIB"; then ! ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_prog_RANLIB="ranlib" ! break fi ! done ! IFS="$ac_save_ifs" ! test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" ! fi ! fi ! RANLIB="$ac_cv_prog_RANLIB" ! if test -n "$RANLIB"; then ! echo "$ac_t""$RANLIB" 1>&6 else ! echo "$ac_t""no" 1>&6 fi fi ! # Find a good install program. We prefer a C program (faster), ! # so one script is as good as another. But avoid the broken or ! # incompatible versions: ! # SysV /etc/install, /usr/sbin/install ! # SunOS /usr/etc/install ! # IRIX /sbin/install ! # AIX /bin/install ! # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag ! # AFS /usr/afsws/bin/install, which mishandles nonexistent args ! # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" ! # ./install, which can be erroneously created by make from ./install.sh. ! echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:2559: checking for a BSD compatible install" >&5 ! if test -z "$INSTALL"; then ! if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" ! for ac_dir in $PATH; do ! # Account for people who put trailing slashes in PATH elements. ! case "$ac_dir/" in ! /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; ! *) ! # OSF1 and SCO ODT 3.0 have their own names for install. ! # Don't use installbsd from OSF since it installs stuff as root ! # by default. ! for ac_prog in ginstall scoinst install; do ! if test -f $ac_dir/$ac_prog; then ! if test $ac_prog = install && ! grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then ! # AIX install. It has an incompatible calling convention. ! : ! else ! ac_cv_path_install="$ac_dir/$ac_prog -c" ! break 2 ! fi ! fi ! done ! ;; ! esac ! done ! IFS="$ac_save_IFS" fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL="$ac_install_sh" - fi - fi - echo "$ac_t""$INSTALL" 1>&6 ! # Use test -z because SunOS4 sh mishandles braces in ${var-val}. ! # It thinks the first close brace ends the variable substitution. ! test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' ! test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' - test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' ! echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 ! echo "configure:2612: checking whether ${MAKE-make} sets \${MAKE}" >&5 ! set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` ! if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftestmake <<\EOF all: ! @echo 'ac_maketemp="${MAKE}"' ! EOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. ! eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi ! rm -f conftestmake fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then ! echo "$ac_t""yes" 1>&6 SET_MAKE= else ! echo "$ac_t""no" 1>&6 SET_MAKE="MAKE=${MAKE-make}" fi # Sanity check for the cross-compilation case: ! echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 ! echo "configure:2641: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then ! if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! # This must be in double quotes, not single quotes, because CPP may get ! # substituted into the Makefile and "${CC-cc}" will confuse make. ! CPP="${CC-cc} -E" # On the NeXT, cc -E runs the code through the compiler's parser, ! # not just through cpp. ! cat > conftest.$ac_ext < ! Syntax Error ! EOF ! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2662: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ! if test -z "$ac_err"; then : else ! echo "$ac_err" >&5 ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! CPP="${CC-cc} -E -traditional-cpp" ! cat > conftest.$ac_ext < ! Syntax Error ! EOF ! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ! if test -z "$ac_err"; then : else ! echo "$ac_err" >&5 ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! CPP="${CC-cc} -nologo -E" ! cat > conftest.$ac_ext < ! Syntax Error ! EOF ! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ! if test -z "$ac_err"; then : else ! echo "$ac_err" >&5 ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! CPP=/lib/cpp fi ! rm -f conftest* fi rm -f conftest* fi rm -f conftest* ! ac_cv_prog_CPP="$CPP" fi ! CPP="$ac_cv_prog_CPP" else ! ac_cv_prog_CPP="$CPP" fi ! echo "$ac_t""$CPP" 1>&6 ! ac_safe=`echo "stdio.h" | sed 'y%./+-%__p_%'` ! echo $ac_n "checking for stdio.h""... $ac_c" 1>&6 ! echo "configure:2722: checking for stdio.h" >&5 ! if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext < ! EOF ! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ! if test -z "$ac_err"; then ! rm -rf conftest* ! eval "ac_cv_header_$ac_safe=yes" else ! echo "$ac_err" >&5 ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_header_$ac_safe=no" fi ! rm -f conftest* fi ! if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then ! echo "$ac_t""yes" 1>&6 : else ! echo "$ac_t""no" 1>&6 ! { echo "configure: error: Can't find stdio.h. You must have a usable C system for the target already installed, at least including headers and, preferably, the library, before you can configure ! the Objective C runtime system. If necessary, install gcc now with ! \`LANGUAGES=c', then the target library, then build with \`LANGUAGES=objc'." 1>&2; exit 1; } fi ! echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 ! echo "configure:2760: checking for ANSI C header files" >&5 ! if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext < #include #include #include ! EOF ! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ! if test -z "$ac_err"; then ! rm -rf conftest* ac_cv_header_stdc=yes else ! echo "$ac_err" >&5 ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! ac_cv_header_stdc=no fi ! rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. ! cat > conftest.$ac_ext < ! EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "memchr" >/dev/null 2>&1; then : else - rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* --- 3961,4827 ---- # clobbered by the next message. exec 5>>./config.log ! ! ! ! if test "x$CC" != xcc; then ! echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 ! echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6 else ! echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 ! echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6 ! fi ! set dummy $CC; ac_cc=`echo $2 | ! sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` ! if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! int ! main () ! { ! ! ; ! return 0; ! } ! _ACEOF ! # Make sure it works both with $CC and with simple cc. ! # We do the test twice because some compilers refuse to overwrite an ! # existing .o file with -o, though they will create one. ! ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5' ! if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; ! then ! eval ac_cv_prog_cc_${ac_cc}_c_o=yes ! if test "x$CC" != xcc; then ! # Test first that cc exists at all. ! if { ac_try='cc -c conftest.$ac_ext >&5' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5' ! if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; ! then ! # cc works too. ! : ! else ! # cc exists but doesn't like -o. ! eval ac_cv_prog_cc_${ac_cc}_c_o=no ! fi fi ! fi else ! eval ac_cv_prog_cc_${ac_cc}_c_o=no fi + rm -f conftest* fi ! if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then ! echo "$as_me:$LINENO: result: yes" >&5 ! echo "${ECHO_T}yes" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 ! ! cat >>confdefs.h <<\_ACEOF ! #define NO_MINUS_C_MINUS_O 1 ! _ACEOF fi ! # expand $ac_aux_dir to an absolute path ! am_aux_dir=`cd $ac_aux_dir && pwd` ! # FIXME: we rely on the cache variable name because ! # there is no other way. ! set dummy $CC ! ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` ! if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then ! # Losing compiler, so override with the script. ! # FIXME: It is wrong to rewrite CC. ! # But if we don't then we get into trouble of one sort or another. ! # A longer-term fix would be to have automake use am__CC in this case, ! # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" ! CC="$am_aux_dir/compile $CC" ! fi ! echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 ! echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 ! set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` ! if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.make <<\_ACEOF all: ! @echo 'ac_maketemp="$(MAKE)"' ! _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. ! eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi ! rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then ! echo "$as_me:$LINENO: result: yes" >&5 ! echo "${ECHO_T}yes" >&6 SET_MAKE= else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi + # ------- + # Headers + # ------- + # Sanity check for the cross-compilation case: ! ac_ext=c ! ac_cpp='$CPP $CPPFLAGS' ! ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ! ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ! ac_compiler_gnu=$ac_cv_c_compiler_gnu ! echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 ! echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then ! if test "${ac_cv_prog_CPP+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! # Double quotes because CPP needs to be expanded ! for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" ! do ! ac_preproc_ok=false ! for ac_c_preproc_warn_flag in '' yes ! do ! # Use a header file that comes with gcc, so configuring glibc ! # with a fresh cross-compiler works. ! # Prefer to if __STDC__ is defined, since ! # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, ! # not just through cpp. "Syntax error" is here to catch this case. ! cat >conftest.$ac_ext <<_ACEOF ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #ifdef __STDC__ ! # include ! #else ! # include ! #endif ! Syntax error ! _ACEOF ! if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 ! (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } >/dev/null; then ! if test -s conftest.err; then ! ac_cpp_err=$ac_c_preproc_warn_flag ! ac_cpp_err=$ac_cpp_err$ac_c_werror_flag ! else ! ac_cpp_err= ! fi ! else ! ac_cpp_err=yes ! fi ! if test -z "$ac_cpp_err"; then : else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! # Broken: fails on valid input. ! continue ! fi ! rm -f conftest.err conftest.$ac_ext ! ! # OK, works on sane cases. Now check whether non-existent headers ! # can be detected and how. ! cat >conftest.$ac_ext <<_ACEOF ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #include ! _ACEOF ! if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 ! (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } >/dev/null; then ! if test -s conftest.err; then ! ac_cpp_err=$ac_c_preproc_warn_flag ! ac_cpp_err=$ac_cpp_err$ac_c_werror_flag ! else ! ac_cpp_err= ! fi ! else ! ac_cpp_err=yes ! fi ! if test -z "$ac_cpp_err"; then ! # Broken: success on invalid input. ! continue ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! # Passes both tests. ! ac_preproc_ok=: ! break ! fi ! rm -f conftest.err conftest.$ac_ext ! ! done ! # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. ! rm -f conftest.err conftest.$ac_ext ! if $ac_preproc_ok; then ! break ! fi ! ! done ! ac_cv_prog_CPP=$CPP ! ! fi ! CPP=$ac_cv_prog_CPP ! else ! ac_cv_prog_CPP=$CPP ! fi ! echo "$as_me:$LINENO: result: $CPP" >&5 ! echo "${ECHO_T}$CPP" >&6 ! ac_preproc_ok=false ! for ac_c_preproc_warn_flag in '' yes ! do ! # Use a header file that comes with gcc, so configuring glibc ! # with a fresh cross-compiler works. ! # Prefer to if __STDC__ is defined, since ! # exists even on freestanding compilers. ! # On the NeXT, cc -E runs the code through the compiler's parser, ! # not just through cpp. "Syntax error" is here to catch this case. ! cat >conftest.$ac_ext <<_ACEOF ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #ifdef __STDC__ ! # include ! #else ! # include ! #endif ! Syntax error ! _ACEOF ! if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 ! (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } >/dev/null; then ! if test -s conftest.err; then ! ac_cpp_err=$ac_c_preproc_warn_flag ! ac_cpp_err=$ac_cpp_err$ac_c_werror_flag ! else ! ac_cpp_err= ! fi ! else ! ac_cpp_err=yes ! fi ! if test -z "$ac_cpp_err"; then : else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! # Broken: fails on valid input. ! continue ! fi ! rm -f conftest.err conftest.$ac_ext ! ! # OK, works on sane cases. Now check whether non-existent headers ! # can be detected and how. ! cat >conftest.$ac_ext <<_ACEOF ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #include ! _ACEOF ! if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 ! (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } >/dev/null; then ! if test -s conftest.err; then ! ac_cpp_err=$ac_c_preproc_warn_flag ! ac_cpp_err=$ac_cpp_err$ac_c_werror_flag ! else ! ac_cpp_err= ! fi ! else ! ac_cpp_err=yes ! fi ! if test -z "$ac_cpp_err"; then ! # Broken: success on invalid input. ! continue ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! # Passes both tests. ! ac_preproc_ok=: ! break ! fi ! rm -f conftest.err conftest.$ac_ext ! ! done ! # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. ! rm -f conftest.err conftest.$ac_ext ! if $ac_preproc_ok; then : else ! { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check ! See \`config.log' for more details." >&5 ! echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check ! See \`config.log' for more details." >&2;} ! { (exit 1); exit 1; }; } fi ! ! ac_ext=c ! ac_cpp='$CPP $CPPFLAGS' ! ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ! ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ! ac_compiler_gnu=$ac_cv_c_compiler_gnu ! ! ! echo "$as_me:$LINENO: checking for egrep" >&5 ! echo $ECHO_N "checking for egrep... $ECHO_C" >&6 ! if test "${ac_cv_prog_egrep+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! if echo a | (grep -E '(a|b)') >/dev/null 2>&1 ! then ac_cv_prog_egrep='grep -E' ! else ac_cv_prog_egrep='egrep' ! fi ! fi ! echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 ! echo "${ECHO_T}$ac_cv_prog_egrep" >&6 ! EGREP=$ac_cv_prog_egrep ! ! ! echo "$as_me:$LINENO: checking for ANSI C header files" >&5 ! echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 ! if test "${ac_cv_header_stdc+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! cat >conftest.$ac_ext <<_ACEOF ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #include ! #include ! #include ! #include ! ! int ! main () ! { ! ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -z "$ac_c_werror_flag" ! || test ! -s conftest.err' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_header_stdc=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_header_stdc=no ! fi ! rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ! ! if test $ac_cv_header_stdc = yes; then ! # SunOS 4.x string.h does not declare mem*, contrary to ANSI. ! cat >conftest.$ac_ext <<_ACEOF ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #include ! ! _ACEOF ! if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! $EGREP "memchr" >/dev/null 2>&1; then ! : ! else ! ac_cv_header_stdc=no fi rm -f conftest* + + fi + + if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : + else + ac_cv_header_stdc=no fi rm -f conftest* ! fi ! ! if test $ac_cv_header_stdc = yes; then ! # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. ! if test "$cross_compiling" = yes; then ! : else ! cat >conftest.$ac_ext <<_ACEOF ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #include ! #if ((' ' & 0x0FF) == 0x020) ! # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') ! # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) ! #else ! # define ISLOWER(c) \ ! (('a' <= (c) && (c) <= 'i') \ ! || ('j' <= (c) && (c) <= 'r') \ ! || ('s' <= (c) && (c) <= 'z')) ! # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) ! #endif ! ! #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) ! int ! main () ! { ! int i; ! for (i = 0; i < 256; i++) ! if (XOR (islower (i), ISLOWER (i)) ! || toupper (i) != TOUPPER (i)) ! exit(2); ! exit (0); ! } ! _ACEOF ! rm -f conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! : ! else ! echo "$as_me: program exited with status $ac_status" >&5 ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ( exit $ac_status ) ! ac_cv_header_stdc=no fi ! rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ! fi ! fi ! fi ! echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 ! echo "${ECHO_T}$ac_cv_header_stdc" >&6 ! if test $ac_cv_header_stdc = yes; then ! cat >>confdefs.h <<\_ACEOF ! #define STDC_HEADERS 1 ! _ACEOF ! ! fi ! ! # On IRIX 5.3, sys/types and inttypes.h are conflicting. ! ! ! ! ! ! ! ! ! ! for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ ! inttypes.h stdint.h unistd.h ! do ! as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` ! echo "$as_me:$LINENO: checking for $ac_header" >&5 ! echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 ! if eval "test \"\${$as_ac_Header+set}\" = set"; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! $ac_includes_default ! ! #include <$ac_header> ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -z "$ac_c_werror_flag" ! || test ! -s conftest.err' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! eval "$as_ac_Header=yes" ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! eval "$as_ac_Header=no" ! fi ! rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 ! echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ! if test `eval echo '${'$as_ac_Header'}'` = yes; then ! cat >>confdefs.h <<_ACEOF ! #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 ! _ACEOF ! ! fi ! ! done ! ! ! if test "${ac_cv_header_stdio_h+set}" = set; then ! echo "$as_me:$LINENO: checking for stdio.h" >&5 ! echo $ECHO_N "checking for stdio.h... $ECHO_C" >&6 ! if test "${ac_cv_header_stdio_h+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! fi ! echo "$as_me:$LINENO: result: $ac_cv_header_stdio_h" >&5 ! echo "${ECHO_T}$ac_cv_header_stdio_h" >&6 ! else ! # Is the header compilable? ! echo "$as_me:$LINENO: checking stdio.h usability" >&5 ! echo $ECHO_N "checking stdio.h usability... $ECHO_C" >&6 ! cat >conftest.$ac_ext <<_ACEOF ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! $ac_includes_default #include ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -z "$ac_c_werror_flag" ! || test ! -s conftest.err' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_header_compiler=yes else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_header_compiler=no fi ! rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ! echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 ! echo "${ECHO_T}$ac_header_compiler" >&6 ! ! # Is the header present? ! echo "$as_me:$LINENO: checking stdio.h presence" >&5 ! echo $ECHO_N "checking stdio.h presence... $ECHO_C" >&6 ! cat >conftest.$ac_ext <<_ACEOF ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #include ! _ACEOF ! if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 ! (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } >/dev/null; then ! if test -s conftest.err; then ! ac_cpp_err=$ac_c_preproc_warn_flag ! ac_cpp_err=$ac_cpp_err$ac_c_werror_flag ! else ! ac_cpp_err= ! fi ! else ! ac_cpp_err=yes fi ! if test -z "$ac_cpp_err"; then ! ac_header_preproc=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_header_preproc=no ! fi ! rm -f conftest.err conftest.$ac_ext ! echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 ! echo "${ECHO_T}$ac_header_preproc" >&6 ! ! # So? What about this header? ! case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in ! yes:no: ) ! { echo "$as_me:$LINENO: WARNING: stdio.h: accepted by the compiler, rejected by the preprocessor!" >&5 ! echo "$as_me: WARNING: stdio.h: accepted by the compiler, rejected by the preprocessor!" >&2;} ! { echo "$as_me:$LINENO: WARNING: stdio.h: proceeding with the compiler's result" >&5 ! echo "$as_me: WARNING: stdio.h: proceeding with the compiler's result" >&2;} ! ac_header_preproc=yes ! ;; ! no:yes:* ) ! { echo "$as_me:$LINENO: WARNING: stdio.h: present but cannot be compiled" >&5 ! echo "$as_me: WARNING: stdio.h: present but cannot be compiled" >&2;} ! { echo "$as_me:$LINENO: WARNING: stdio.h: check for missing prerequisite headers?" >&5 ! echo "$as_me: WARNING: stdio.h: check for missing prerequisite headers?" >&2;} ! { echo "$as_me:$LINENO: WARNING: stdio.h: see the Autoconf documentation" >&5 ! echo "$as_me: WARNING: stdio.h: see the Autoconf documentation" >&2;} ! { echo "$as_me:$LINENO: WARNING: stdio.h: section \"Present But Cannot Be Compiled\"" >&5 ! echo "$as_me: WARNING: stdio.h: section \"Present But Cannot Be Compiled\"" >&2;} ! { echo "$as_me:$LINENO: WARNING: stdio.h: proceeding with the preprocessor's result" >&5 ! echo "$as_me: WARNING: stdio.h: proceeding with the preprocessor's result" >&2;} ! { echo "$as_me:$LINENO: WARNING: stdio.h: in the future, the compiler will take precedence" >&5 ! echo "$as_me: WARNING: stdio.h: in the future, the compiler will take precedence" >&2;} ! ( ! cat <<\_ASBOX ! ## ----------------------------------------- ## ! ## Report this to the package-unused lists. ## ! ## ----------------------------------------- ## ! _ASBOX ! ) | ! sed "s/^/$as_me: WARNING: /" >&2 ! ;; ! esac ! echo "$as_me:$LINENO: checking for stdio.h" >&5 ! echo $ECHO_N "checking for stdio.h... $ECHO_C" >&6 ! if test "${ac_cv_header_stdio_h+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! ac_cv_header_stdio_h=$ac_header_preproc ! fi ! echo "$as_me:$LINENO: result: $ac_cv_header_stdio_h" >&5 ! echo "${ECHO_T}$ac_cv_header_stdio_h" >&6 ! ! fi ! if test $ac_cv_header_stdio_h = yes; then : else ! { { echo "$as_me:$LINENO: error: Can't find stdio.h. You must have a usable C system for the target already installed, at least including headers and, preferably, the library, before you can configure ! the Objective C runtime system. If necessary, install gcc now with ! \`LANGUAGES=c', then the target library, then build with \`LANGUAGES=objc'." >&5 ! echo "$as_me: error: Can't find stdio.h. ! You must have a usable C system for the target already installed, at least ! including headers and, preferably, the library, before you can configure ! the Objective C runtime system. If necessary, install gcc now with ! \`LANGUAGES=c', then the target library, then build with \`LANGUAGES=objc'." >&2;} ! { (exit 1); exit 1; }; } fi ! ! echo "$as_me:$LINENO: checking for ANSI C header files" >&5 ! echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 ! if test "${ac_cv_header_stdc+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ #include #include #include #include ! ! int ! main () ! { ! ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -z "$ac_c_werror_flag" ! || test ! -s conftest.err' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ac_cv_header_stdc=yes else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_header_stdc=no fi ! rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. ! cat >conftest.$ac_ext <<_ACEOF ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ #include ! ! _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* *************** fi *** 2803,2818 **** if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. ! cat > conftest.$ac_ext < ! EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "free" >/dev/null 2>&1; then : else - rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* --- 4830,4848 ---- if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. ! cat >conftest.$ac_ext <<_ACEOF ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ #include ! ! _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* *************** fi *** 2821,3350 **** if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. ! if test "$cross_compiling" = yes; then : else ! cat > conftest.$ac_ext < ! #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') ! #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) ! #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) ! int main () { int i; for (i = 0; i < 256; i++) ! if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); ! exit (0); } ! EOF ! if { (eval echo configure:2840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ! then : else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -fr conftest* ! ac_cv_header_stdc=no fi ! rm -fr conftest* fi - fi fi ! ! echo "$ac_t""$ac_cv_header_stdc" 1>&6 if test $ac_cv_header_stdc = yes; then ! cat >> confdefs.h <<\EOF #define STDC_HEADERS 1 ! EOF fi ! for ac_hdr in sched.h do ! ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ! echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:2868: checking for $ac_hdr" >&5 ! if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext < ! EOF ! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ! if test -z "$ac_err"; then ! rm -rf conftest* ! eval "ac_cv_header_$ac_safe=yes" else ! echo "$ac_err" >&5 ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_header_$ac_safe=no" fi ! rm -f conftest* fi ! if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then ! echo "$ac_t""yes" 1>&6 ! ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` ! cat >> confdefs.h <&6 fi done ! # Determine CFLAGS for gthread. ! echo $ac_n "checking for gthread cflags""... $ac_c" 1>&6 ! echo "configure:2908: checking for gthread cflags" >&5 ! if eval "test \"`echo '$''{'objc_cv_gthread_flags'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else if test -f "$r"/gcc/Makefile then objc_cv_gthread_flags=`grep \^GTHREAD_FLAGS "$r"/gcc/Makefile | awk -F= '{ print $2 }'` else ! { echo "configure: error: not found" 1>&2; exit 1; } fi fi ! ! echo "$ac_t""$objc_cv_gthread_flags" 1>&6 GTHREAD_FLAGS=$objc_cv_gthread_flags ! # Check whether --enable-objc-gc or --disable-objc-gc was given. ! if test "${enable_objc_gc+set}" = set; then ! enableval="$enable_objc_gc" ! if [ x$enable_objc_gc = xno ]; then ! OBJC_BOEHM_GC='' else ! OBJC_BOEHM_GC=libobjc_gc.la fi else ! OBJC_BOEHM_GC='' fi ! # We need multilib support, but only if configuring for the target. ! trap '' 1 2 15 ! cat > confcache <<\EOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure ! # scripts and configure runs. It is not useful on other systems. ! # If it contains results you don't want to keep, you may remove or edit it. # ! # By default, configure uses ./config.cache as the cache file, ! # creating it if it does not exist already. You can give configure ! # the --cache-file=FILE option to use a different cache file; that is ! # what configure does when it calls configure scripts in ! # subdirectories, so they share the cache. ! # Giving --cache-file=/dev/null disables caching, for debugging configure. ! # config.status only pays attention to the cache file if you give it the ! # --recheck option to rerun configure. # ! EOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ! (set) 2>&1 | ! case `(ac_space=' '; set | grep ac_space) 2>&1` in ! *ac_space=\ *) ! # `set' does not quote correctly, so add quotes (double-quote substitution ! # turns \\\\ into \\, and sed turns \\ into \). ! sed -n \ ! -e "s/'/'\\\\''/g" \ ! -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" ! ;; ! *) ! # `set' quotes correctly as required by POSIX, so do not add quotes. ! sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ! ;; ! esac >> confcache ! if cmp -s $cache_file confcache; then ! : ! else if test -w $cache_file; then ! echo "updating cache $cache_file" ! cat confcache > $cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache - trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' ! # Any assignment to VPATH causes Sun make to only execute ! # the first set of double-colon rules, so remove it if not needed. ! # If there is a colon in the path, we need to keep it. if test "x$srcdir" = x.; then ! ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' fi - trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - DEFS=-DHAVE_CONFIG_H ! # Without the "./", some shells look in PATH for config.status. ! : ${CONFIG_STATUS=./config.status} ! echo creating $CONFIG_STATUS ! rm -f $CONFIG_STATUS ! cat > $CONFIG_STATUS </dev/null | sed 1q`: - # - # $0 $ac_configure_args - # # Compiler output produced by configure, useful for debugging ! # configure, is in ./config.log if it exists. ! ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" ! for ac_option do ! case "\$ac_option" in ! -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ! echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" ! exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; ! -version | --version | --versio | --versi | --vers | --ver | --ve | --v) ! echo "$CONFIG_STATUS generated by autoconf version 2.13" ! exit 0 ;; ! -help | --help | --hel | --he | --h) ! echo "\$ac_cs_usage"; exit 0 ;; ! *) echo "\$ac_cs_usage"; exit 1 ;; ! esac done ! ac_given_srcdir=$srcdir ! ac_given_INSTALL="$INSTALL" ! trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 ! EOF ! cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF - $ac_vpsub - $extrasub - s%@SHELL@%$SHELL%g - s%@CFLAGS@%$CFLAGS%g - s%@CPPFLAGS@%$CPPFLAGS%g - s%@CXXFLAGS@%$CXXFLAGS%g - s%@FFLAGS@%$FFLAGS%g - s%@DEFS@%$DEFS%g - s%@LDFLAGS@%$LDFLAGS%g - s%@LIBS@%$LIBS%g - s%@exec_prefix@%$exec_prefix%g - s%@prefix@%$prefix%g - s%@program_transform_name@%$program_transform_name%g - s%@bindir@%$bindir%g - s%@sbindir@%$sbindir%g - s%@libexecdir@%$libexecdir%g - s%@datadir@%$datadir%g - s%@sysconfdir@%$sysconfdir%g - s%@sharedstatedir@%$sharedstatedir%g - s%@localstatedir@%$localstatedir%g - s%@libdir@%$libdir%g - s%@includedir@%$includedir%g - s%@oldincludedir@%$oldincludedir%g - s%@infodir@%$infodir%g - s%@mandir@%$mandir%g - s%@toplevel_srcdir@%$toplevel_srcdir%g - s%@host@%$host%g - s%@host_alias@%$host_alias%g - s%@host_cpu@%$host_cpu%g - s%@host_vendor@%$host_vendor%g - s%@host_os@%$host_os%g - s%@target@%$target%g - s%@target_alias@%$target_alias%g - s%@target_cpu@%$target_cpu%g - s%@target_vendor@%$target_vendor%g - s%@target_os@%$target_os%g - s%@build@%$build%g - s%@build_alias@%$build_alias%g - s%@build_cpu@%$build_cpu%g - s%@build_vendor@%$build_vendor%g - s%@build_os@%$build_os%g - s%@glibcpp_builddir@%$glibcpp_builddir%g - s%@glibcpp_srcdir@%$glibcpp_srcdir%g - s%@LN_S@%$LN_S%g - s%@CC@%$CC%g - s%@AS@%$AS%g - s%@AR@%$AR%g - s%@RANLIB@%$RANLIB%g - s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g - s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g - s%@INSTALL_DATA@%$INSTALL_DATA%g - s%@EXEEXT@%$EXEEXT%g - s%@gcc_version@%$gcc_version%g - s%@gcc_version_trigger@%$gcc_version_trigger%g - s%@glibcpp_prefixdir@%$glibcpp_prefixdir%g - s%@glibcpp_toolexecdir@%$glibcpp_toolexecdir%g - s%@glibcpp_toolexeclibdir@%$glibcpp_toolexeclibdir%g - s%@OBJEXT@%$OBJEXT%g - s%@STRIP@%$STRIP%g - s%@DLLTOOL@%$DLLTOOL%g - s%@OBJDUMP@%$OBJDUMP%g - s%@LIBTOOL@%$LIBTOOL%g - s%@SET_MAKE@%$SET_MAKE%g - s%@CPP@%$CPP%g - s%@GTHREAD_FLAGS@%$GTHREAD_FLAGS%g - s%@OBJC_BOEHM_GC@%$OBJC_BOEHM_GC%g ! CEOF ! EOF - cat >> $CONFIG_STATUS <<\EOF ! # Split the substitutions into bite-sized pieces for seds with ! # small command number limits, like on Digital OSF/1 and HP-UX. ! ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. ! ac_file=1 # Number of current file. ! ac_beg=1 # First line for current file. ! ac_end=$ac_max_sed_cmds # Line after last line for current file. ! ac_more_lines=: ! ac_sed_cmds="" ! while $ac_more_lines; do ! if test $ac_beg -gt 1; then ! sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file else ! sed "${ac_end}q" conftest.subs > conftest.s$ac_file fi ! if test ! -s conftest.s$ac_file; then ! ac_more_lines=false ! rm -f conftest.s$ac_file else ! if test -z "$ac_sed_cmds"; then ! ac_sed_cmds="sed -f conftest.s$ac_file" ! else ! ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" ! fi ! ac_file=`expr $ac_file + 1` ! ac_beg=$ac_end ! ac_end=`expr $ac_end + $ac_max_sed_cmds` fi done ! if test -z "$ac_sed_cmds"; then ! ac_sed_cmds=cat fi - EOF ! cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF ! for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then ! # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". ! case "$ac_file" in ! *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ! ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; ! *) ac_file_in="${ac_file}.in" ;; esac ! # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. ! # Remove last slash and all that follows it. Not all systems have dirname. ! ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` ! if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then ! # The file is in a subdirectory. ! test ! -d "$ac_dir" && mkdir "$ac_dir" ! ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" ! # A "../" for each directory in $ac_dir_suffix. ! ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` ! else ! ac_dir_suffix= ac_dots= fi ! case "$ac_given_srcdir" in ! .) srcdir=. ! if test -z "$ac_dots"; then top_srcdir=. ! else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; ! /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; ! *) # Relative path. ! srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" ! top_srcdir="$ac_dots$ac_given_srcdir" ;; esac ! case "$ac_given_INSTALL" in ! [/$]*) INSTALL="$ac_given_INSTALL" ;; ! *) INSTALL="$ac_dots$ac_given_INSTALL" ;; ! esac ! echo creating "$ac_file" ! rm -f "$ac_file" ! configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." ! case "$ac_file" in ! *Makefile*) ac_comsub="1i\\ ! # $configure_input" ;; ! *) ac_comsub= ;; esac ! ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` ! sed -e "$ac_comsub ! s%@configure_input@%$configure_input%g ! s%@srcdir@%$srcdir%g ! s%@top_srcdir@%$top_srcdir%g ! s%@INSTALL@%$INSTALL%g ! " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file ! fi; done ! rm -f conftest.s* # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ! ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' ! ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' ! ac_dC='\3' ! ac_dD='%g' ! # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". ! ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ! ac_uB='\([ ]\)%\1#\2define\3' ac_uC=' ' ! ac_uD='\4%g' ! # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ! ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ! ac_eB='$%\1#\2define\3' ! ac_eC=' ' ! ac_eD='%g' ! if test "${CONFIG_HEADERS+set}" != set; then ! EOF ! cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF ! fi ! for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". ! case "$ac_file" in ! *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ! ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; ! *) ac_file_in="${ac_file}.in" ;; esac ! echo creating $ac_file ! rm -f conftest.frag conftest.in conftest.out ! ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` ! cat $ac_file_inputs > conftest.in ! EOF ! # Transform confdefs.h into a sed script conftest.vals that substitutes ! # the proper values into config.h.in to produce config.h. And first: ! # Protect against being on the right side of a sed subst in config.status. ! # Protect against being in an unquoted here document in config.status. ! rm -f conftest.vals ! cat > conftest.hdr <<\EOF ! s/[\\&%]/\\&/g ! s%[\\$`]%\\&%g ! s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp ! s%ac_d%ac_u%gp ! s%ac_u%ac_e%gp ! EOF ! sed -n -f conftest.hdr confdefs.h > conftest.vals ! rm -f conftest.hdr # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. ! cat >> conftest.vals <<\EOF ! s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% ! EOF ! # Break up conftest.vals because some shells have a limit on ! # the size of here documents, and old seds have small limits too. rm -f conftest.tail ! while : do ! ac_lines=`grep -c . conftest.vals` ! # grep -c gives empty output for an empty file on some AIX systems. ! if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi ! # Write a limited-size here document to conftest.frag. ! echo ' cat > conftest.frag <> $CONFIG_STATUS ! sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS echo 'CEOF ! sed -f conftest.frag conftest.in > conftest.out ! rm -f conftest.in ! mv conftest.out conftest.in ! ' >> $CONFIG_STATUS ! sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail ! rm -f conftest.vals ! mv conftest.tail conftest.vals done ! rm -f conftest.vals ! cat >> $CONFIG_STATUS <<\EOF ! rm -f conftest.frag conftest.h ! echo "/* $ac_file. Generated automatically by configure. */" > conftest.h ! cat conftest.in >> conftest.h ! rm -f conftest.in ! if cmp -s $ac_file conftest.h 2>/dev/null; then ! echo "$ac_file is unchanged" ! rm -f conftest.h else ! # Remove last slash and all that follows it. Not all systems have dirname. ! ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` ! if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then ! # The file is in a subdirectory. ! test ! -d "$ac_dir" && mkdir "$ac_dir" fi ! rm -f $ac_file ! mv conftest.h $ac_file fi ! fi; done ! EOF ! cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF ! test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h ! if test -n "$CONFIG_FILES"; then if test -n "${with_target_subdir}"; then # FIXME: We shouldn't need to set ac_file ac_file=Makefile LD="${ORIGINAL_LD_FOR_MULTILIBS}" . ${toplevel_srcdir}/config-ml.in fi ! fi ! exit 0 ! EOF chmod +x $CONFIG_STATUS ! rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 --- 4851,6484 ---- if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. ! if test "$cross_compiling" = yes; then : else ! cat >conftest.$ac_ext <<_ACEOF ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ #include ! #if ((' ' & 0x0FF) == 0x020) ! # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') ! # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) ! #else ! # define ISLOWER(c) \ ! (('a' <= (c) && (c) <= 'i') \ ! || ('j' <= (c) && (c) <= 'r') \ ! || ('s' <= (c) && (c) <= 'z')) ! # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) ! #endif ! #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) ! int ! main () ! { ! int i; ! for (i = 0; i < 256; i++) ! if (XOR (islower (i), ISLOWER (i)) ! || toupper (i) != TOUPPER (i)) ! exit(2); ! exit (0); ! } ! _ACEOF ! rm -f conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then : else ! echo "$as_me: program exited with status $ac_status" >&5 ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ( exit $ac_status ) ! ac_cv_header_stdc=no fi ! rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi ! echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 ! echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then ! ! cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 ! _ACEOF fi ! ! for ac_header in sched.h do ! as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` ! if eval "test \"\${$as_ac_Header+set}\" = set"; then ! echo "$as_me:$LINENO: checking for $ac_header" >&5 ! echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 ! if eval "test \"\${$as_ac_Header+set}\" = set"; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! fi ! echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 ! echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else ! # Is the header compilable? ! echo "$as_me:$LINENO: checking $ac_header usability" >&5 ! echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 ! cat >conftest.$ac_ext <<_ACEOF ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! $ac_includes_default ! #include <$ac_header> ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -z "$ac_c_werror_flag" ! || test ! -s conftest.err' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_header_compiler=yes else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_header_compiler=no fi ! rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ! echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 ! echo "${ECHO_T}$ac_header_compiler" >&6 ! ! # Is the header present? ! echo "$as_me:$LINENO: checking $ac_header presence" >&5 ! echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 ! cat >conftest.$ac_ext <<_ACEOF ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #include <$ac_header> ! _ACEOF ! if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 ! (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } >/dev/null; then ! if test -s conftest.err; then ! ac_cpp_err=$ac_c_preproc_warn_flag ! ac_cpp_err=$ac_cpp_err$ac_c_werror_flag ! else ! ac_cpp_err= ! fi ! else ! ac_cpp_err=yes fi ! if test -z "$ac_cpp_err"; then ! ac_header_preproc=yes else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext + echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 + echo "${ECHO_T}$ac_header_preproc" >&6 + + # So? What about this header? + case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 + echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 + echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 + echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 + echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 + echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 + echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 + echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 + echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX + ## ----------------------------------------- ## + ## Report this to the package-unused lists. ## + ## ----------------------------------------- ## + _ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + esac + echo "$as_me:$LINENO: checking for $ac_header" >&5 + echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 + if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + eval "$as_ac_Header=\$ac_header_preproc" + fi + echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 + echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + + fi + if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF + #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 + _ACEOF + + fi + done ! # ----------- ! # Miscellanea ! # ----------- ! # Determine CFLAGS for gthread. ! # FIXME: the current implementation is dependent on the 'r' variable ! # passed down from the top level ! echo "$as_me:$LINENO: checking for gthread cflags" >&5 ! echo $ECHO_N "checking for gthread cflags... $ECHO_C" >&6 ! if test "${objc_cv_gthread_flags+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -f "$r"/gcc/Makefile then objc_cv_gthread_flags=`grep \^GTHREAD_FLAGS "$r"/gcc/Makefile | awk -F= '{ print $2 }'` else ! { { echo "$as_me:$LINENO: error: not found" >&5 ! echo "$as_me: error: not found" >&2;} ! { (exit 1); exit 1; }; } fi fi ! echo "$as_me:$LINENO: result: $objc_cv_gthread_flags" >&5 ! echo "${ECHO_T}$objc_cv_gthread_flags" >&6 GTHREAD_FLAGS=$objc_cv_gthread_flags ! echo "$as_me:$LINENO: checking for exception model to use" >&5 ! echo $ECHO_N "checking for exception model to use... $ECHO_C" >&6 ! ac_ext=c ! ac_cpp='$CPP $CPPFLAGS' ! ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ! ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ! ac_compiler_gnu=$ac_cv_c_compiler_gnu ! ! # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given. ! if test "${enable_sjlj_exceptions+set}" = set; then ! enableval="$enable_sjlj_exceptions" ! : else ! cat > conftest.$ac_ext << EOF ! #line 5113 "configure" ! @interface Frob ! @end ! @implementation Frob ! @end ! int proc(); ! int foo() ! { ! @try { ! return proc(); ! } ! @catch (Frob* ex) { ! return 0; ! } ! } ! EOF ! old_CFLAGS="$CFLAGS" ! CFLAGS="-x objective-c -fgnu-runtime -fobjc-exceptions -S" ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; then ! if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then ! enable_sjlj_exceptions=yes ! elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then ! enable_sjlj_exceptions=no ! fi fi + CFLAGS="$old_CFLAGS" + rm -f conftest* + fi; + if test x$enable_sjlj_exceptions = xyes; then + + cat >>confdefs.h <<\_ACEOF + #define SJLJ_EXCEPTIONS 1 + _ACEOF + + ac_exception_model_name=sjlj + elif test x$enable_sjlj_exceptions = xno; then + ac_exception_model_name="call frame" else ! { { echo "$as_me:$LINENO: error: unable to detect exception model" >&5 ! echo "$as_me: error: unable to detect exception model" >&2;} ! { (exit 1); exit 1; }; } fi + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu + echo "$as_me:$LINENO: result: $ac_exception_model_name" >&5 + echo "${ECHO_T}$ac_exception_model_name" >&6 + # ------ + # Output + # ------ + ac_config_files="$ac_config_files Makefile" ! ! ac_config_commands="$ac_config_commands default" ! ! ! cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure ! # scripts and configure runs, see configure's option --config-cache. ! # It is not useful on other systems. If it contains results you don't ! # want to keep, you may remove or edit it. # ! # config.status only pays attention to the cache file if you give it ! # the --recheck option to rerun configure. # ! # `ac_cv_env_foo' variables (set or unset) will be overridden when ! # loading this file, other *unset* `ac_cv_foo' will be assigned the ! # following values. ! ! _ACEOF ! # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ! { ! (set) 2>&1 | ! case `(ac_space=' '; set | grep ac_space) 2>&1` in ! *ac_space=\ *) ! # `set' does not quote correctly, so add quotes (double-quote ! # substitution turns \\\\ into \\, and sed turns \\ into \). ! sed -n \ ! "s/'/'\\\\''/g; ! s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ! ;; ! *) ! # `set' quotes correctly as required by POSIX, so do not add quotes. ! sed -n \ ! "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ! ;; ! esac; ! } | ! sed ' ! t clear ! : clear ! s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ ! t end ! /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ ! : end' >>confcache ! if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then ! test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" ! cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' ! # VPATH may cause trouble with some makes, so we remove $(srcdir), ! # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and ! # trailing colons and then remove the whole line if VPATH becomes empty ! # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ! ac_vpsub='/^[ ]*VPATH[ ]*=/{ ! s/:*\$(srcdir):*/:/; ! s/:*\${srcdir}:*/:/; ! s/:*@srcdir@:*/:/; ! s/^\([^=]*=[ ]*\):*/\1/; ! s/:*$//; ! s/^[^=]*=[ ]*$//; ! }' fi DEFS=-DHAVE_CONFIG_H ! ac_libobjs= ! ac_ltlibobjs= ! for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue ! # 1. Remove the extension, and $U if already installed. ! ac_i=`echo "$ac_i" | ! sed 's/\$U\././;s/\.o$//;s/\.obj$//'` ! # 2. Add them. ! ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ! ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' ! done ! LIBOBJS=$ac_libobjs ! LTLIBOBJS=$ac_ltlibobjs ! ! ! if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then ! { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. ! Usually this means the macro was only invoked conditionally." >&5 ! echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. ! Usually this means the macro was only invoked conditionally." >&2;} ! { (exit 1); exit 1; }; } ! fi ! ! : ${CONFIG_STATUS=./config.status} ! ac_clean_files_save=$ac_clean_files ! ac_clean_files="$ac_clean_files $CONFIG_STATUS" ! { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 ! echo "$as_me: creating $CONFIG_STATUS" >&6;} ! cat >$CONFIG_STATUS <<_ACEOF ! #! $SHELL ! # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging ! # configure, is in config.log if it exists. ! debug=false ! ac_cs_recheck=false ! ac_cs_silent=false ! SHELL=\${CONFIG_SHELL-$SHELL} ! _ACEOF ! ! cat >>$CONFIG_STATUS <<\_ACEOF ! ## --------------------- ## ! ## M4sh Initialization. ## ! ## --------------------- ## ! ! # Be Bourne compatible ! if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then ! emulate sh ! NULLCMD=: ! # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which ! # is contrary to our usage. Disable this feature. ! alias -g '${1+"$@"}'='"$@"' ! elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then ! set -o posix ! fi ! DUALCASE=1; export DUALCASE # for MKS sh ! ! # Support unset when possible. ! if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then ! as_unset=unset ! else ! as_unset=false ! fi ! ! ! # Work around bugs in pre-3.0 UWIN ksh. ! $as_unset ENV MAIL MAILPATH ! PS1='$ ' ! PS2='> ' ! PS4='+ ' ! ! # NLS nuisances. ! for as_var in \ ! LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ ! LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ ! LC_TELEPHONE LC_TIME do ! if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then ! eval $as_var=C; export $as_var ! else ! $as_unset $as_var ! fi done ! # Required to use basename. ! if expr a : '\(a\)' >/dev/null 2>&1; then ! as_expr=expr ! else ! as_expr=false ! fi ! if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then ! as_basename=basename ! else ! as_basename=false ! fi ! # Name of the executable. ! as_me=`$as_basename "$0" || ! $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ ! X"$0" : 'X\(//\)$' \| \ ! X"$0" : 'X\(/\)$' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X/"$0" | ! sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } ! /^X\/\(\/\/\)$/{ s//\1/; q; } ! /^X\/\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` ! # PATH needs CR, and LINENO needs CR and PATH. ! # Avoid depending upon Character Ranges. ! as_cr_letters='abcdefghijklmnopqrstuvwxyz' ! as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' ! as_cr_Letters=$as_cr_letters$as_cr_LETTERS ! as_cr_digits='0123456789' ! as_cr_alnum=$as_cr_Letters$as_cr_digits ! ! # The user is always right. ! if test "${PATH_SEPARATOR+set}" != set; then ! echo "#! /bin/sh" >conf$$.sh ! echo "exit 0" >>conf$$.sh ! chmod +x conf$$.sh ! if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then ! PATH_SEPARATOR=';' else ! PATH_SEPARATOR=: fi ! rm -f conf$$.sh ! fi ! ! ! as_lineno_1=$LINENO ! as_lineno_2=$LINENO ! as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` ! test "x$as_lineno_1" != "x$as_lineno_2" && ! test "x$as_lineno_3" = "x$as_lineno_2" || { ! # Find who we are. Look in the path if we contain no path at all ! # relative or not. ! case $0 in ! *[\\/]* ) as_myself=$0 ;; ! *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break ! done ! ! ;; ! esac ! # We did not find ourselves, most probably we were run as `sh COMMAND' ! # in which case we are not to be found in the path. ! if test "x$as_myself" = x; then ! as_myself=$0 ! fi ! if test ! -f "$as_myself"; then ! { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 ! echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} ! { (exit 1); exit 1; }; } ! fi ! case $CONFIG_SHELL in ! '') ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for as_base in sh bash ksh sh5; do ! case $as_dir in ! /*) ! if ("$as_dir/$as_base" -c ' ! as_lineno_1=$LINENO ! as_lineno_2=$LINENO ! as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` ! test "x$as_lineno_1" != "x$as_lineno_2" && ! test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then ! $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } ! $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } ! CONFIG_SHELL=$as_dir/$as_base ! export CONFIG_SHELL ! exec "$CONFIG_SHELL" "$0" ${1+"$@"} ! fi;; ! esac ! done ! done ! ;; ! esac ! ! # Create $as_me.lineno as a copy of $as_myself, but with $LINENO ! # uniformly replaced by the line number. The first 'sed' inserts a ! # line-number line before each line; the second 'sed' does the real ! # work. The second script uses 'N' to pair each line-number line ! # with the numbered line, and appends trailing '-' during ! # substitution so that $LINENO is not a special case at line end. ! # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the ! # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) ! sed '=' <$as_myself | ! sed ' ! N ! s,$,-, ! : loop ! s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, ! t loop ! s,-$,, ! s,^['$as_cr_digits']*\n,, ! ' >$as_me.lineno && ! chmod +x $as_me.lineno || ! { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 ! echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} ! { (exit 1); exit 1; }; } ! ! # Don't try to exec as it changes $[0], causing all sort of problems ! # (the dirname of $[0] is not the place where we might find the ! # original and so on. Autoconf is especially sensible to this). ! . ./$as_me.lineno ! # Exit status is that of the last command. ! exit ! } ! ! ! case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in ! *c*,-n*) ECHO_N= ECHO_C=' ! ' ECHO_T=' ' ;; ! *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; ! *) ECHO_N= ECHO_C='\c' ECHO_T= ;; ! esac ! ! if expr a : '\(a\)' >/dev/null 2>&1; then ! as_expr=expr ! else ! as_expr=false ! fi ! ! rm -f conf$$ conf$$.exe conf$$.file ! echo >conf$$.file ! if ln -s conf$$.file conf$$ 2>/dev/null; then ! # We could just check for DJGPP; but this test a) works b) is more generic ! # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). ! if test -f conf$$.exe; then ! # Don't use ln at all; we don't have any links ! as_ln_s='cp -p' else ! as_ln_s='ln -s' fi + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi + rm -f conf$$ conf$$.exe conf$$.file + + if mkdir -p . 2>/dev/null; then + as_mkdir_p=: + else + test -d ./-p && rmdir ./-p + as_mkdir_p=false + fi + + as_executable_p="test -f" + + # Sed expression to map a string onto a valid CPP name. + as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + + # Sed expression to map a string onto a valid variable name. + as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + + # IFS + # We need space, tab and new line, in precisely that order. + as_nl=' + ' + IFS=" $as_nl" + + # CDPATH. + $as_unset CDPATH + + exec 6>&1 + + # Open the log real soon, to keep \$[0] and so on meaningful, and to + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. Logging --version etc. is OK. + exec 5>>config.log + { + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX + ## Running $as_me. ## + _ASBOX + } >&5 + cat >&5 <<_CSEOF + + This file was extended by package-unused $as_me version-unused, which was + generated by GNU Autoconf 2.59. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + + _CSEOF + echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 + echo >&5 + _ACEOF + + # Files that config.status was made for. + if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS + fi + + if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS + fi + + if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS + fi + + if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS + fi + + cat >>$CONFIG_STATUS <<\_ACEOF + + ac_cs_usage="\ + \`$as_me' instantiates files from templates according to the + current configuration. + + Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + + Configuration files: + $config_files + + Configuration headers: + $config_headers + + Configuration commands: + $config_commands + + Report bugs to ." + _ACEOF + + cat >>$CONFIG_STATUS <<_ACEOF + ac_cs_version="\\ + package-unused config.status version-unused + configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + + Copyright (C) 2003 Free Software Foundation, Inc. + This config.status script is free software; the Free Software Foundation + gives unlimited permission to copy, distribute and modify it." + srcdir=$srcdir + INSTALL="$INSTALL" + _ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # If no file are specified by the user, then we need to provide default + # value. By we need to know if files were specified by the user. + ac_need_defaults=: + while test $# != 0 + do + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_shift=: + ;; + -*) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; + esac + + case $ac_option in + # Handling of the options. + _ACEOF + cat >>$CONFIG_STATUS <<\_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 + Try \`$0 --help' for more information." >&5 + echo "$as_me: error: ambiguous option: $1 + Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 + Try \`$0 --help' for more information." >&5 + echo "$as_me: error: unrecognized option: $1 + Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" ;; + + esac + shift done ! ! ac_configure_extra_args= ! ! if $ac_cs_silent; then ! exec 6>/dev/null ! ac_configure_extra_args="$ac_configure_extra_args --silent" fi ! _ACEOF ! cat >>$CONFIG_STATUS <<_ACEOF ! if \$ac_cs_recheck; then ! echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 ! exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion ! fi ! _ACEOF ! ! cat >>$CONFIG_STATUS <<_ACEOF ! # ! # INIT-COMMANDS section. ! # ! ! srcdir=${srcdir} ! host=${host} ! target=${target} ! with_target_subdir=${with_target_subdir} ! with_multisubdir=${with_multisubdir} ! ac_configure_args="--enable-multilib ${ac_configure_args}" ! toplevel_srcdir=${toplevel_srcdir} ! CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} ! ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}" ! ! ! _ACEOF ! ! ! ! cat >>$CONFIG_STATUS <<\_ACEOF ! for ac_config_target in $ac_config_targets ! do ! case "$ac_config_target" in ! # Handling of arguments. ! "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; ! "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; ! "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; ! *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 ! echo "$as_me: error: invalid argument: $ac_config_target" >&2;} ! { (exit 1); exit 1; }; };; esac + done ! # If the user did not use the arguments to specify the items to instantiate, ! # then the envvar interface is used. Set only those that are not. ! # We use the long form for the default assignment because of an extremely ! # bizarre bug on SunOS 4.1.3. ! if $ac_need_defaults; then ! test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files ! test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers ! test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands ! fi ! # Have a temporary directory for convenience. Make it in the build tree ! # simply because there is no reason to put it here, and in addition, ! # creating and moving files from /tmp can sometimes cause problems. ! # Create a temporary directory, and hook for its removal unless debugging. ! $debug || ! { ! trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 ! trap '{ (exit 1); exit 1; }' 1 2 13 15 ! } ! ! # Create a (secure) tmp directory for tmp files. ! ! { ! tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && ! test -n "$tmp" && test -d "$tmp" ! } || ! { ! tmp=./confstat$$-$RANDOM ! (umask 077 && mkdir $tmp) ! } || ! { ! echo "$me: cannot create a temporary directory in ." >&2 ! { (exit 1); exit 1; } ! } ! ! _ACEOF ! ! cat >>$CONFIG_STATUS <<_ACEOF ! ! # ! # CONFIG_FILES section. ! # ! ! # No need to generate the scripts if there are no CONFIG_FILES. ! # This happens for instance when ./config.status config.h ! if test -n "\$CONFIG_FILES"; then ! # Protect against being on the right side of a sed subst in config.status. ! sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; ! s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF ! s,@SHELL@,$SHELL,;t t ! s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t ! s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t ! s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t ! s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t ! s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t ! s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t ! s,@exec_prefix@,$exec_prefix,;t t ! s,@prefix@,$prefix,;t t ! s,@program_transform_name@,$program_transform_name,;t t ! s,@bindir@,$bindir,;t t ! s,@sbindir@,$sbindir,;t t ! s,@libexecdir@,$libexecdir,;t t ! s,@datadir@,$datadir,;t t ! s,@sysconfdir@,$sysconfdir,;t t ! s,@sharedstatedir@,$sharedstatedir,;t t ! s,@localstatedir@,$localstatedir,;t t ! s,@libdir@,$libdir,;t t ! s,@includedir@,$includedir,;t t ! s,@oldincludedir@,$oldincludedir,;t t ! s,@infodir@,$infodir,;t t ! s,@mandir@,$mandir,;t t ! s,@build_alias@,$build_alias,;t t ! s,@host_alias@,$host_alias,;t t ! s,@target_alias@,$target_alias,;t t ! s,@DEFS@,$DEFS,;t t ! s,@ECHO_C@,$ECHO_C,;t t ! s,@ECHO_N@,$ECHO_N,;t t ! s,@ECHO_T@,$ECHO_T,;t t ! s,@LIBS@,$LIBS,;t t ! s,@VERSION@,$VERSION,;t t ! s,@OBJC_BOEHM_GC@,$OBJC_BOEHM_GC,;t t ! s,@toplevel_srcdir@,$toplevel_srcdir,;t t ! s,@build@,$build,;t t ! s,@build_cpu@,$build_cpu,;t t ! s,@build_vendor@,$build_vendor,;t t ! s,@build_os@,$build_os,;t t ! s,@host@,$host,;t t ! s,@host_cpu@,$host_cpu,;t t ! s,@host_vendor@,$host_vendor,;t t ! s,@host_os@,$host_os,;t t ! s,@target@,$target,;t t ! s,@target_cpu@,$target_cpu,;t t ! s,@target_vendor@,$target_vendor,;t t ! s,@target_os@,$target_os,;t t ! s,@target_noncanonical@,$target_noncanonical,;t t ! s,@glibcpp_srcdir@,$glibcpp_srcdir,;t t ! s,@gcc_version_trigger@,$gcc_version_trigger,;t t ! s,@gcc_version_full@,$gcc_version_full,;t t ! s,@gcc_version@,$gcc_version,;t t ! s,@toolexecdir@,$toolexecdir,;t t ! s,@toolexeclibdir@,$toolexeclibdir,;t t ! s,@includedirname@,$includedirname,;t t ! s,@libext@,$libext,;t t ! s,@CC@,$CC,;t t ! s,@ac_ct_CC@,$ac_ct_CC,;t t ! s,@EXEEXT@,$EXEEXT,;t t ! s,@OBJEXT@,$OBJEXT,;t t ! s,@CFLAGS@,$CFLAGS,;t t ! s,@AS@,$AS,;t t ! s,@ac_ct_AS@,$ac_ct_AS,;t t ! s,@AR@,$AR,;t t ! s,@ac_ct_AR@,$ac_ct_AR,;t t ! s,@RANLIB@,$RANLIB,;t t ! s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t ! s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t ! s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t ! s,@INSTALL_DATA@,$INSTALL_DATA,;t t ! s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t ! s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t ! s,@MAINT@,$MAINT,;t t ! s,@LN_S@,$LN_S,;t t ! s,@STRIP@,$STRIP,;t t ! s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t ! s,@LIBTOOL@,$LIBTOOL,;t t ! s,@SET_MAKE@,$SET_MAKE,;t t ! s,@CPP@,$CPP,;t t ! s,@CPPFLAGS@,$CPPFLAGS,;t t ! s,@EGREP@,$EGREP,;t t ! s,@GTHREAD_FLAGS@,$GTHREAD_FLAGS,;t t ! s,@LIBOBJS@,$LIBOBJS,;t t ! s,@LTLIBOBJS@,$LTLIBOBJS,;t t ! CEOF ! ! _ACEOF ! ! cat >>$CONFIG_STATUS <<\_ACEOF ! # Split the substitutions into bite-sized pieces for seds with ! # small command number limits, like on Digital OSF/1 and HP-UX. ! ac_max_sed_lines=48 ! ac_sed_frag=1 # Number of current file. ! ac_beg=1 # First line for current file. ! ac_end=$ac_max_sed_lines # Line after last line for current file. ! ac_more_lines=: ! ac_sed_cmds= ! while $ac_more_lines; do ! if test $ac_beg -gt 1; then ! sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag ! else ! sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag ! fi ! if test ! -s $tmp/subs.frag; then ! ac_more_lines=false ! else ! # The purpose of the label and of the branching condition is to ! # speed up the sed processing (if there are no `@' at all, there ! # is no need to browse any of the substitutions). ! # These are the two extra sed commands mentioned above. ! (echo ':t ! /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed ! if test -z "$ac_sed_cmds"; then ! ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" ! else ! ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" ! fi ! ac_sed_frag=`expr $ac_sed_frag + 1` ! ac_beg=$ac_end ! ac_end=`expr $ac_end + $ac_max_sed_lines` ! fi ! done ! if test -z "$ac_sed_cmds"; then ! ac_sed_cmds=cat fi + fi # test -n "$CONFIG_FILES" ! _ACEOF ! cat >>$CONFIG_STATUS <<\_ACEOF ! for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue ! # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". ! case $ac_file in ! - | *:- | *:-:* ) # input from stdin ! cat >$tmp/stdin ! ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ! ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; ! *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ! ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; ! * ) ac_file_in=$ac_file.in ;; esac ! # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ! ac_dir=`(dirname "$ac_file") 2>/dev/null || ! $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ! X"$ac_file" : 'X\(//\)[^/]' \| \ ! X"$ac_file" : 'X\(//\)$' \| \ ! X"$ac_file" : 'X\(/\)' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X"$ac_file" | ! sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ! /^X\(\/\/\)[^/].*/{ s//\1/; q; } ! /^X\(\/\/\)$/{ s//\1/; q; } ! /^X\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` ! { if $as_mkdir_p; then ! mkdir -p "$ac_dir" ! else ! as_dir="$ac_dir" ! as_dirs= ! while test ! -d "$as_dir"; do ! as_dirs="$as_dir $as_dirs" ! as_dir=`(dirname "$as_dir") 2>/dev/null || ! $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ! X"$as_dir" : 'X\(//\)[^/]' \| \ ! X"$as_dir" : 'X\(//\)$' \| \ ! X"$as_dir" : 'X\(/\)' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X"$as_dir" | ! sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ! /^X\(\/\/\)[^/].*/{ s//\1/; q; } ! /^X\(\/\/\)$/{ s//\1/; q; } ! /^X\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` ! done ! test ! -n "$as_dirs" || mkdir $as_dirs ! fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 ! echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} ! { (exit 1); exit 1; }; }; } ! ac_builddir=. ! ! if test "$ac_dir" != .; then ! ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` ! # A "../" for each directory in $ac_dir_suffix. ! ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` ! else ! ac_dir_suffix= ac_top_builddir= ! fi ! ! case $srcdir in ! .) # No --srcdir option. We are building in place. ! ac_srcdir=. ! if test -z "$ac_top_builddir"; then ! ac_top_srcdir=. ! else ! ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` ! fi ;; ! [\\/]* | ?:[\\/]* ) # Absolute path. ! ac_srcdir=$srcdir$ac_dir_suffix; ! ac_top_srcdir=$srcdir ;; ! *) # Relative path. ! ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ! ac_top_srcdir=$ac_top_builddir$srcdir ;; ! esac ! ! # Do not use `cd foo && pwd` to compute absolute paths, because ! # the directories may not exist. ! case `pwd` in ! .) ac_abs_builddir="$ac_dir";; ! *) ! case "$ac_dir" in ! .) ac_abs_builddir=`pwd`;; ! [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; ! *) ac_abs_builddir=`pwd`/"$ac_dir";; ! esac;; ! esac ! case $ac_abs_builddir in ! .) ac_abs_top_builddir=${ac_top_builddir}.;; ! *) ! case ${ac_top_builddir}. in ! .) ac_abs_top_builddir=$ac_abs_builddir;; ! [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; ! *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; ! esac;; ! esac ! case $ac_abs_builddir in ! .) ac_abs_srcdir=$ac_srcdir;; ! *) ! case $ac_srcdir in ! .) ac_abs_srcdir=$ac_abs_builddir;; ! [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; ! *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; ! esac;; ! esac ! case $ac_abs_builddir in ! .) ac_abs_top_srcdir=$ac_top_srcdir;; ! *) ! case $ac_top_srcdir in ! .) ac_abs_top_srcdir=$ac_abs_builddir;; ! [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; ! *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; ! esac;; ! esac ! ! ! case $INSTALL in ! [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; ! *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac ! if test x"$ac_file" != x-; then ! { echo "$as_me:$LINENO: creating $ac_file" >&5 ! echo "$as_me: creating $ac_file" >&6;} ! rm -f "$ac_file" ! fi ! # Let's still pretend it is `configure' which instantiates (i.e., don't ! # use $as_me), people would be surprised to read: ! # /* config.h. Generated by config.status. */ ! if test x"$ac_file" = x-; then ! configure_input= ! else ! configure_input="$ac_file. " ! fi ! configure_input=$configure_input"Generated from `echo $ac_file_in | ! sed 's,.*/,,'` by configure." ! ! # First look for the input files in the build tree, otherwise in the ! # src tree. ! ac_file_inputs=`IFS=: ! for f in $ac_file_in; do ! case $f in ! -) echo $tmp/stdin ;; ! [\\/$]*) ! # Absolute (can't be DOS-style, as IFS=:) ! test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 ! echo "$as_me: error: cannot find input file: $f" >&2;} ! { (exit 1); exit 1; }; } ! echo "$f";; ! *) # Relative ! if test -f "$f"; then ! # Build tree ! echo "$f" ! elif test -f "$srcdir/$f"; then ! # Source tree ! echo "$srcdir/$f" ! else ! # /dev/null tree ! { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 ! echo "$as_me: error: cannot find input file: $f" >&2;} ! { (exit 1); exit 1; }; } ! fi;; ! esac ! done` || { (exit 1); exit 1; } ! _ACEOF ! cat >>$CONFIG_STATUS <<_ACEOF ! sed "$ac_vpsub ! $extrasub ! _ACEOF ! cat >>$CONFIG_STATUS <<\_ACEOF ! :t ! /@[a-zA-Z_][a-zA-Z_0-9]*@/!b ! s,@configure_input@,$configure_input,;t t ! s,@srcdir@,$ac_srcdir,;t t ! s,@abs_srcdir@,$ac_abs_srcdir,;t t ! s,@top_srcdir@,$ac_top_srcdir,;t t ! s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t ! s,@builddir@,$ac_builddir,;t t ! s,@abs_builddir@,$ac_abs_builddir,;t t ! s,@top_builddir@,$ac_top_builddir,;t t ! s,@abs_top_builddir@,$ac_abs_top_builddir,;t t ! s,@INSTALL@,$ac_INSTALL,;t t ! " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out ! rm -f $tmp/stdin ! if test x"$ac_file" != x-; then ! mv $tmp/out $ac_file ! else ! cat $tmp/out ! rm -f $tmp/out ! fi ! ! done ! _ACEOF ! cat >>$CONFIG_STATUS <<\_ACEOF ! ! # ! # CONFIG_HEADER section. ! # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ! ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ! ac_dB='[ ].*$,\1#\2' ! ac_dC=' ' ! ac_dD=',;t' ! # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ! ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ! ac_uB='$,\1#\2define\3' ac_uC=' ' ! ac_uD=',;t' ! for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". ! case $ac_file in ! - | *:- | *:-:* ) # input from stdin ! cat >$tmp/stdin ! ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ! ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; ! *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ! ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; ! * ) ac_file_in=$ac_file.in ;; esac ! test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 ! echo "$as_me: creating $ac_file" >&6;} ! # First look for the input files in the build tree, otherwise in the ! # src tree. ! ac_file_inputs=`IFS=: ! for f in $ac_file_in; do ! case $f in ! -) echo $tmp/stdin ;; ! [\\/$]*) ! # Absolute (can't be DOS-style, as IFS=:) ! test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 ! echo "$as_me: error: cannot find input file: $f" >&2;} ! { (exit 1); exit 1; }; } ! # Do quote $f, to prevent DOS paths from being IFS'd. ! echo "$f";; ! *) # Relative ! if test -f "$f"; then ! # Build tree ! echo "$f" ! elif test -f "$srcdir/$f"; then ! # Source tree ! echo "$srcdir/$f" ! else ! # /dev/null tree ! { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 ! echo "$as_me: error: cannot find input file: $f" >&2;} ! { (exit 1); exit 1; }; } ! fi;; ! esac ! done` || { (exit 1); exit 1; } ! # Remove the trailing spaces. ! sed 's/[ ]*$//' $ac_file_inputs >$tmp/in ! _ACEOF ! # Transform confdefs.h into two sed scripts, `conftest.defines' and ! # `conftest.undefs', that substitutes the proper values into ! # config.h.in to produce config.h. The first handles `#define' ! # templates, and the second `#undef' templates. ! # And first: Protect against being on the right side of a sed subst in ! # config.status. Protect against being in an unquoted here document ! # in config.status. ! rm -f conftest.defines conftest.undefs ! # Using a here document instead of a string reduces the quoting nightmare. ! # Putting comments in sed scripts is not portable. ! # ! # `end' is used to avoid that the second main sed command (meant for ! # 0-ary CPP macros) applies to n-ary macro definitions. ! # See the Autoconf documentation for `clear'. ! cat >confdef2sed.sed <<\_ACEOF ! s/[\\&,]/\\&/g ! s,[\\$`],\\&,g ! t clear ! : clear ! s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp ! t end ! s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp ! : end ! _ACEOF ! # If some macros were called several times there might be several times ! # the same #defines, which is useless. Nevertheless, we may not want to ! # sort them, since we want the *last* AC-DEFINE to be honored. ! uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines ! sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs ! rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. ! cat >>conftest.undefs <<\_ACEOF ! s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, ! _ACEOF ! # Break up conftest.defines because some shells have a limit on the size ! # of here documents, and old seds have small limits too (100 cmds). ! echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS ! echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS ! echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS ! echo ' :' >>$CONFIG_STATUS ! rm -f conftest.tail ! while grep . conftest.defines >/dev/null ! do ! # Write a limited-size here document to $tmp/defines.sed. ! echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS ! # Speed up: don't consider the non `#define' lines. ! echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS ! # Work around the forget-to-reset-the-flag bug. ! echo 't clr' >>$CONFIG_STATUS ! echo ': clr' >>$CONFIG_STATUS ! sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS ! echo 'CEOF ! sed -f $tmp/defines.sed $tmp/in >$tmp/out ! rm -f $tmp/in ! mv $tmp/out $tmp/in ! ' >>$CONFIG_STATUS ! sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail ! rm -f conftest.defines ! mv conftest.tail conftest.defines ! done ! rm -f conftest.defines ! echo ' fi # grep' >>$CONFIG_STATUS ! echo >>$CONFIG_STATUS + # Break up conftest.undefs because some shells have a limit on the size + # of here documents, and old seds have small limits too (100 cmds). + echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail ! while grep . conftest.undefs >/dev/null do ! # Write a limited-size here document to $tmp/undefs.sed. ! echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS ! # Speed up: don't consider the non `#undef' ! echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS ! # Work around the forget-to-reset-the-flag bug. ! echo 't clr' >>$CONFIG_STATUS ! echo ': clr' >>$CONFIG_STATUS ! sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF ! sed -f $tmp/undefs.sed $tmp/in >$tmp/out ! rm -f $tmp/in ! mv $tmp/out $tmp/in ! ' >>$CONFIG_STATUS ! sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail ! rm -f conftest.undefs ! mv conftest.tail conftest.undefs done ! rm -f conftest.undefs ! cat >>$CONFIG_STATUS <<\_ACEOF ! # Let's still pretend it is `configure' which instantiates (i.e., don't ! # use $as_me), people would be surprised to read: ! # /* config.h. Generated by config.status. */ ! if test x"$ac_file" = x-; then ! echo "/* Generated by configure. */" >$tmp/config.h else ! echo "/* $ac_file. Generated by configure. */" >$tmp/config.h ! fi ! cat $tmp/in >>$tmp/config.h ! rm -f $tmp/in ! if test x"$ac_file" != x-; then ! if diff $ac_file $tmp/config.h >/dev/null 2>&1; then ! { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 ! echo "$as_me: $ac_file is unchanged" >&6;} ! else ! ac_dir=`(dirname "$ac_file") 2>/dev/null || ! $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ! X"$ac_file" : 'X\(//\)[^/]' \| \ ! X"$ac_file" : 'X\(//\)$' \| \ ! X"$ac_file" : 'X\(/\)' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X"$ac_file" | ! sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ! /^X\(\/\/\)[^/].*/{ s//\1/; q; } ! /^X\(\/\/\)$/{ s//\1/; q; } ! /^X\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` ! { if $as_mkdir_p; then ! mkdir -p "$ac_dir" ! else ! as_dir="$ac_dir" ! as_dirs= ! while test ! -d "$as_dir"; do ! as_dirs="$as_dir $as_dirs" ! as_dir=`(dirname "$as_dir") 2>/dev/null || ! $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ! X"$as_dir" : 'X\(//\)[^/]' \| \ ! X"$as_dir" : 'X\(//\)$' \| \ ! X"$as_dir" : 'X\(/\)' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X"$as_dir" | ! sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ! /^X\(\/\/\)[^/].*/{ s//\1/; q; } ! /^X\(\/\/\)$/{ s//\1/; q; } ! /^X\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` ! done ! test ! -n "$as_dirs" || mkdir $as_dirs ! fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 ! echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} ! { (exit 1); exit 1; }; }; } ! ! rm -f $ac_file ! mv $tmp/config.h $ac_file fi ! else ! cat $tmp/config.h ! rm -f $tmp/config.h fi ! done ! _ACEOF ! cat >>$CONFIG_STATUS <<\_ACEOF ! # ! # CONFIG_COMMANDS section. ! # ! for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ! ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ! ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ! ac_dir=`(dirname "$ac_dest") 2>/dev/null || ! $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ! X"$ac_dest" : 'X\(//\)[^/]' \| \ ! X"$ac_dest" : 'X\(//\)$' \| \ ! X"$ac_dest" : 'X\(/\)' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X"$ac_dest" | ! sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ! /^X\(\/\/\)[^/].*/{ s//\1/; q; } ! /^X\(\/\/\)$/{ s//\1/; q; } ! /^X\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` ! { if $as_mkdir_p; then ! mkdir -p "$ac_dir" ! else ! as_dir="$ac_dir" ! as_dirs= ! while test ! -d "$as_dir"; do ! as_dirs="$as_dir $as_dirs" ! as_dir=`(dirname "$as_dir") 2>/dev/null || ! $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ! X"$as_dir" : 'X\(//\)[^/]' \| \ ! X"$as_dir" : 'X\(//\)$' \| \ ! X"$as_dir" : 'X\(/\)' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X"$as_dir" | ! sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ! /^X\(\/\/\)[^/].*/{ s//\1/; q; } ! /^X\(\/\/\)$/{ s//\1/; q; } ! /^X\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` ! done ! test ! -n "$as_dirs" || mkdir $as_dirs ! fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 ! echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} ! { (exit 1); exit 1; }; }; } ! ac_builddir=. ! ! if test "$ac_dir" != .; then ! ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` ! # A "../" for each directory in $ac_dir_suffix. ! ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` ! else ! ac_dir_suffix= ac_top_builddir= ! fi ! ! case $srcdir in ! .) # No --srcdir option. We are building in place. ! ac_srcdir=. ! if test -z "$ac_top_builddir"; then ! ac_top_srcdir=. ! else ! ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` ! fi ;; ! [\\/]* | ?:[\\/]* ) # Absolute path. ! ac_srcdir=$srcdir$ac_dir_suffix; ! ac_top_srcdir=$srcdir ;; ! *) # Relative path. ! ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ! ac_top_srcdir=$ac_top_builddir$srcdir ;; ! esac ! ! # Do not use `cd foo && pwd` to compute absolute paths, because ! # the directories may not exist. ! case `pwd` in ! .) ac_abs_builddir="$ac_dir";; ! *) ! case "$ac_dir" in ! .) ac_abs_builddir=`pwd`;; ! [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; ! *) ac_abs_builddir=`pwd`/"$ac_dir";; ! esac;; ! esac ! case $ac_abs_builddir in ! .) ac_abs_top_builddir=${ac_top_builddir}.;; ! *) ! case ${ac_top_builddir}. in ! .) ac_abs_top_builddir=$ac_abs_builddir;; ! [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; ! *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; ! esac;; ! esac ! case $ac_abs_builddir in ! .) ac_abs_srcdir=$ac_srcdir;; ! *) ! case $ac_srcdir in ! .) ac_abs_srcdir=$ac_abs_builddir;; ! [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; ! *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; ! esac;; ! esac ! case $ac_abs_builddir in ! .) ac_abs_top_srcdir=$ac_top_srcdir;; ! *) ! case $ac_top_srcdir in ! .) ac_abs_top_srcdir=$ac_abs_builddir;; ! [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; ! *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; ! esac;; ! esac ! ! ! { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 ! echo "$as_me: executing $ac_dest commands" >&6;} ! case $ac_dest in ! default ) if test -n "$CONFIG_FILES"; then if test -n "${with_target_subdir}"; then # FIXME: We shouldn't need to set ac_file ac_file=Makefile LD="${ORIGINAL_LD_FOR_MULTILIBS}" . ${toplevel_srcdir}/config-ml.in fi ! fi ;; ! esac ! done ! _ACEOF ! ! cat >>$CONFIG_STATUS <<\_ACEOF ! ! { (exit 0); exit 0; } ! _ACEOF chmod +x $CONFIG_STATUS ! ac_clean_files=$ac_clean_files_save + # configure is writing to config.log, and then calls config.status. + # config.status does its own redirection, appending to config.log. + # Unfortunately, on DOS this fails, as config.log is still kept open + # by configure, so config.status won't be able to write to it; its + # output is simply discarded. So we exec the FD to /dev/null, + # effectively closing config.log, so it can be properly (re)opened and + # appended to by config.status. When coming back to configure, we + # need to make the FD available again. + if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } + fi diff -Nrcpad gcc-3.4.3/libobjc/configure.ac gcc-4.0.0/libobjc/configure.ac *** gcc-3.4.3/libobjc/configure.ac Thu Jan 1 00:00:00 1970 --- gcc-4.0.0/libobjc/configure.ac Thu Dec 2 11:05:06 2004 *************** *** 0 **** --- 1,313 ---- + # Process this file with autoconf to produce a configure script. + # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004 + # Free Software Foundation, Inc. + # Originally contributed by Dave Love (d.love@dl.ac.uk). + # + #This file is part of GCC. + # + #GCC is free software; you can redistribute it and/or modify + #it under the terms of the GNU General Public License as published by + #the Free Software Foundation; either version 2, or (at your option) + #any later version. + # + #GCC is distributed in the hope that it will be useful, + #but WITHOUT ANY WARRANTY; without even the implied warranty of + #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + #GNU General Public License for more details. + # + #You should have received a copy of the GNU General Public License + #along with GCC; see the file COPYING. If not, write to + #the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA + #02111-1307, USA. + + AC_PREREQ(2.59) + AC_INIT(package-unused, version-unused,, libobjc) + AC_CONFIG_SRCDIR([objc/objc.h]) + + # We need the following definitions because AC_PROG_LIBTOOL relies on them + PACKAGE=libobjc + # Version is pulled out to make it a bit easier to change using sed. + VERSION=1:0:0 + AC_SUBST(VERSION) + + # This works around the fact that libtool configuration may change LD + # for this particular configuration, but some shells, instead of + # keeping the changes in LD private, export them just because LD is + # exported. + ORIGINAL_LD_FOR_MULTILIBS=$LD + + # ------- + # Options + # ------- + + # Default to --enable-multilib + AC_ARG_ENABLE(multilib, + [ --enable-multilib build hella library versions (default)], + [case "${enableval}" in + yes) multilib=yes ;; + no) multilib=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;; + esac], + [multilib=yes]) + + # We use these options to decide which functions to include. + AC_ARG_WITH(target-subdir, + [ --with-target-subdir=SUBDIR + configuring in a subdirectory]) + AC_ARG_WITH(cross-host, + [ --with-cross-host=HOST configuring with a cross compiler]) + + AC_MSG_CHECKING([for --enable-version-specific-runtime-libs]) + AC_ARG_ENABLE(version-specific-runtime-libs, + [ --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory ], + [case "$enableval" in + yes) version_specific_libs=yes ;; + no) version_specific_libs=no ;; + *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);; + esac], + [version_specific_libs=no]) + AC_MSG_RESULT($version_specific_libs) + + AC_ARG_ENABLE(objc-gc, + [ --enable-objc-gc enable the use of Boehm's garbage collector with + the GNU Objective-C runtime.], + [case $enable_objc_gc in + no) OBJC_BOEHM_GC='' ;; + *) OBJC_BOEHM_GC=libobjc_gc.la ;; + esac], + [OBJC_BOEHM_GC='']) + AC_SUBST(OBJC_BOEHM_GC) + + # ----------- + # Directories + # ----------- + + # When building with srcdir == objdir, links to the source files will + # be created in directories within the target_subdir. We have to + # adjust toplevel_srcdir accordingly, so that configure finds + # install-sh and other auxiliary files that live in the top-level + # source directory. + if test "${srcdir}" = "."; then + if test -z "${with_target_subdir}"; then + toprel=".." + else + if test "${with_target_subdir}" != "."; then + toprel="${with_multisrctop}../.." + else + toprel="${with_multisrctop}.." + fi + fi + else + toprel=".." + fi + AC_CONFIG_AUX_DIR(${srcdir}/$toprel) + toplevel_srcdir=\${srcdir}/$toprel + AC_SUBST(toplevel_srcdir) + + AC_CANONICAL_SYSTEM + ACX_NONCANONICAL_TARGET + + # Export source directory. + # These need to be absolute paths, yet at the same time need to + # canonicalize only relative paths, because then amd will not unmount + # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd. + case $srcdir in + [\\/$]* | ?:[\\/]*) glibcpp_srcdir=${srcdir} ;; + *) glibcpp_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;; + esac + AC_SUBST(glibcpp_srcdir) + + TL_AC_GCC_VERSION([$srcdir/..]) + + # Calculate toolexeclibdir + # Also toolexecdir, though it's only used in toolexeclibdir + case ${version_specific_libs} in + yes) + # Need the gcc compiler version to know where to install libraries + # and header files if --enable-version-specific-runtime-libs option + # is selected. + toolexecdir='$(libdir)/gcc/$(target_noncanonical)' + toolexeclibdir='$(toolexecdir)/'${gcc_version}'$(MULTISUBDIR)' + ;; + no) + if test -n "$with_cross_host" && + test x"$with_cross_host" != x"no"; then + # Install a library built with a cross compiler in tooldir, not libdir. + toolexecdir='$(exec_prefix)/$(target_noncanonical)' + toolexeclibdir='$(toolexecdir)/lib' + else + toolexecdir='$(libdir)/gcc-lib/$(target_noncanonical)' + toolexeclibdir='$(libdir)' + fi + multi_os_directory=`$CC -print-multi-os-directory` + case $multi_os_directory in + .) ;; # Avoid trailing /. + *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; + esac + ;; + esac + AC_SUBST(toolexecdir) + AC_SUBST(toolexeclibdir) + + # Figure out if we want to name the include directory and the + # library name changes differently. + includedirname=include + libext= + case "${host}" in + *-darwin*) + # Darwin is the only target so far that needs a different include directory. + includedirname=include-gnu-runtime + libext=-gnu + ;; + esac + AC_SUBST(includedirname) + AC_SUBST(libext) + + AC_CONFIG_HEADERS(config.h) + + # -------- + # Programs + # -------- + + GCC_NO_EXECUTABLES + + # We must force CC to /not/ be a precious variable; otherwise + # the wrong, non-multilib-adjusted value will be used in multilibs. + # As a side effect, we have to subst CFLAGS ourselves. + m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS]) + m4_define([_AC_ARG_VAR_PRECIOUS],[]) + AC_PROG_CC + m4_rename([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS]) + + AC_SUBST(CFLAGS) + + AC_CHECK_TOOL(AS, as) + AC_CHECK_TOOL(AR, ar) + AC_CHECK_TOOL(RANLIB, ranlib, :) + AC_PROG_INSTALL + + AM_MAINTAINER_MODE + + # Enable Win32 DLL on MS Windows - FIXME + AC_LIBTOOL_WIN32_DLL + + AC_PROG_LIBTOOL + + AM_PROG_CC_C_O + + AC_PROG_MAKE_SET + + # ------- + # Headers + # ------- + + # Sanity check for the cross-compilation case: + AC_CHECK_HEADER(stdio.h,:, + [AC_MSG_ERROR([Can't find stdio.h. + You must have a usable C system for the target already installed, at least + including headers and, preferably, the library, before you can configure + the Objective C runtime system. If necessary, install gcc now with + \`LANGUAGES=c', then the target library, then build with \`LANGUAGES=objc'.])]) + + AC_HEADER_STDC + + AC_CHECK_HEADERS(sched.h) + + # ----------- + # Miscellanea + # ----------- + + # Determine CFLAGS for gthread. + # FIXME: the current implementation is dependent on the 'r' variable + # passed down from the top level + AC_CACHE_CHECK([for gthread cflags],objc_cv_gthread_flags, + [if test -f "$r"/gcc/Makefile + then + objc_cv_gthread_flags=`grep \^GTHREAD_FLAGS "$r"/gcc/Makefile | awk -F= '{ print $2 }'` + else + AC_MSG_ERROR([not found]) + fi]) + GTHREAD_FLAGS=$objc_cv_gthread_flags + AC_SUBST(GTHREAD_FLAGS) + + AC_MSG_CHECKING([for exception model to use]) + AC_LANG_PUSH(C) + AC_ARG_ENABLE(sjlj-exceptions, + AS_HELP_STRING([--enable-sjlj-exceptions], + [force use of builtin_setjmp for exceptions]), + [:], + [dnl Botheration. Now we've got to detect the exception model. + dnl Link tests against libgcc.a are problematic since -- at least + dnl as of this writing -- we've not been given proper -L bits for + dnl single-tree newlib and libgloss. + dnl + dnl This is what AC_TRY_COMPILE would do if it didn't delete the + dnl conftest files before we got a change to grep them first. + cat > conftest.$ac_ext << EOF + [#]line __oline__ "configure" + @interface Frob + @end + @implementation Frob + @end + int proc(); + int foo() + { + @try { + return proc(); + } + @catch (Frob* ex) { + return 0; + } + } + EOF + old_CFLAGS="$CFLAGS" + dnl work around that we don't have Objective-C support in autoconf + CFLAGS="-x objective-c -fgnu-runtime -fobjc-exceptions -S" + if AC_TRY_EVAL(ac_compile); then + if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then + enable_sjlj_exceptions=yes + elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then + enable_sjlj_exceptions=no + fi + fi + CFLAGS="$old_CFLAGS" + rm -f conftest*]) + if test x$enable_sjlj_exceptions = xyes; then + AC_DEFINE(SJLJ_EXCEPTIONS, 1, + [Define if the compiler is configured for setjmp/longjmp exceptions.]) + ac_exception_model_name=sjlj + elif test x$enable_sjlj_exceptions = xno; then + ac_exception_model_name="call frame" + else + AC_MSG_ERROR([unable to detect exception model]) + fi + AC_LANG_POP(C) + AC_MSG_RESULT($ac_exception_model_name) + + # ------ + # Output + # ------ + + AC_CONFIG_FILES([Makefile]) + + AC_CONFIG_COMMANDS([default], + [[if test -n "$CONFIG_FILES"; then + if test -n "${with_target_subdir}"; then + # FIXME: We shouldn't need to set ac_file + ac_file=Makefile + LD="${ORIGINAL_LD_FOR_MULTILIBS}" + . ${toplevel_srcdir}/config-ml.in + fi + fi]], + [[srcdir=${srcdir} + host=${host} + target=${target} + with_target_subdir=${with_target_subdir} + with_multisubdir=${with_multisubdir} + ac_configure_args="--enable-multilib ${ac_configure_args}" + toplevel_srcdir=${toplevel_srcdir} + CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}" + ]]) + + AC_OUTPUT diff -Nrcpad gcc-3.4.3/libobjc/configure.in gcc-4.0.0/libobjc/configure.in *** gcc-3.4.3/libobjc/configure.in Thu Feb 20 09:08:24 2003 --- gcc-4.0.0/libobjc/configure.in Thu Jan 1 00:00:00 1970 *************** *** 1,127 **** - # Process this file with autoconf to produce a configure script. - # Copyright (C) 1995, 1997, 1998, 1999, 2002, 2003 - # Free Software Foundation, Inc. - # Contributed by Dave Love (d.love@dl.ac.uk). - # - #This file is part of GNU Objective C. - # - #GNU Objective C is free software; you can redistribute it and/or modify - #it under the terms of the GNU General Public License as published by - #the Free Software Foundation; either version 2, or (at your option) - #any later version. - # - #GNU Objective C is distributed in the hope that it will be useful, - #but WITHOUT ANY WARRANTY; without even the implied warranty of - #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - #GNU General Public License for more details. - # - #You should have received a copy of the GNU General Public License - #along with GNU Objective C; see the file COPYING. If not, write to - #the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - #02111-1307, USA. - - AC_PREREQ(2.13) - AC_INIT(objc/objc.h) - AC_CONFIG_HEADER(config.h) - - # This works around the fact that libtool configuration may change LD - # for this particular configuration, but some shells, instead of - # keeping the changes in LD private, export them just because LD is - # exported. - ORIGINAL_LD_FOR_MULTILIBS=$LD - - GLIBCPP_TOPREL_CONFIGURE - - AC_CANONICAL_SYSTEM - target_alias=${target_alias-$target} - AC_SUBST(target_alias) - - GLIBCPP_CONFIGURE(.) - GLIBCPP_EXPORT_INSTALL_INFO - - dnl Checks for programs. - - # Disable shared libs by default - AC_DISABLE_SHARED - # Enable Win32 DLL on MS Windows - FIXME - AC_LIBTOOL_WIN32_DLL - - AC_PROG_LIBTOOL - - dnl These should be inherited in the recursive make, but ensure they are - dnl defined: - test "$AR" || AR=ar - AC_SUBST(AR) - if test "$RANLIB"; then : - AC_SUBST(RANLIB) - else - AC_PROG_RANLIB - fi - AC_PROG_INSTALL - AC_PROG_MAKE_SET - - dnl Checks for header files. - # Sanity check for the cross-compilation case: - AC_CHECK_HEADER(stdio.h,:, - [AC_MSG_ERROR([Can't find stdio.h. - You must have a usable C system for the target already installed, at least - including headers and, preferably, the library, before you can configure - the Objective C runtime system. If necessary, install gcc now with - \`LANGUAGES=c', then the target library, then build with \`LANGUAGES=objc'.])]) - - AC_HEADER_STDC - - AC_CHECK_HEADERS(sched.h) - - # Determine CFLAGS for gthread. - - AC_CACHE_CHECK([for gthread cflags],objc_cv_gthread_flags, - [if test -f "$r"/gcc/Makefile - then - objc_cv_gthread_flags=`grep \^GTHREAD_FLAGS "$r"/gcc/Makefile | awk -F= '{ print $2 }'` - else - AC_MSG_ERROR([not found]) - fi]) - GTHREAD_FLAGS=$objc_cv_gthread_flags - AC_SUBST(GTHREAD_FLAGS) - - AC_ARG_ENABLE(objc-gc, - [ --enable-objc-gc enable the use of Boehm's garbage collector with - the GNU Objective-C runtime.], - if [[[ x$enable_objc_gc = xno ]]]; then - OBJC_BOEHM_GC='' - else - OBJC_BOEHM_GC=libobjc_gc.la - fi, - OBJC_BOEHM_GC='') - AC_SUBST(OBJC_BOEHM_GC) - - - # We need multilib support, but only if configuring for the target. - AC_OUTPUT(Makefile, - [test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h - if test -n "$CONFIG_FILES"; then - if test -n "${with_target_subdir}"; then - # FIXME: We shouldn't need to set ac_file - ac_file=Makefile - LD="${ORIGINAL_LD_FOR_MULTILIBS}" - . ${toplevel_srcdir}/config-ml.in - fi - fi], - srcdir=${srcdir} - host=${host} - target=${target} - with_target_subdir=${with_target_subdir} - with_multisubdir=${with_multisubdir} - ac_configure_args="--enable-multilib ${ac_configure_args}" - toplevel_srcdir=${toplevel_srcdir} - CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}" - ) - - - dnl Local Variables: - dnl comment-start: "dnl " - dnl comment-end: "" - dnl comment-start-skip: "\\bdnl\\b\\s *" - dnl End: --- 0 ---- diff -Nrcpad gcc-3.4.3/libobjc/encoding.c gcc-4.0.0/libobjc/encoding.c *** gcc-3.4.3/libobjc/encoding.c Sat Jan 17 19:51:59 2004 --- gcc-4.0.0/libobjc/encoding.c Thu Sep 16 08:35:01 2004 *************** *** 1,5 **** /* Encoding of types for Objective C. ! Copyright (C) 1993, 1995, 1996, 1997, 1998, 2000, 2002 Free Software Foundation, Inc. Contributed by Kresten Krab Thorup Bitfield support by Ovidiu Predescu --- 1,5 ---- /* Encoding of types for Objective C. ! Copyright (C) 1993, 1995, 1996, 1997, 1998, 2000, 2002, 2004 Free Software Foundation, Inc. Contributed by Kresten Krab Thorup Bitfield support by Ovidiu Predescu *************** Boston, MA 02111-1307, USA. */ *** 79,92 **** /* Some ports (eg ARM) allow the structure size boundary to be selected at compile-time. We override the normal definition with one that has a constant value for this compilation. */ ! #undef STRUCTURE_SIZE_BOUNDARY #define STRUCTURE_SIZE_BOUNDARY (BITS_PER_UNIT * sizeof (struct{char a;})) /* Some ROUND_TYPE_ALIGN macros use TARGET_foo, and consequently ! target_flags. Define a dummy entry here to so we don't die. */ ! /* ??? FIXME: As of 2002-06-21, the attribute `unused' doesn't seem to ! eliminate the warning. */ ! static int __attribute__ ((__unused__)) target_flags = 0; /* FIXME: while this file has no business including tm.h, this --- 79,101 ---- /* Some ports (eg ARM) allow the structure size boundary to be selected at compile-time. We override the normal definition with one that has a constant value for this compilation. */ ! #ifndef BITS_PER_UNIT ! #define BITS_PER_UNIT 8 ! #endif ! #undef STRUCTURE_SIZE_BOUNDARY #define STRUCTURE_SIZE_BOUNDARY (BITS_PER_UNIT * sizeof (struct{char a;})) /* Some ROUND_TYPE_ALIGN macros use TARGET_foo, and consequently ! target_flags. Define a dummy entry here to so we don't die. ! We have to rename it because target_flags may already have been ! declared extern. */ ! #define target_flags not_target_flags ! static int __attribute__ ((__unused__)) not_target_flags = 0; ! ! /* Some ROUND_TYPE_ALIGN use ALTIVEC_VECTOR_MODE (rs6000 darwin). ! Define a dummy ALTIVEC_VECTOR_MODE so it will not die. */ ! #undef ALTIVEC_VECTOR_MODE ! #define ALTIVEC_VECTOR_MODE(MODE) (0) /* FIXME: while this file has no business including tm.h, this diff -Nrcpad gcc-3.4.3/libobjc/exception.c gcc-4.0.0/libobjc/exception.c *** gcc-3.4.3/libobjc/exception.c Thu Jan 1 00:00:00 1970 --- gcc-4.0.0/libobjc/exception.c Fri Oct 1 03:46:38 2004 *************** *** 0 **** --- 1,368 ---- + /* The implementation of exception handling primitives for Objective-C. + Copyright (C) 2004 Free Software Foundation, Inc. + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + GCC is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. + + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* As a special exception, if you link this library with files compiled + with GCC to produce an executable, this does not cause the resulting + executable to be covered by the GNU General Public License. This + exception does not however invalidate any other reasons why the + executable file might be covered by the GNU General Public License. */ + + #include + #include "config.h" + #include "objc/objc-api.h" + #include "unwind.h" + #include "unwind-pe.h" + + + /* This is the exception class we report -- "GNUCOBJC". */ + #define __objc_exception_class \ + ((((((((_Unwind_Exception_Class) 'G' \ + << 8 | (_Unwind_Exception_Class) 'N') \ + << 8 | (_Unwind_Exception_Class) 'U') \ + << 8 | (_Unwind_Exception_Class) 'C') \ + << 8 | (_Unwind_Exception_Class) 'O') \ + << 8 | (_Unwind_Exception_Class) 'B') \ + << 8 | (_Unwind_Exception_Class) 'J') \ + << 8 | (_Unwind_Exception_Class) 'C') + + /* This is the object that is passed around by the Objective C runtime + to represent the exception in flight. */ + + struct ObjcException + { + /* This bit is needed in order to interact with the unwind runtime. */ + struct _Unwind_Exception base; + + /* The actual object we want to throw. */ + id value; + + /* Cache some internal unwind data between phase 1 and phase 2. */ + _Unwind_Ptr landingPad; + int handlerSwitchValue; + }; + + + + struct lsda_header_info + { + _Unwind_Ptr Start; + _Unwind_Ptr LPStart; + _Unwind_Ptr ttype_base; + const unsigned char *TType; + const unsigned char *action_table; + unsigned char ttype_encoding; + unsigned char call_site_encoding; + }; + + static const unsigned char * + parse_lsda_header (struct _Unwind_Context *context, const unsigned char *p, + struct lsda_header_info *info) + { + _Unwind_Word tmp; + unsigned char lpstart_encoding; + + info->Start = (context ? _Unwind_GetRegionStart (context) : 0); + + /* Find @LPStart, the base to which landing pad offsets are relative. */ + lpstart_encoding = *p++; + if (lpstart_encoding != DW_EH_PE_omit) + p = read_encoded_value (context, lpstart_encoding, p, &info->LPStart); + else + info->LPStart = info->Start; + + /* Find @TType, the base of the handler and exception spec type data. */ + info->ttype_encoding = *p++; + if (info->ttype_encoding != DW_EH_PE_omit) + { + p = read_uleb128 (p, &tmp); + info->TType = p + tmp; + } + else + info->TType = 0; + + /* The encoding and length of the call-site table; the action table + immediately follows. */ + info->call_site_encoding = *p++; + p = read_uleb128 (p, &tmp); + info->action_table = p + tmp; + + return p; + } + + static Class + get_ttype_entry (struct lsda_header_info *info, _Unwind_Word i) + { + _Unwind_Ptr ptr; + + i *= size_of_encoded_value (info->ttype_encoding); + read_encoded_value_with_base (info->ttype_encoding, info->ttype_base, + info->TType - i, &ptr); + + /* NULL ptr means catch-all. */ + if (ptr) + return objc_get_class ((const char *) ptr); + else + return 0; + } + + /* Like unto the method of the same name on Object, but takes an id. */ + /* ??? Does this bork the meta-type system? Can/should we look up an + isKindOf method on the id? */ + + static int + isKindOf (id value, Class target) + { + Class c; + + /* NULL target is catch-all. */ + if (target == 0) + return 1; + + for (c = value->class_pointer; c; c = class_get_super_class (c)) + if (c == target) + return 1; + return 0; + } + + /* Using a different personality function name causes link failures + when trying to mix code using different exception handling models. */ + #ifdef SJLJ_EXCEPTIONS + #define PERSONALITY_FUNCTION __gnu_objc_personality_sj0 + #define __builtin_eh_return_data_regno(x) x + #else + #define PERSONALITY_FUNCTION __gnu_objc_personality_v0 + #endif + + _Unwind_Reason_Code + PERSONALITY_FUNCTION (int version, + _Unwind_Action actions, + _Unwind_Exception_Class exception_class, + struct _Unwind_Exception *ue_header, + struct _Unwind_Context *context) + { + struct ObjcException *xh = (struct ObjcException *) ue_header; + + struct lsda_header_info info; + const unsigned char *language_specific_data; + const unsigned char *action_record; + const unsigned char *p; + _Unwind_Ptr landing_pad, ip; + int handler_switch_value; + int saw_cleanup, saw_handler; + + /* Interface version check. */ + if (version != 1) + return _URC_FATAL_PHASE1_ERROR; + + /* Shortcut for phase 2 found handler for domestic exception. */ + if (actions == (_UA_CLEANUP_PHASE | _UA_HANDLER_FRAME) + && exception_class == __objc_exception_class) + { + handler_switch_value = xh->handlerSwitchValue; + landing_pad = xh->landingPad; + goto install_context; + } + + language_specific_data = (const unsigned char *) + _Unwind_GetLanguageSpecificData (context); + + /* If no LSDA, then there are no handlers or cleanups. */ + if (! language_specific_data) + return _URC_CONTINUE_UNWIND; + + /* Parse the LSDA header. */ + p = parse_lsda_header (context, language_specific_data, &info); + info.ttype_base = base_of_encoded_value (info.ttype_encoding, context); + ip = _Unwind_GetIP (context) - 1; + landing_pad = 0; + action_record = 0; + handler_switch_value = 0; + + #ifdef SJLJ_EXCEPTIONS + /* The given "IP" is an index into the call-site table, with two + exceptions -- -1 means no-action, and 0 means terminate. But + since we're using uleb128 values, we've not got random access + to the array. */ + if ((int) ip < 0) + return _URC_CONTINUE_UNWIND; + else + { + _Unwind_Word cs_lp, cs_action; + do + { + p = read_uleb128 (p, &cs_lp); + p = read_uleb128 (p, &cs_action); + } + while (--ip); + + /* Can never have null landing pad for sjlj -- that would have + been indicated by a -1 call site index. */ + landing_pad = cs_lp + 1; + if (cs_action) + action_record = info.action_table + cs_action - 1; + goto found_something; + } + #else + /* Search the call-site table for the action associated with this IP. */ + while (p < info.action_table) + { + _Unwind_Ptr cs_start, cs_len, cs_lp; + _Unwind_Word cs_action; + + /* Note that all call-site encodings are "absolute" displacements. */ + p = read_encoded_value (0, info.call_site_encoding, p, &cs_start); + p = read_encoded_value (0, info.call_site_encoding, p, &cs_len); + p = read_encoded_value (0, info.call_site_encoding, p, &cs_lp); + p = read_uleb128 (p, &cs_action); + + /* The table is sorted, so if we've passed the ip, stop. */ + if (ip < info.Start + cs_start) + p = info.action_table; + else if (ip < info.Start + cs_start + cs_len) + { + if (cs_lp) + landing_pad = info.LPStart + cs_lp; + if (cs_action) + action_record = info.action_table + cs_action - 1; + goto found_something; + } + } + #endif /* SJLJ_EXCEPTIONS */ + + /* If ip is not present in the table, C++ would call terminate. */ + /* ??? As with Java, it's perhaps better to tweek the LSDA to + that no-action is mapped to no-entry. */ + return _URC_CONTINUE_UNWIND; + + found_something: + saw_cleanup = 0; + saw_handler = 0; + + if (landing_pad == 0) + { + /* If ip is present, and has a null landing pad, there are + no cleanups or handlers to be run. */ + } + else if (action_record == 0) + { + /* If ip is present, has a non-null landing pad, and a null + action table offset, then there are only cleanups present. + Cleanups use a zero switch value, as set above. */ + saw_cleanup = 1; + } + else + { + /* Otherwise we have a catch handler. */ + _Unwind_Sword ar_filter, ar_disp; + + while (1) + { + p = action_record; + p = read_sleb128 (p, &ar_filter); + read_sleb128 (p, &ar_disp); + + if (ar_filter == 0) + { + /* Zero filter values are cleanups. */ + saw_cleanup = 1; + } + + /* During forced unwinding, we only run cleanups. With a + foreign exception class, we have no class info to match. */ + else if ((actions & _UA_FORCE_UNWIND) + || exception_class != __objc_exception_class) + ; + + else if (ar_filter > 0) + { + /* Positive filter values are handlers. */ + + Class catch_type = get_ttype_entry (&info, ar_filter); + + if (isKindOf (xh->value, catch_type)) + { + handler_switch_value = ar_filter; + saw_handler = 1; + break; + } + } + else + { + /* Negative filter values are exception specifications, + which Objective-C does not use. */ + abort (); + } + + if (ar_disp == 0) + break; + action_record = p + ar_disp; + } + } + + if (! saw_handler && ! saw_cleanup) + return _URC_CONTINUE_UNWIND; + + if (actions & _UA_SEARCH_PHASE) + { + if (!saw_handler) + return _URC_CONTINUE_UNWIND; + + /* For domestic exceptions, we cache data from phase 1 for phase 2. */ + if (exception_class == __objc_exception_class) + { + xh->handlerSwitchValue = handler_switch_value; + xh->landingPad = landing_pad; + } + return _URC_HANDLER_FOUND; + } + + install_context: + _Unwind_SetGR (context, __builtin_eh_return_data_regno (0), + __builtin_extend_pointer (xh->value)); + _Unwind_SetGR (context, __builtin_eh_return_data_regno (1), + handler_switch_value); + _Unwind_SetIP (context, landing_pad); + return _URC_INSTALL_CONTEXT; + } + + static void + __objc_exception_cleanup (_Unwind_Reason_Code code __attribute__((unused)), + struct _Unwind_Exception *exc) + { + free (exc); + } + + void + objc_exception_throw (id value) + { + struct ObjcException *header = calloc (1, sizeof (*header)); + header->base.exception_class = __objc_exception_class; + header->base.exception_cleanup = __objc_exception_cleanup; + header->value = value; + + #ifdef SJLJ_EXCEPTIONS + _Unwind_SjLj_RaiseException (&header->base); + #else + _Unwind_RaiseException (&header->base); + #endif + + /* Some sort of unwinding error. */ + abort (); + } diff -Nrcpad gcc-3.4.3/libobjc/gc.c gcc-4.0.0/libobjc/gc.c *** gcc-3.4.3/libobjc/gc.c Fri May 23 20:04:58 2003 --- gcc-4.0.0/libobjc/gc.c Mon Dec 20 22:32:39 2004 *************** Boston, MA 02111-1307, USA. */ *** 31,56 **** #include #include #if OBJC_WITH_GC #include /* gc_typed.h uses the following but doesn't declare them */ typedef GC_word word; typedef GC_signed_word signed_word; ! ! #if BITS_PER_WORD == 32 ! # define LOGWL 5 ! # define modWORDSZ(n) ((n) & 0x1f) /* n mod size of word */ ! #endif ! ! #if BITS_PER_WORD == 64 ! # define LOGWL 6 ! # define modWORDSZ(n) ((n) & 0x3f) /* n mod size of word */ ! #endif ! ! #define divWORDSZ(n) ((n) >> LOGWL) /* divide n by size of word */ #include --- 31,47 ---- #include #include + #include #if OBJC_WITH_GC #include + #include /* gc_typed.h uses the following but doesn't declare them */ typedef GC_word word; typedef GC_signed_word signed_word; ! #define BITS_PER_WORD (CHAR_BIT * sizeof (word)) #include diff -Nrcpad gcc-3.4.3/libobjc/hash.c gcc-4.0.0/libobjc/hash.c *** gcc-3.4.3/libobjc/hash.c Fri May 23 20:25:39 2003 --- gcc-4.0.0/libobjc/hash.c Wed Mar 2 20:12:17 2005 *************** *** 1,5 **** /* Hash tables for Objective C internal structures ! Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc. This file is part of GCC. --- 1,5 ---- /* Hash tables for Objective C internal structures ! Copyright (C) 1993, 1996, 1997, 2004 Free Software Foundation, Inc. This file is part of GCC. *************** Boston, MA 02111-1307, USA. */ *** 40,47 **** ((cache)->size * 2) cache_ptr ! hash_new (unsigned int size, hash_func_type hash_func, ! compare_func_type compare_func) { cache_ptr cache; --- 40,47 ---- ((cache)->size * 2) cache_ptr ! objc_hash_new (unsigned int size, hash_func_type hash_func, ! compare_func_type compare_func) { cache_ptr cache; *************** hash_new (unsigned int size, hash_func_t *** 77,83 **** void ! hash_delete (cache_ptr cache) { node_ptr node; node_ptr next_node; --- 77,83 ---- void ! objc_hash_delete (cache_ptr cache) { node_ptr node; node_ptr next_node; *************** hash_delete (cache_ptr cache) *** 85,101 **** /* Purge all key/value pairs from the table. */ /* Step through the nodes one by one and remove every node WITHOUT ! using hash_next. this makes hash_delete much more efficient. */ for (i = 0;i < cache->size;i++) { if ((node = cache->node_table[i])) { /* an entry in the hash table has been found, now step through the nodes next in the list and free them. */ while ((next_node = node->next)) { ! hash_remove (cache,node->key); node = next_node; } ! hash_remove (cache,node->key); } } --- 85,101 ---- /* Purge all key/value pairs from the table. */ /* Step through the nodes one by one and remove every node WITHOUT ! using objc_hash_next. this makes objc_hash_delete much more efficient. */ for (i = 0;i < cache->size;i++) { if ((node = cache->node_table[i])) { /* an entry in the hash table has been found, now step through the nodes next in the list and free them. */ while ((next_node = node->next)) { ! objc_hash_remove (cache,node->key); node = next_node; } ! objc_hash_remove (cache,node->key); } } *************** hash_delete (cache_ptr cache) *** 106,112 **** void ! hash_add (cache_ptr *cachep, const void *key, void *value) { size_t indx = (*(*cachep)->hash_func)(*cachep, key); node_ptr node = (node_ptr) objc_calloc (1, sizeof (struct cache_node)); --- 106,112 ---- void ! objc_hash_add (cache_ptr *cachep, const void *key, void *value) { size_t indx = (*(*cachep)->hash_func)(*cachep, key); node_ptr node = (node_ptr) objc_calloc (1, sizeof (struct cache_node)); *************** hash_add (cache_ptr *cachep, const void *** 149,167 **** primitive functions thereby increasing its correctness. */ node_ptr node1 = NULL; ! cache_ptr new = hash_new (EXPANSION (*cachep), ! (*cachep)->hash_func, ! (*cachep)->compare_func); DEBUG_PRINTF ("Expanding cache %#x from %d to %d\n", ! *cachep, (*cachep)->size, new->size); /* Copy the nodes from the first hash table to the new one. */ ! while ((node1 = hash_next (*cachep, node1))) ! hash_add (&new, node1->key, node1->value); /* Trash the old cache. */ ! hash_delete (*cachep); /* Return a pointer to the new hash table. */ *cachep = new; --- 149,167 ---- primitive functions thereby increasing its correctness. */ node_ptr node1 = NULL; ! cache_ptr new = objc_hash_new (EXPANSION (*cachep), ! (*cachep)->hash_func, ! (*cachep)->compare_func); DEBUG_PRINTF ("Expanding cache %#x from %d to %d\n", ! (int) *cachep, (*cachep)->size, new->size); /* Copy the nodes from the first hash table to the new one. */ ! while ((node1 = objc_hash_next (*cachep, node1))) ! objc_hash_add (&new, node1->key, node1->value); /* Trash the old cache. */ ! objc_hash_delete (*cachep); /* Return a pointer to the new hash table. */ *cachep = new; *************** hash_add (cache_ptr *cachep, const void *** 170,176 **** void ! hash_remove (cache_ptr cache, const void *key) { size_t indx = (*cache->hash_func)(cache, key); node_ptr node = cache->node_table[indx]; --- 170,176 ---- void ! objc_hash_remove (cache_ptr cache, const void *key) { size_t indx = (*cache->hash_func)(cache, key); node_ptr node = cache->node_table[indx]; *************** hash_remove (cache_ptr cache, const void *** 206,212 **** node_ptr ! hash_next (cache_ptr cache, node_ptr node) { /* If the scan is being started then reset the last node visitied pointer and bucket index. */ --- 206,212 ---- node_ptr ! objc_hash_next (cache_ptr cache, node_ptr node) { /* If the scan is being started then reset the last node visitied pointer and bucket index. */ *************** hash_next (cache_ptr cache, node_ptr nod *** 246,252 **** Return NULL if the KEY is not recorded. */ void * ! hash_value_for_key (cache_ptr cache, const void *key) { node_ptr node = cache->node_table[(*cache->hash_func)(cache, key)]; void *retval = NULL; --- 246,252 ---- Return NULL if the KEY is not recorded. */ void * ! objc_hash_value_for_key (cache_ptr cache, const void *key) { node_ptr node = cache->node_table[(*cache->hash_func)(cache, key)]; void *retval = NULL; *************** hash_value_for_key (cache_ptr cache, con *** 267,273 **** Return NO if it does not */ BOOL ! hash_is_key_in_hash (cache_ptr cache, const void *key) { node_ptr node = cache->node_table[(*cache->hash_func)(cache, key)]; --- 267,273 ---- Return NO if it does not */ BOOL ! objc_hash_is_key_in_hash (cache_ptr cache, const void *key) { node_ptr node = cache->node_table[(*cache->hash_func)(cache, key)]; diff -Nrcpad gcc-3.4.3/libobjc/hash_compat.c gcc-4.0.0/libobjc/hash_compat.c *** gcc-3.4.3/libobjc/hash_compat.c Thu Jan 1 00:00:00 1970 --- gcc-4.0.0/libobjc/hash_compat.c Wed Mar 2 20:12:17 2005 *************** *** 0 **** --- 1,97 ---- + /* Binary compatibility hash implementations for Objective C. + Copyright (C) 2005 Free Software Foundation, Inc. + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GCC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* As a special exception, if you link this library with files + compiled with GCC to produce an executable, this does not cause + the resulting executable to be covered by the GNU General Public License. + This exception does not however invalidate any other reasons why + the executable file might be covered by the GNU General Public License. */ + + #define OBJC_IGNORE_DEPRECATED_API 1 + #include "hash.h" + + cache_ptr + hash_new (unsigned int size, + hash_func_type hash_func, + compare_func_type compare_func) + { + return objc_hash_new(size, hash_func, compare_func); + } + + void + hash_delete(cache_ptr cache) + { + objc_hash_delete(cache); + } + + void + hash_add (cache_ptr *cachep, const void *key, void *value) + { + objc_hash_add(cachep, key, value); + } + + void + hash_remove (cache_ptr cache, const void *key) + { + objc_hash_remove (cache, key); + } + + node_ptr + hash_next (cache_ptr cache, node_ptr node) + { + return objc_hash_next (cache, node); + } + + void * + hash_value_for_key (cache_ptr cache, const void *key) + { + return objc_hash_value_for_key (cache, key); + } + + BOOL + hash_is_key_in_hash (cache_ptr cache, const void *key) + { + return objc_hash_is_key_in_hash (cache, key); + } + + unsigned int + hash_ptr (cache_ptr cache, const void *key) + { + return objc_hash_ptr (cache, key); + } + + unsigned int + hash_string (cache_ptr cache, const void *key) + { + return objc_hash_string (cache, key); + } + + int + compare_ptrs (const void *k1, const void *k2) + { + return objc_compare_ptrs (k1, k2); + } + + int + compare_strings (const void *k1, const void *k2) + { + return objc_compare_strings (k1, k2); + } + diff -Nrcpad gcc-3.4.3/libobjc/init.c gcc-4.0.0/libobjc/init.c *** gcc-3.4.3/libobjc/init.c Fri May 23 20:25:39 2003 --- gcc-4.0.0/libobjc/init.c Wed Mar 2 20:12:17 2005 *************** __objc_send_message_in_list (MethodList_ *** 363,372 **** Method_t mth = &method_list->method_list[i]; if (mth->method_name && sel_eq (mth->method_name, op) ! && ! hash_is_key_in_hash (__objc_load_methods, mth->method_imp)) { /* Add this method into the +load hash table */ ! hash_add (&__objc_load_methods, mth->method_imp, mth->method_imp); DEBUG_PRINTF ("sending +load in class: %s\n", class->name); --- 363,374 ---- Method_t mth = &method_list->method_list[i]; if (mth->method_name && sel_eq (mth->method_name, op) ! && ! objc_hash_is_key_in_hash (__objc_load_methods, mth->method_imp)) { /* Add this method into the +load hash table */ ! objc_hash_add (&__objc_load_methods, ! mth->method_imp, ! mth->method_imp); DEBUG_PRINTF ("sending +load in class: %s\n", class->name); *************** __objc_exec_class (Module_t module) *** 538,545 **** __objc_init_class_tables (); __objc_init_dispatch_tables (); __objc_class_tree_list = list_cons (NULL, __objc_class_tree_list); ! __objc_load_methods ! = hash_new (128, (hash_func_type)hash_ptr, compare_ptrs); previous_constructors = 1; } --- 540,548 ---- __objc_init_class_tables (); __objc_init_dispatch_tables (); __objc_class_tree_list = list_cons (NULL, __objc_class_tree_list); ! __objc_load_methods = objc_hash_new (128, ! (hash_func_type)objc_hash_ptr, ! objc_compare_ptrs); previous_constructors = 1; } diff -Nrcpad gcc-3.4.3/libobjc/libobjc.def gcc-4.0.0/libobjc/libobjc.def *** gcc-3.4.3/libobjc/libobjc.def Fri May 23 20:25:39 2003 --- gcc-4.0.0/libobjc/libobjc.def Wed Mar 2 20:12:17 2005 *************** LIBRARY libobjc *** 22,27 **** --- 22,28 ---- EXPORTS search_for_method_in_list objc_get_uninstalled_dtable + objc_hash_is_key_in_hash hash_is_key_in_hash objc_verror _objc_load_callback *************** sarray_lazy_copy *** 155,163 **** --- 156,170 ---- sarray_new sarray_realloc sarray_remove_garbage + objc_hash_add hash_add + objc_hash_delete hash_delete + objc_hash_new hash_new + objc_hash_next hash_next + objc_hash_remove hash_remove + objc_hash_value_for_key hash_value_for_key diff -Nrcpad gcc-3.4.3/libobjc/linking.m gcc-4.0.0/libobjc/linking.m *** gcc-3.4.3/libobjc/linking.m Fri May 23 20:25:39 2003 --- gcc-4.0.0/libobjc/linking.m Mon Jun 14 07:46:33 2004 *************** void __objc_linking (void) *** 38,40 **** --- 38,46 ---- [NXConstantString name]; } + #ifdef __APPLE__ + void _objcInit(void) + { + } + #endif + diff -Nrcpad gcc-3.4.3/libobjc/objc/NXConstStr.h gcc-4.0.0/libobjc/objc/NXConstStr.h *** gcc-3.4.3/libobjc/objc/NXConstStr.h Fri May 23 20:04:58 2003 --- gcc-4.0.0/libobjc/objc/NXConstStr.h Fri Aug 13 02:06:36 2004 *************** *** 1,5 **** /* Interface for the NXConstantString class for Objective-C. ! Copyright (C) 1995 Free Software Foundation, Inc. Contributed by Pieter J. Schoenmakers This file is part of GCC. --- 1,5 ---- /* Interface for the NXConstantString class for Objective-C. ! Copyright (C) 1995, 2004 Free Software Foundation, Inc. Contributed by Pieter J. Schoenmakers This file is part of GCC. *************** Boston, MA 02111-1307, USA. */ *** 28,34 **** #ifndef __nxconstantstring_INCLUDE_GNU #define __nxconstantstring_INCLUDE_GNU ! #include "objc/Object.h" @interface NXConstantString: Object { --- 28,38 ---- #ifndef __nxconstantstring_INCLUDE_GNU #define __nxconstantstring_INCLUDE_GNU ! #include ! ! #ifdef __cplusplus ! extern "C" { ! #endif @interface NXConstantString: Object { *************** Boston, MA 02111-1307, USA. */ *** 41,44 **** --- 45,52 ---- @end + #ifdef __cplusplus + } + #endif + #endif diff -Nrcpad gcc-3.4.3/libobjc/objc/Object.h gcc-4.0.0/libobjc/objc/Object.h *** gcc-3.4.3/libobjc/objc/Object.h Fri May 23 20:04:58 2003 --- gcc-4.0.0/libobjc/objc/Object.h Fri Aug 13 22:23:58 2004 *************** Boston, MA 02111-1307, USA. */ *** 30,35 **** --- 30,39 ---- #include #include + #ifdef __cplusplus + extern "C" { + #endif + /* * All classes are derived from Object. As such, * this is the overhead tacked onto those objects. *************** Boston, MA 02111-1307, USA. */ *** 121,124 **** --- 125,132 ---- @end + #ifdef __cplusplus + } + #endif + #endif diff -Nrcpad gcc-3.4.3/libobjc/objc/Protocol.h gcc-4.0.0/libobjc/objc/Protocol.h *** gcc-3.4.3/libobjc/objc/Protocol.h Fri May 23 20:04:58 2003 --- gcc-4.0.0/libobjc/objc/Protocol.h Fri Aug 13 02:06:36 2004 *************** *** 1,5 **** /* Declare the class Protocol for Objective C programs. ! Copyright (C) 1993 Free Software Foundation, Inc. This file is part of GCC. --- 1,5 ---- /* Declare the class Protocol for Objective C programs. ! Copyright (C) 1993, 2004 Free Software Foundation, Inc. This file is part of GCC. *************** Boston, MA 02111-1307, USA. */ *** 27,33 **** #ifndef __Protocol_INCLUDE_GNU #define __Protocol_INCLUDE_GNU ! #include "objc/Object.h" @interface Protocol : Object { --- 27,37 ---- #ifndef __Protocol_INCLUDE_GNU #define __Protocol_INCLUDE_GNU ! #include ! ! #ifdef __cplusplus ! extern "C" { ! #endif @interface Protocol : Object { *************** Boston, MA 02111-1307, USA. */ *** 52,58 **** @end ! ! #endif /* not __Protocol_INCLUDE_GNU */ --- 56,63 ---- @end ! #ifdef __cplusplus ! } ! #endif #endif /* not __Protocol_INCLUDE_GNU */ diff -Nrcpad gcc-3.4.3/libobjc/objc/encoding.h gcc-4.0.0/libobjc/objc/encoding.h *** gcc-3.4.3/libobjc/objc/encoding.h Fri May 23 20:04:58 2003 --- gcc-4.0.0/libobjc/objc/encoding.h Fri Aug 13 22:23:58 2004 *************** *** 1,5 **** /* Encoding of types for Objective C. ! Copyright (C) 1993, 1997, 2002 Free Software Foundation, Inc. Author: Kresten Krab Thorup --- 1,5 ---- /* Encoding of types for Objective C. ! Copyright (C) 1993, 1997, 2002, 2004 Free Software Foundation, Inc. Author: Kresten Krab Thorup *************** Boston, MA 02111-1307, USA. */ *** 29,36 **** #ifndef __encoding_INCLUDE_GNU #define __encoding_INCLUDE_GNU #include ! #include "objc/objc-api.h" #define _C_CONST 'r' #define _C_IN 'n' --- 29,40 ---- #ifndef __encoding_INCLUDE_GNU #define __encoding_INCLUDE_GNU + #include #include ! ! #ifdef __cplusplus ! extern "C" { ! #endif /* __cplusplus */ #define _C_CONST 'r' #define _C_IN 'n' *************** void objc_layout_structure_get_info (str *** 96,99 **** --- 100,107 ---- unsigned int *align, const char **type); + #ifdef __cplusplus + } + #endif /* __cplusplus */ + #endif /* __encoding_INCLUDE_GNU */ diff -Nrcpad gcc-3.4.3/libobjc/objc/hash.h gcc-4.0.0/libobjc/objc/hash.h *** gcc-3.4.3/libobjc/objc/hash.h Mon Oct 20 21:50:13 2003 --- gcc-4.0.0/libobjc/objc/hash.h Thu Mar 3 18:25:54 2005 *************** *** 1,5 **** /* Hash tables for Objective C method dispatch. ! Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. This file is part of GCC. --- 1,5 ---- /* Hash tables for Objective C method dispatch. ! Copyright (C) 1993, 1995, 1996, 2004 Free Software Foundation, Inc. This file is part of GCC. *************** Boston, MA 02111-1307, USA. */ *** 32,37 **** --- 32,41 ---- #include #include + #ifdef __cplusplus + extern "C" { + #endif /* __cplusplus */ + /* * This data structure is used to hold items * stored in a hash table. Each node holds *************** typedef struct cache_node *** 58,64 **** * * Unfortunately there is a mutual data structure reference problem with this * typedef. Therefore, to remove compiler warnings the functions passed to ! * hash_new will have to be casted to this type. */ typedef unsigned int (*hash_func_type) (void *, const void *); --- 62,68 ---- * * Unfortunately there is a mutual data structure reference problem with this * typedef. Therefore, to remove compiler warnings the functions passed to ! * objc_hash_new will have to be casted to this type. */ typedef unsigned int (*hash_func_type) (void *, const void *); *************** extern cache_ptr module_hash_table, clas *** 107,131 **** /* Allocate and initialize a hash table. */ ! cache_ptr hash_new (unsigned int size, ! hash_func_type hash_func, ! compare_func_type compare_func); /* Deallocate all of the hash nodes and the cache itself. */ ! void hash_delete (cache_ptr cache); /* Add the key/value pair to the hash table. If the hash table reaches a level of fullness then it will be resized. assert if the key is already in the hash. */ ! void hash_add (cache_ptr *cachep, const void *key, void *value); /* Remove the key/value pair from the hash table. assert if the key isn't in the table. */ ! void hash_remove (cache_ptr cache, const void *key); /* Used to index through the hash table. Start with NULL to get the first entry. --- 111,135 ---- /* Allocate and initialize a hash table. */ ! cache_ptr objc_hash_new (unsigned int size, ! hash_func_type hash_func, ! compare_func_type compare_func); /* Deallocate all of the hash nodes and the cache itself. */ ! void objc_hash_delete (cache_ptr cache); /* Add the key/value pair to the hash table. If the hash table reaches a level of fullness then it will be resized. assert if the key is already in the hash. */ ! void objc_hash_add (cache_ptr *cachep, const void *key, void *value); /* Remove the key/value pair from the hash table. assert if the key isn't in the table. */ ! void objc_hash_remove (cache_ptr cache, const void *key); /* Used to index through the hash table. Start with NULL to get the first entry. *************** void hash_remove (cache_ptr cache, const *** 136,150 **** Cache nodes are returned such that key or value can be extracted. */ ! node_ptr hash_next (cache_ptr cache, node_ptr node); /* Used to return a value from a hash table using a given key. */ ! void *hash_value_for_key (cache_ptr cache, const void *key); /* Used to determine if the given key exists in the hash table */ ! BOOL hash_is_key_in_hash (cache_ptr cache, const void *key); /************************************************ --- 140,154 ---- Cache nodes are returned such that key or value can be extracted. */ ! node_ptr objc_hash_next (cache_ptr cache, node_ptr node); /* Used to return a value from a hash table using a given key. */ ! void *objc_hash_value_for_key (cache_ptr cache, const void *key); /* Used to determine if the given key exists in the hash table */ ! BOOL objc_hash_is_key_in_hash (cache_ptr cache, const void *key); /************************************************ *************** BOOL hash_is_key_in_hash (cache_ptr cach *** 159,165 **** except for those likely to be 0 due to alignment.) */ static inline unsigned int ! hash_ptr (cache_ptr cache, const void *key) { return ((size_t)key / sizeof (void *)) & cache->mask; } --- 163,169 ---- except for those likely to be 0 due to alignment.) */ static inline unsigned int ! objc_hash_ptr (cache_ptr cache, const void *key) { return ((size_t)key / sizeof (void *)) & cache->mask; } *************** hash_ptr (cache_ptr cache, const void *k *** 168,178 **** /* Calculate a hash code by iterating over a NULL terminate string. */ static inline unsigned int ! hash_string (cache_ptr cache, const void *key) { unsigned int ret = 0; unsigned int ctr = 0; ! const char *ckey = key; while (*ckey) { ret ^= *ckey++ << ctr; --- 172,182 ---- /* Calculate a hash code by iterating over a NULL terminate string. */ static inline unsigned int ! objc_hash_string (cache_ptr cache, const void *key) { unsigned int ret = 0; unsigned int ctr = 0; ! const char *ckey = (const char *) key; while (*ckey) { ret ^= *ckey++ << ctr; *************** hash_string (cache_ptr cache, const void *** 185,191 **** /* Compare two pointers for equality. */ static inline int ! compare_ptrs (const void *k1, const void *k2) { return (k1 == k2); } --- 189,195 ---- /* Compare two pointers for equality. */ static inline int ! objc_compare_ptrs (const void *k1, const void *k2) { return (k1 == k2); } *************** compare_ptrs (const void *k1, const void *** 193,207 **** /* Compare two strings. */ static inline int ! compare_strings (const void *k1, const void *k2) { if (k1 == k2) return 1; else if (k1 == 0 || k2 == 0) return 0; else ! return ! strcmp (k1, k2); } #endif /* not __hash_INCLUDE_GNU */ --- 197,316 ---- /* Compare two strings. */ static inline int ! objc_compare_strings (const void *k1, const void *k2) { if (k1 == k2) return 1; else if (k1 == 0 || k2 == 0) return 0; else ! return ! strcmp ((const char *) k1, (const char *) k2); ! } ! ! #ifndef OBJC_IGNORE_DEPRECATED_API ! /* Deprecated as of 4.0 */ ! ! static inline cache_ptr ! hash_new (unsigned int size, ! hash_func_type hash_func, ! compare_func_type compare_func) __attribute__ ((deprecated)); ! static inline cache_ptr ! hash_new (unsigned int size, ! hash_func_type hash_func, ! compare_func_type compare_func) ! { ! return objc_hash_new(size, hash_func, compare_func); ! } ! ! static inline void ! hash_delete(cache_ptr cache) __attribute__ ((deprecated)); ! static inline void ! hash_delete(cache_ptr cache) ! { ! objc_hash_delete(cache); ! } ! ! static inline void ! hash_add (cache_ptr *cachep, ! const void *key, ! void *value) __attribute__ ((deprecated)); ! static inline void ! hash_add (cache_ptr *cachep, const void *key, void *value) ! { ! objc_hash_add(cachep, key, value); } + static inline void + hash_remove (cache_ptr cache, const void *key) __attribute__ ((deprecated)); + static inline void + hash_remove (cache_ptr cache, const void *key) + { + objc_hash_remove (cache, key); + } + + static inline node_ptr + hash_next (cache_ptr cache, node_ptr node) __attribute__ ((deprecated)); + static inline node_ptr + hash_next (cache_ptr cache, node_ptr node) + { + return objc_hash_next (cache, node); + } + + static inline void * + hash_value_for_key (cache_ptr cache, + const void *key) __attribute__ ((deprecated)); + static inline void * + hash_value_for_key (cache_ptr cache, const void *key) + { + return objc_hash_value_for_key (cache, key); + } + + static inline BOOL + hash_is_key_in_hash (cache_ptr cache, + const void *key) __attribute__ ((deprecated)); + static inline BOOL + hash_is_key_in_hash (cache_ptr cache, const void *key) + { + return objc_hash_is_key_in_hash (cache, key); + } + + static inline unsigned int + hash_ptr (cache_ptr cache, const void *key) __attribute__ ((deprecated)); + static inline unsigned int + hash_ptr (cache_ptr cache, const void *key) + { + return objc_hash_ptr (cache, key); + } + + static inline unsigned int + hash_string (cache_ptr cache, const void *key) __attribute__ ((deprecated)); + static inline unsigned int + hash_string (cache_ptr cache, const void *key) + { + return objc_hash_string (cache, key); + } + + static inline int + compare_ptrs (const void *k1, const void *k2) __attribute__ ((deprecated)); + static inline int + compare_ptrs (const void *k1, const void *k2) + { + return objc_compare_ptrs (k1, k2); + } + + static inline int + compare_strings (const void *k1, const void *k2) __attribute__ ((deprecated)); + static inline int + compare_strings (const void *k1, const void *k2) + { + return objc_compare_strings (k1, k2); + } + #endif /* OBJC_IGNORE_DEPRECATED_API */ + + + #ifdef __cplusplus + } + #endif /* __cplusplus */ + #endif /* not __hash_INCLUDE_GNU */ diff -Nrcpad gcc-3.4.3/libobjc/objc/objc-api.h gcc-4.0.0/libobjc/objc/objc-api.h *** gcc-3.4.3/libobjc/objc/objc-api.h Fri May 23 20:04:58 2003 --- gcc-4.0.0/libobjc/objc/objc-api.h Fri Aug 13 22:23:58 2004 *************** *** 1,5 **** /* GNU Objective-C Runtime API. ! Copyright (C) 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc. This file is part of GCC. --- 1,5 ---- /* GNU Objective-C Runtime API. ! Copyright (C) 1993, 1995, 1996, 1997, 2002, 2004 Free Software Foundation, Inc. This file is part of GCC. *************** Boston, MA 02111-1307, USA. */ *** 27,38 **** #ifndef __objc_api_INCLUDE_GNU #define __objc_api_INCLUDE_GNU ! #include "objc/objc.h" ! #include "objc/hash.h" ! #include "objc/thr.h" #include #include /* For functions which return Method_t */ #define METHOD_NULL (Method_t)0 /* Boolean typedefs */ --- 27,43 ---- #ifndef __objc_api_INCLUDE_GNU #define __objc_api_INCLUDE_GNU ! #include ! #include ! #include ! #include #include #include + #ifdef __cplusplus + extern "C" { + #endif /* __cplusplus */ + /* For functions which return Method_t */ #define METHOD_NULL (Method_t)0 /* Boolean typedefs */ *************** struct objc_method_description *** 100,106 **** extern void objc_error(id object, int code, const char* fmt, ...); extern void objc_verror(id object, int code, const char* fmt, va_list ap); typedef BOOL (*objc_error_handler)(id, int code, const char *fmt, va_list ap); ! objc_error_handler objc_set_error_handler(objc_error_handler func); /* ** Error codes --- 105,111 ---- extern void objc_error(id object, int code, const char* fmt, ...); extern void objc_verror(id object, int code, const char* fmt, va_list ap); typedef BOOL (*objc_error_handler)(id, int code, const char *fmt, va_list ap); ! extern objc_error_handler objc_set_error_handler(objc_error_handler func); /* ** Error codes *************** extern BOOL objc_trace; *** 146,152 **** --- 151,161 ---- struct objc_static_instances { char *class_name; + #ifdef __cplusplus + id instances[1]; + #else id instances[0]; + #endif }; /* *************** typedef struct objc_ivar_list { *** 235,262 **** ** and categories can break them across modules. To handle this problem is a ** singly linked list of methods. */ ! typedef struct objc_method Method; ! typedef Method* Method_t; typedef struct objc_method_list { ! struct objc_method_list* method_next; /* This variable is used to link ! a method list to another. It ! is a singly linked list. */ ! int method_count; /* Number of methods defined in ! this structure. */ ! struct objc_method { ! SEL method_name; /* This variable is the method's ! name. It is a char*. ! The unique integer passed to ! objc_msg_send is a char* too. ! It is compared against ! method_name using strcmp. */ ! const char* method_types; /* Description of the method's ! parameter list. Useful for ! debuggers. */ ! IMP method_imp; /* Address of the method in the ! executable. */ ! } method_list[1]; /* Variable length ! structure. */ } MethodList, *MethodList_t; struct objc_protocol_list { --- 244,271 ---- ** and categories can break them across modules. To handle this problem is a ** singly linked list of methods. */ ! typedef struct objc_method { ! SEL method_name; /* This variable is the method's ! name. It is a char*. ! The unique integer passed to ! objc_msg_send is a char* too. ! It is compared against ! method_name using strcmp. */ ! const char* method_types; /* Description of the method's ! parameter list. Useful for ! debuggers. */ ! IMP method_imp; /* Address of the method in the ! executable. */ ! } Method, *Method_t; ! typedef struct objc_method_list { ! struct objc_method_list* method_next; /* This variable is used to link ! a method list to another. It ! is a singly linked list. */ ! int method_count; /* Number of methods defined in ! this structure. */ ! Method method_list[1]; /* Variable length ! structure. */ } MethodList, *MethodList_t; struct objc_protocol_list { *************** typedef struct objc_category { *** 342,348 **** --- 351,361 ---- typedef struct objc_super { id self; /* Id of the object sending the message. */ + #ifdef __cplusplus + Class super_class; + #else Class class; /* Object's super class. */ + #endif } Super, *Super_t; IMP objc_msg_lookup_super(Super_t super, SEL sel); *************** retval_t objc_msg_sendv(id, SEL, arglist *** 357,363 **** ** This may e.g. try to load in the class using dynamic loading. ** The function is guaranteed to be passed a non-NULL name string. */ ! extern Class (*_objc_lookup_class)(const char *name); /* ** This is a hook which is called by __objc_exec_class every time a class --- 370,376 ---- ** This may e.g. try to load in the class using dynamic loading. ** The function is guaranteed to be passed a non-NULL name string. */ ! objc_EXPORT Class (*_objc_lookup_class)(const char *name); /* ** This is a hook which is called by __objc_exec_class every time a class *************** extern Class (*_objc_lookup_class)(const *** 365,378 **** ** dynamic loader determine the classes that have been loaded when ** an object file is dynamically linked in. */ ! extern void (*_objc_load_callback)(Class class, Category* category); /* ** Hook functions for allocating, copying and disposing of instances */ ! extern id (*_objc_object_alloc)(Class class); ! extern id (*_objc_object_copy)(id object); ! extern id (*_objc_object_dispose)(id object); /* ** Standard functions for memory allocation and disposal. --- 378,391 ---- ** dynamic loader determine the classes that have been loaded when ** an object file is dynamically linked in. */ ! objc_EXPORT void (*_objc_load_callback)(Class _class, Category* category); /* ** Hook functions for allocating, copying and disposing of instances */ ! objc_EXPORT id (*_objc_object_alloc)(Class _class); ! objc_EXPORT id (*_objc_object_copy)(id object); ! objc_EXPORT id (*_objc_object_dispose)(id object); /* ** Standard functions for memory allocation and disposal. *************** objc_free(void *mem); *** 408,430 **** ** Users should call the normal objc routines above for ** memory allocation and disposal within their programs. */ ! extern void *(*_objc_malloc)(size_t); ! extern void *(*_objc_atomic_malloc)(size_t); ! extern void *(*_objc_valloc)(size_t); ! extern void *(*_objc_realloc)(void *, size_t); ! extern void *(*_objc_calloc)(size_t, size_t); ! extern void (*_objc_free)(void *); /* ** Hook for method forwarding. This makes it easy to substitute a ** library, such as ffcall, that implements closures, thereby avoiding ** gcc's __builtin_apply problems. */ ! extern IMP (*__objc_msg_forward)(SEL); ! Method_t class_get_class_method(MetaClass class, SEL aSel); ! Method_t class_get_instance_method(Class class, SEL aSel); Class class_pose_as(Class impostor, Class superclass); --- 421,443 ---- ** Users should call the normal objc routines above for ** memory allocation and disposal within their programs. */ ! objc_EXPORT void *(*_objc_malloc)(size_t); ! objc_EXPORT void *(*_objc_atomic_malloc)(size_t); ! objc_EXPORT void *(*_objc_valloc)(size_t); ! objc_EXPORT void *(*_objc_realloc)(void *, size_t); ! objc_EXPORT void *(*_objc_calloc)(size_t, size_t); ! objc_EXPORT void (*_objc_free)(void *); /* ** Hook for method forwarding. This makes it easy to substitute a ** library, such as ffcall, that implements closures, thereby avoiding ** gcc's __builtin_apply problems. */ ! objc_EXPORT IMP (*__objc_msg_forward)(SEL); ! Method_t class_get_class_method(MetaClass _class, SEL aSel); ! Method_t class_get_instance_method(Class _class, SEL aSel); Class class_pose_as(Class impostor, Class superclass); *************** SEL sel_register_typed_name(const char * *** 453,518 **** BOOL sel_is_mapped (SEL aSel); ! extern id class_create_instance(Class class); static inline const char * ! class_get_class_name(Class class) { ! return CLS_ISCLASS(class)?class->name:((class==Nil)?"Nil":0); } static inline long ! class_get_instance_size(Class class) { ! return CLS_ISCLASS(class)?class->instance_size:0; } static inline MetaClass ! class_get_meta_class(Class class) { ! return CLS_ISCLASS(class)?class->class_pointer:Nil; } static inline Class ! class_get_super_class(Class class) { ! return CLS_ISCLASS(class)?class->super_class:Nil; } static inline int ! class_get_version(Class class) { ! return CLS_ISCLASS(class)?class->version:-1; } static inline BOOL ! class_is_class(Class class) { ! return CLS_ISCLASS(class); } static inline BOOL ! class_is_meta_class(Class class) { ! return CLS_ISMETA(class); } static inline void ! class_set_version(Class class, long version) { ! if (CLS_ISCLASS(class)) ! class->version = version; } static inline void * ! class_get_gc_object_type (Class class) { ! return CLS_ISCLASS(class) ? class->gc_object_type : NULL; } /* Mark the instance variable as innaccessible to the garbage collector */ ! extern void class_ivar_set_gcinvisible (Class class, const char* ivarname, BOOL gcInvisible); --- 466,531 ---- BOOL sel_is_mapped (SEL aSel); ! extern id class_create_instance(Class _class); static inline const char * ! class_get_class_name(Class _class) { ! return CLS_ISCLASS(_class)?_class->name:((_class==Nil)?"Nil":0); } static inline long ! class_get_instance_size(Class _class) { ! return CLS_ISCLASS(_class)?_class->instance_size:0; } static inline MetaClass ! class_get_meta_class(Class _class) { ! return CLS_ISCLASS(_class)?_class->class_pointer:Nil; } static inline Class ! class_get_super_class(Class _class) { ! return CLS_ISCLASS(_class)?_class->super_class:Nil; } static inline int ! class_get_version(Class _class) { ! return CLS_ISCLASS(_class)?_class->version:-1; } static inline BOOL ! class_is_class(Class _class) { ! return CLS_ISCLASS(_class); } static inline BOOL ! class_is_meta_class(Class _class) { ! return CLS_ISMETA(_class); } static inline void ! class_set_version(Class _class, long version) { ! if (CLS_ISCLASS(_class)) ! _class->version = version; } static inline void * ! class_get_gc_object_type (Class _class) { ! return CLS_ISCLASS(_class) ? _class->gc_object_type : NULL; } /* Mark the instance variable as innaccessible to the garbage collector */ ! extern void class_ivar_set_gcinvisible (Class _class, const char* ivarname, BOOL gcInvisible); *************** method_get_imp(Method_t method) *** 522,528 **** return (method!=METHOD_NULL)?method->method_imp:(IMP)0; } ! IMP get_imp (Class class, SEL sel); /* Redefine on NeXTSTEP so as not to conflict with system function */ #ifdef __NeXT__ --- 535,541 ---- return (method!=METHOD_NULL)?method->method_imp:(IMP)0; } ! IMP get_imp (Class _class, SEL sel); /* Redefine on NeXTSTEP so as not to conflict with system function */ #ifdef __NeXT__ *************** object_is_meta_class (id object) *** 601,606 **** --- 614,623 ---- struct sarray* objc_get_uninstalled_dtable(void); + #ifdef __cplusplus + } + #endif /* __cplusplus */ + #endif /* not __objc_api_INCLUDE_GNU */ diff -Nrcpad gcc-3.4.3/libobjc/objc/objc-decls.h gcc-4.0.0/libobjc/objc/objc-decls.h *** gcc-3.4.3/libobjc/objc/objc-decls.h Thu Jan 1 00:00:00 1970 --- gcc-4.0.0/libobjc/objc/objc-decls.h Tue May 25 19:10:54 2004 *************** *** 0 **** --- 1,47 ---- + /* GNU Objective-C Extern helpers for Win32. + Copyright (C) 2004 Free Software Foundation, Inc. + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + GCC is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. + + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* As a special exception, if you link this library with files compiled + with GCC to produce an executable, this does not cause the resulting + executable to be covered by the GNU General Public License. This + exception does not however invalidate any other reasons why the + executable file might be covered by the GNU General Public License. */ + + #ifndef __objc_decls_INCLUDE_GNU + #define __objc_decls_INCLUDE_GNU + + #if defined (_WIN32) || defined (__WIN32__) || defined (WIN32) + + # ifdef DLL_EXPORT /* defined by libtool (if required) */ + # define objc_EXPORT __declspec(dllexport) + # define objc_DECLARE __declspec(dllexport) + #else + # define objc_EXPORT extern __declspec(dllimport) + # define objc_DECLARE extern __declspec(dllimport) + #endif + + #else + + # define objc_EXPORT extern + # define objc_DECLARE + + #endif + + #endif /* __objc_decls_INCLUDE_GNU */ diff -Nrcpad gcc-3.4.3/libobjc/objc/objc-list.h gcc-4.0.0/libobjc/objc/objc-list.h *** gcc-3.4.3/libobjc/objc/objc-list.h Fri May 23 20:04:58 2003 --- gcc-4.0.0/libobjc/objc/objc-list.h Fri Aug 13 02:06:36 2004 *************** Boston, MA 02111-1307, USA. */ *** 28,33 **** --- 28,37 ---- #ifndef __GNU_OBJC_LIST_H #define __GNU_OBJC_LIST_H + #ifdef __cplusplus + extern "C" { + #endif /* __cplusplus */ + struct objc_list { void *head; struct objc_list *tail; *************** list_free(struct objc_list* list) *** 144,147 **** --- 148,156 ---- objc_free(list); } } + + #ifdef __cplusplus + } + #endif /* __cplusplus */ + #endif /* not __GNU_OBJC_LIST_H */ diff -Nrcpad gcc-3.4.3/libobjc/objc/objc.h gcc-4.0.0/libobjc/objc/objc.h *** gcc-3.4.3/libobjc/objc/objc.h Fri May 23 20:04:58 2003 --- gcc-4.0.0/libobjc/objc/objc.h Fri Aug 13 02:06:37 2004 *************** *** 1,5 **** /* Basic data types for Objective C. ! Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. This file is part of GCC. --- 1,5 ---- /* Basic data types for Objective C. ! Copyright (C) 1993, 1995, 1996, 2004 Free Software Foundation, Inc. This file is part of GCC. *************** typedef struct objc_protocol { *** 150,156 **** typedef void* retval_t; /* return value */ typedef void(*apply_t)(void); /* function pointer */ ! typedef union { char *arg_ptr; char arg_regs[sizeof (char*)]; } *arglist_t; /* argument frame */ --- 150,156 ---- typedef void* retval_t; /* return value */ typedef void(*apply_t)(void); /* function pointer */ ! typedef union arglist { char *arg_ptr; char arg_regs[sizeof (char*)]; } *arglist_t; /* argument frame */ diff -Nrcpad gcc-3.4.3/libobjc/objc/runtime.h gcc-4.0.0/libobjc/objc/runtime.h *** gcc-3.4.3/libobjc/objc/runtime.h Fri May 23 20:04:58 2003 --- gcc-4.0.0/libobjc/objc/runtime.h Fri Aug 13 22:23:58 2004 *************** *** 1,5 **** /* GNU Objective C Runtime internal declarations ! Copyright (C) 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc. Contributed by Kresten Krab Thorup This file is part of GCC. --- 1,5 ---- /* GNU Objective C Runtime internal declarations ! Copyright (C) 1993, 1995, 1996, 1997, 2002, 2004 Free Software Foundation, Inc. Contributed by Kresten Krab Thorup This file is part of GCC. *************** Foundation, 59 Temple Place - Suite 330, *** 32,46 **** #include #include /* so noone else will get system versions */ ! #include "assert.h" ! #include "objc/objc.h" /* core data types */ ! #include "objc/objc-api.h" /* runtime api functions */ ! #include "objc/thr.h" /* thread and mutex support */ ! #include "objc/hash.h" /* hash structures */ ! #include "objc/objc-list.h" /* linear lists */ extern void __objc_add_class_to_hash(Class); /* (objc-class.c) */ extern void __objc_init_selector_tables(void); /* (objc-sel.c) */ --- 32,50 ---- #include #include /* so noone else will get system versions */ ! #include ! #include /* core data types */ ! #include /* runtime api functions */ ! #include /* thread and mutex support */ ! #include /* hash structures */ ! #include /* linear lists */ ! ! #ifdef __cplusplus ! extern "C" { ! #endif /* __cplusplus */ extern void __objc_add_class_to_hash(Class); /* (objc-class.c) */ extern void __objc_init_selector_tables(void); /* (objc-sel.c) */ *************** extern void __objc_init_dispatch_tables( *** 49,54 **** --- 53,59 ---- extern void __objc_install_premature_dtable(Class); /* (objc-dispatch.c) */ extern void __objc_resolve_class_links(void); /* (objc-class.c) */ extern void __objc_register_selectors_from_class(Class); /* (objc-sel.c) */ + extern void __objc_register_selectors_from_list (MethodList_t); /* (selector.c) */ extern void __objc_update_dispatch_table_for_class (Class);/* (objc-msg.c) */ extern int __objc_init_thread_system(void); /* thread.c */ *************** SEL __sel_register_typed_name (const ch *** 84,89 **** struct objc_selector*, BOOL is_const); extern void __objc_generate_gc_type_description (Class); ! #endif /* not __objc_runtime_INCLUDE_GNU */ ! --- 89,96 ---- struct objc_selector*, BOOL is_const); extern void __objc_generate_gc_type_description (Class); ! #ifdef __cplusplus ! } ! #endif /* __cplusplus */ + #endif /* not __objc_runtime_INCLUDE_GNU */ diff -Nrcpad gcc-3.4.3/libobjc/objc/sarray.h gcc-4.0.0/libobjc/objc/sarray.h *** gcc-3.4.3/libobjc/objc/sarray.h Fri May 23 20:04:58 2003 --- gcc-4.0.0/libobjc/objc/sarray.h Fri Aug 13 22:50:09 2004 *************** *** 1,5 **** /* Sparse Arrays for Objective C dispatch tables ! Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. Contributed by Kresten Krab Thorup. This file is part of GCC. --- 1,5 ---- /* Sparse Arrays for Objective C dispatch tables ! Copyright (C) 1993, 1995, 1996, 2004 Free Software Foundation, Inc. Contributed by Kresten Krab Thorup. This file is part of GCC. *************** Boston, MA 02111-1307, USA. */ *** 28,33 **** --- 28,35 ---- #ifndef __sarray_INCLUDE_GNU #define __sarray_INCLUDE_GNU + #include + #define OBJC_SPARSE2 /* 2-level sparse array */ /* #define OBJC_SPARSE3 */ /* 3-level sparse array */ *************** extern const char* __objc_sparse3_id; *** 40,55 **** #endif #include ! #include "objc/thr.h" extern int nbuckets; /* for stats */ extern int nindices; extern int narrays; extern int idxsize; - #include - /* An unsigned integer of same size as a pointer */ #define SIZET_BITS (sizeof(size_t)*8) --- 42,58 ---- #endif #include + #include ! #ifdef __cplusplus ! extern "C" { ! #endif /* __cplusplus */ extern int nbuckets; /* for stats */ extern int nindices; extern int narrays; extern int idxsize; /* An unsigned integer of same size as a pointer */ #define SIZET_BITS (sizeof(size_t)*8) *************** static inline void* sarray_get_safe(stru *** 234,237 **** --- 237,244 ---- return (array->empty_bucket->elems[0]); } + #ifdef __cplusplus + } + #endif /* __cplusplus */ + #endif /* __sarray_INCLUDE_GNU */ diff -Nrcpad gcc-3.4.3/libobjc/objc/thr.h gcc-4.0.0/libobjc/objc/thr.h *** gcc-3.4.3/libobjc/objc/thr.h Fri May 23 20:04:58 2003 --- gcc-4.0.0/libobjc/objc/thr.h Fri Aug 13 02:06:37 2004 *************** *** 1,5 **** /* Thread and mutex controls for Objective C. ! Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc. Contributed by Galen C. Hunt (gchunt@cs.rochester.edu) This file is part of GCC. --- 1,5 ---- /* Thread and mutex controls for Objective C. ! Copyright (C) 1996, 1997, 2002, 2004 Free Software Foundation, Inc. Contributed by Galen C. Hunt (gchunt@cs.rochester.edu) This file is part of GCC. *************** Boston, MA 02111-1307, USA. */ *** 38,44 **** #ifndef __thread_INCLUDE_GNU #define __thread_INCLUDE_GNU ! #include "objc/objc.h" /************************************************************************* * Universal static variables: --- 38,48 ---- #ifndef __thread_INCLUDE_GNU #define __thread_INCLUDE_GNU ! #include ! ! #ifdef __cplusplus ! extern "C" { ! #endif /* __cplusplus */ /************************************************************************* * Universal static variables: *************** objc_thread_t __objc_thread_id (void); *** 142,145 **** --- 146,153 ---- int __objc_thread_set_data (void *value); void * __objc_thread_get_data (void); + #ifdef __cplusplus + } + #endif /* __cplusplus */ + #endif /* not __thread_INCLUDE_GNU */ diff -Nrcpad gcc-3.4.3/libobjc/objc/typedstream.h gcc-4.0.0/libobjc/objc/typedstream.h *** gcc-3.4.3/libobjc/objc/typedstream.h Fri May 23 20:04:58 2003 --- gcc-4.0.0/libobjc/objc/typedstream.h Fri Aug 13 22:23:58 2004 *************** *** 1,5 **** /* GNU Objective-C Typed Streams interface. ! Copyright (C) 1993, 1995 Free Software Foundation, Inc. This file is part of GCC. --- 1,5 ---- /* GNU Objective-C Typed Streams interface. ! Copyright (C) 1993, 1995, 2004 Free Software Foundation, Inc. This file is part of GCC. *************** Boston, MA 02111-1307, USA. */ *** 27,36 **** #ifndef __typedstream_INCLUDE_GNU #define __typedstream_INCLUDE_GNU ! #include "objc/objc.h" ! #include "objc/hash.h" #include typedef int (*objc_typed_read_func)(void*, char*, int); typedef int (*objc_typed_write_func)(void*, const char*, int); typedef int (*objc_typed_flush_func)(void*); --- 27,41 ---- #ifndef __typedstream_INCLUDE_GNU #define __typedstream_INCLUDE_GNU ! #include ! #include ! #include + #ifdef __cplusplus + extern "C" { + #endif /* __cplusplus */ + typedef int (*objc_typed_read_func)(void*, char*, int); typedef int (*objc_typed_write_func)(void*, const char*, int); typedef int (*objc_typed_flush_func)(void*); *************** int objc_read_types (TypedStream* stream *** 99,105 **** int objc_write_object_reference (TypedStream* stream, id object); int objc_write_root_object (TypedStream* stream, id object); ! long objc_get_stream_class_version (TypedStream* stream, Class class); /* --- 104,110 ---- int objc_write_object_reference (TypedStream* stream, id object); int objc_write_root_object (TypedStream* stream, id object); ! long objc_get_stream_class_version (TypedStream* stream, Class class_type); /* *************** void objc_close_typed_stream (TypedStrea *** 129,132 **** --- 134,141 ---- BOOL objc_end_of_typed_stream (TypedStream* stream); void objc_flush_typed_stream (TypedStream* stream); + #ifdef __cplusplus + } + #endif /* __cplusplus */ + #endif /* not __typedstream_INCLUDE_GNU */ diff -Nrcpad gcc-3.4.3/libobjc/sarray.c gcc-4.0.0/libobjc/sarray.c *** gcc-3.4.3/libobjc/sarray.c Sat Jan 10 05:47:42 2004 --- gcc-4.0.0/libobjc/sarray.c Tue May 25 19:10:52 2004 *************** *** 1,5 **** /* Sparse Arrays for Objective C dispatch tables ! Copyright (C) 1993, 1995, 1996, 2002 Free Software Foundation, Inc. This file is part of GCC. --- 1,5 ---- /* Sparse Arrays for Objective C dispatch tables ! Copyright (C) 1993, 1995, 1996, 2002, 2004 Free Software Foundation, Inc. This file is part of GCC. *************** sarray_free (struct sarray *array) { *** 459,465 **** #endif ! /* If this is a copy, go ahead and decrement/deallocate the original */ if (array->is_copy_of) sarray_free (array->is_copy_of); --- 459,467 ---- #endif ! /* If this is a copy of another array, we free it (which might just ! * decrement its reference count so it will be freed when no longer in use). ! */ if (array->is_copy_of) sarray_free (array->is_copy_of); diff -Nrcpad gcc-3.4.3/libobjc/selector.c gcc-4.0.0/libobjc/selector.c *** gcc-3.4.3/libobjc/selector.c Thu Jan 15 01:49:41 2004 --- gcc-4.0.0/libobjc/selector.c Wed Mar 2 20:12:17 2005 *************** *** 1,5 **** /* GNU Objective C Runtime selector related functions ! Copyright (C) 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc. Contributed by Kresten Krab Thorup This file is part of GCC. --- 1,5 ---- /* GNU Objective C Runtime selector related functions ! Copyright (C) 1993, 1995, 1996, 1997, 2002, 2004 Free Software Foundation, Inc. Contributed by Kresten Krab Thorup This file is part of GCC. *************** static struct sarray *__objc_selector_ar *** 35,53 **** static struct sarray *__objc_selector_names = 0; /* uid -> name !T:MUTEX */ static cache_ptr __objc_selector_hash = 0; /* name -> uid !T:MUTEX */ - static void register_selectors_from_list (MethodList_t); - /* Number of selectors stored in each of the above tables */ unsigned int __objc_selector_max_index = 0; /* !T:MUTEX */ ! void __objc_init_selector_tables () { __objc_selector_array = sarray_new (SELECTOR_HASH_SIZE, 0); __objc_selector_names = sarray_new (SELECTOR_HASH_SIZE, 0); __objc_selector_hash ! = hash_new (SELECTOR_HASH_SIZE, ! (hash_func_type) hash_string, ! (compare_func_type) compare_strings); } /* This routine is given a class and records all of the methods in its class --- 35,51 ---- static struct sarray *__objc_selector_names = 0; /* uid -> name !T:MUTEX */ static cache_ptr __objc_selector_hash = 0; /* name -> uid !T:MUTEX */ /* Number of selectors stored in each of the above tables */ unsigned int __objc_selector_max_index = 0; /* !T:MUTEX */ ! void __objc_init_selector_tables (void) { __objc_selector_array = sarray_new (SELECTOR_HASH_SIZE, 0); __objc_selector_names = sarray_new (SELECTOR_HASH_SIZE, 0); __objc_selector_hash ! = objc_hash_new (SELECTOR_HASH_SIZE, ! (hash_func_type) objc_hash_string, ! (compare_func_type) objc_compare_strings); } /* This routine is given a class and records all of the methods in its class *************** __objc_register_selectors_from_class (Cl *** 60,66 **** method_list = class->methods; while (method_list) { ! register_selectors_from_list (method_list); method_list = method_list->method_next; } } --- 58,64 ---- method_list = class->methods; while (method_list) { ! __objc_register_selectors_from_list (method_list); method_list = method_list->method_next; } } *************** __objc_register_selectors_from_class (Cl *** 70,90 **** the record table. This is the routine that does the actual recording work. ! This one is only called for Class objects. For categories, ! class_add_method_list is called. */ ! static void ! register_selectors_from_list (MethodList_t method_list) { int i = 0; while (i < method_list->method_count) { Method_t method = &method_list->method_list[i]; ! method->method_name ! = sel_register_typed_name ((const char *) method->method_name, ! method->method_types); i += 1; } } --- 68,94 ---- the record table. This is the routine that does the actual recording work. ! The name and type pointers in the method list must be permanent and ! immutable. */ ! void ! __objc_register_selectors_from_list (MethodList_t method_list) { int i = 0; + + objc_mutex_lock (__objc_runtime_mutex); while (i < method_list->method_count) { Method_t method = &method_list->method_list[i]; ! if (method->method_name) ! { ! method->method_name ! = __sel_register_typed_name ((const char *) method->method_name, ! method->method_types, 0, YES); ! } i += 1; } + objc_mutex_unlock (__objc_runtime_mutex); } *************** sel_get_typed_uid (const char *name, con *** 191,197 **** objc_mutex_lock (__objc_runtime_mutex); ! i = (sidx) hash_value_for_key (__objc_selector_hash, name); if (i == 0) { objc_mutex_unlock (__objc_runtime_mutex); --- 195,201 ---- objc_mutex_lock (__objc_runtime_mutex); ! i = (sidx) objc_hash_value_for_key (__objc_selector_hash, name); if (i == 0) { objc_mutex_unlock (__objc_runtime_mutex); *************** sel_get_any_typed_uid (const char *name) *** 231,237 **** objc_mutex_lock (__objc_runtime_mutex); ! i = (sidx) hash_value_for_key (__objc_selector_hash, name); if (i == 0) { objc_mutex_unlock (__objc_runtime_mutex); --- 235,241 ---- objc_mutex_lock (__objc_runtime_mutex); ! i = (sidx) objc_hash_value_for_key (__objc_selector_hash, name); if (i == 0) { objc_mutex_unlock (__objc_runtime_mutex); *************** sel_get_any_uid (const char *name) *** 262,268 **** objc_mutex_lock (__objc_runtime_mutex); ! i = (sidx) hash_value_for_key (__objc_selector_hash, name); if (soffset_decode (i) == 0) { objc_mutex_unlock (__objc_runtime_mutex); --- 266,272 ---- objc_mutex_lock (__objc_runtime_mutex); ! i = (sidx) objc_hash_value_for_key (__objc_selector_hash, name); if (soffset_decode (i) == 0) { objc_mutex_unlock (__objc_runtime_mutex); *************** const char *sel_get_type (SEL selector) *** 320,325 **** --- 324,358 ---- /* The uninstalled dispatch table */ extern struct sarray *__objc_uninstalled_dtable; + /* __sel_register_typed_name allocates lots of struct objc_selector:s + of 8 (16, if pointers are 64 bits) bytes at startup. To reduce the number + of malloc calls and memory lost to malloc overhead, we allocate + objc_selector:s in blocks here. This is only called from + __sel_register_typed_name, and __sel_register_typed_name may only be + called when __objc_runtime_mutex is locked. + + Note that the objc_selector:s allocated from __sel_register_typed_name + are never freed. + + 62 because 62 * sizeof (struct objc_selector) = 496 (992). This should + let malloc add some overhead and use a nice, round 512 (1024) byte chunk. + */ + #define SELECTOR_POOL_SIZE 62 + static struct objc_selector *selector_pool; + static int selector_pool_left; + + static struct objc_selector * + pool_alloc_selector(void) + { + if (!selector_pool_left) + { + selector_pool = objc_malloc (sizeof (struct objc_selector) + * SELECTOR_POOL_SIZE); + selector_pool_left = SELECTOR_POOL_SIZE; + } + return &selector_pool[--selector_pool_left]; + } + /* Store the passed selector name in the selector record and return its selector value (value returned by sel_get_uid). Assumes that the calling function has locked down __objc_runtime_mutex. */ *************** __sel_register_typed_name (const char *n *** 335,341 **** sidx i; struct objc_list *l; ! i = (sidx) hash_value_for_key (__objc_selector_hash, name); if (soffset_decode (i) != 0) { for (l = (struct objc_list *) sarray_get_safe (__objc_selector_array, i); --- 368,374 ---- sidx i; struct objc_list *l; ! i = (sidx) objc_hash_value_for_key (__objc_selector_hash, name); if (soffset_decode (i) != 0) { for (l = (struct objc_list *) sarray_get_safe (__objc_selector_array, i); *************** __sel_register_typed_name (const char *n *** 369,375 **** if (orig) j = orig; else ! j = objc_malloc (sizeof (struct objc_selector)); j->sel_id = (void *) i; /* Can we use the pointer or must copy types? Don't copy if NULL */ --- 402,408 ---- if (orig) j = orig; else ! j = pool_alloc_selector (); j->sel_id = (void *) i; /* Can we use the pointer or must copy types? Don't copy if NULL */ *************** __sel_register_typed_name (const char *n *** 388,394 **** if (orig) j = orig; else ! j = objc_malloc (sizeof (struct objc_selector)); j->sel_id = (void *) i; /* Can we use the pointer or must copy types? Don't copy if NULL */ --- 421,427 ---- if (orig) j = orig; else ! j = pool_alloc_selector (); j->sel_id = (void *) i; /* Can we use the pointer or must copy types? Don't copy if NULL */ *************** __sel_register_typed_name (const char *n *** 402,408 **** } DEBUG_PRINTF ("Record selector %s[%s] as: %ld\n", name, types, ! soffset_decode (i)); { int is_new = (l == 0); --- 435,441 ---- } DEBUG_PRINTF ("Record selector %s[%s] as: %ld\n", name, types, ! (long) soffset_decode (i)); { int is_new = (l == 0); *************** __sel_register_typed_name (const char *n *** 420,426 **** sarray_at_put_safe (__objc_selector_names, i, (void *) new_name); sarray_at_put_safe (__objc_selector_array, i, (void *) l); if (is_new) ! hash_add (&__objc_selector_hash, (void *) new_name, (void *) i); } sarray_realloc (__objc_uninstalled_dtable, __objc_selector_max_index + 1); --- 453,459 ---- sarray_at_put_safe (__objc_selector_names, i, (void *) new_name); sarray_at_put_safe (__objc_selector_array, i, (void *) l); if (is_new) ! objc_hash_add (&__objc_selector_hash, (void *) new_name, (void *) i); } sarray_realloc (__objc_uninstalled_dtable, __objc_selector_max_index + 1); *************** SEL *** 446,452 **** sel_register_typed_name (const char *name, const char *type) { SEL ret; ! objc_mutex_lock (__objc_runtime_mutex); /* Assume that name and type are not constant static memory and need to be copied before put into a runtime structure. is_const == NO */ --- 479,485 ---- sel_register_typed_name (const char *name, const char *type) { SEL ret; ! objc_mutex_lock (__objc_runtime_mutex); /* Assume that name and type are not constant static memory and need to be copied before put into a runtime structure. is_const == NO */ diff -Nrcpad gcc-3.4.3/libobjc/sendmsg.c gcc-4.0.0/libobjc/sendmsg.c *** gcc-3.4.3/libobjc/sendmsg.c Thu Jul 10 09:24:51 2003 --- gcc-4.0.0/libobjc/sendmsg.c Tue May 25 19:10:52 2004 *************** *** 1,6 **** /* GNU Objective C Runtime message lookup Copyright (C) 1993, 1995, 1996, 1997, 1998, ! 2001, 2002 Free Software Foundation, Inc. Contributed by Kresten Krab Thorup This file is part of GCC. --- 1,6 ---- /* GNU Objective C Runtime message lookup Copyright (C) 1993, 1995, 1996, 1997, 1998, ! 2001, 2002, 2004 Free Software Foundation, Inc. Contributed by Kresten Krab Thorup This file is part of GCC. *************** Boston, MA 02111-1307, USA. */ *** 26,31 **** --- 26,33 ---- covered by the GNU General Public License. */ /* FIXME: This file has no business including tm.h. */ + /* FIXME: This should be using libffi instead of __builtin_apply + and friends. */ #include "tconfig.h" #include "coretypes.h" *************** Boston, MA 02111-1307, USA. */ *** 35,41 **** #include "encoding.h" #include "runtime-info.h" ! /* this is how we hack STRUCT_VALUE to be 1 or 0 */ #define gen_rtx(args...) 1 #define gen_rtx_MEM(args...) 1 #define gen_rtx_REG(args...) 1 --- 37,43 ---- #include "encoding.h" #include "runtime-info.h" ! /* This is how we hack STRUCT_VALUE to be 1 or 0. */ #define gen_rtx(args...) 1 #define gen_rtx_MEM(args...) 1 #define gen_rtx_REG(args...) 1 *************** Method_t search_for_method_in_list (Meth *** 83,89 **** id nil_method (id, SEL); /* Given a selector, return the proper forwarding implementation. */ ! __inline__ IMP __objc_get_forward_imp (SEL sel) { --- 85,91 ---- id nil_method (id, SEL); /* Given a selector, return the proper forwarding implementation. */ ! inline IMP __objc_get_forward_imp (SEL sel) { *************** __objc_get_forward_imp (SEL sel) *** 115,121 **** } /* Given a class and selector, return the selector's implementation. */ ! __inline__ IMP get_imp (Class class, SEL sel) { --- 117,123 ---- } /* Given a class and selector, return the selector's implementation. */ ! inline IMP get_imp (Class class, SEL sel) { *************** get_imp (Class class, SEL sel) *** 176,182 **** /* Query if an object can respond to a selector, returns YES if the object implements the selector otherwise NO. Does not check if the method can be forwarded. */ ! __inline__ BOOL __objc_responds_to (id object, SEL sel) { --- 178,184 ---- /* Query if an object can respond to a selector, returns YES if the object implements the selector otherwise NO. Does not check if the method can be forwarded. */ ! inline BOOL __objc_responds_to (id object, SEL sel) { *************** __objc_responds_to (id object, SEL sel) *** 201,207 **** /* This is the lookup function. All entries in the table are either a valid method *or* zero. If zero then either the dispatch table needs to be installed or it doesn't exist and forwarding is attempted. */ ! __inline__ IMP objc_msg_lookup (id receiver, SEL op) { --- 203,209 ---- /* This is the lookup function. All entries in the table are either a valid method *or* zero. If zero then either the dispatch table needs to be installed or it doesn't exist and forwarding is attempted. */ ! inline IMP objc_msg_lookup (id receiver, SEL op) { *************** __objc_update_dispatch_table_for_class ( *** 463,490 **** This one is only called for categories. Class objects have their methods installed right away, and their selectors are made into ! SEL's by the function __objc_register_selectors_from_class. */ void class_add_method_list (Class class, MethodList_t list) { - int i; - /* Passing of a linked list is not allowed. Do multiple calls. */ assert (! list->method_next); ! /* Check for duplicates. */ ! for (i = 0; i < list->method_count; ++i) ! { ! Method_t method = &list->method_list[i]; ! ! if (method->method_name) /* Sometimes these are NULL */ ! { ! /* This is where selector names are transmogrified to SEL's */ ! method->method_name = ! sel_register_typed_name ((const char *) method->method_name, ! method->method_types); ! } ! } /* Add the methods to the class's method list. */ list->method_next = class->methods; --- 465,478 ---- This one is only called for categories. Class objects have their methods installed right away, and their selectors are made into ! SEL's by the function __objc_register_selectors_from_class. */ void class_add_method_list (Class class, MethodList_t list) { /* Passing of a linked list is not allowed. Do multiple calls. */ assert (! list->method_next); ! __objc_register_selectors_from_list(list); /* Add the methods to the class's method list. */ list->method_next = class->methods; *************** __objc_print_dtable_stats () *** 705,711 **** /* Returns the uninstalled dispatch table indicator. If a class' dispatch table points to __objc_uninstalled_dtable then that means it needs its dispatch table to be installed. */ ! __inline__ struct sarray * objc_get_uninstalled_dtable () { --- 693,699 ---- /* Returns the uninstalled dispatch table indicator. If a class' dispatch table points to __objc_uninstalled_dtable then that means it needs its dispatch table to be installed. */ ! inline struct sarray * objc_get_uninstalled_dtable () { diff -Nrcpad gcc-3.4.3/libobjc/thr.c gcc-4.0.0/libobjc/thr.c *** gcc-3.4.3/libobjc/thr.c Fri May 23 20:25:39 2003 --- gcc-4.0.0/libobjc/thr.c Thu Jul 22 22:20:08 2004 *************** struct __objc_thread_start_state *** 75,82 **** id argument; }; ! static volatile void ! __objc_thread_detach_function (struct __objc_thread_start_state *istate) { /* Valid state? */ if (istate) { --- 75,82 ---- id argument; }; ! static void __attribute__((noreturn)) ! __objc_thread_detach_function (struct __objc_thread_start_state *istate) { /* Valid state? */ if (istate) {