diff -Nrc3pad gcc-3.0.4/gcc/objc/Make-lang.in gcc-3.1/gcc/objc/Make-lang.in *** gcc-3.0.4/gcc/objc/Make-lang.in Sun Nov 5 10:35:31 2000 --- gcc-3.1/gcc/objc/Make-lang.in Fri Feb 1 11:48:46 2002 *************** *** 1,5 **** ! # Top level makefile fragment for GNU Objective-C ! # Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. #This file is part of GNU CC. --- 1,5 ---- ! # Top level -*- makefile -*- fragment for GNU Objective-C ! # Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc. #This file is part of GNU CC. *************** OBJECTIVE-C objective-c: cc1obj$(exeext) *** 48,73 **** objc-warn = $(STRICT_WARN) # Language-specific object files for Objective C. ! OBJC_OBJS = objc-parse.o objc-act.o $(C_AND_OBJC_OBJS) cc1obj$(exeext): $(OBJC_OBJS) $(BACKEND) $(LIBDEPS) $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(OBJC_OBJS) $(BACKEND) $(LIBS) # Objective C language specific files. objc-parse.o : $(srcdir)/objc/objc-parse.c \ $(CONFIG_H) $(TREE_H) $(srcdir)/toplev.h $(srcdir)/ggc.h \ $(srcdir)/c-lex.h $(srcdir)/c-tree.h $(srcdir)/c-common.h \ $(srcdir)/input.h $(srcdir)/flags.h $(srcdir)/output.h \ ! $(srcdir)/objc/objc-act.h system.h cpplib.h $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -I$(srcdir)/objc \ -c $(srcdir)/objc/objc-parse.c $(OUTPUT_OPTION) ! $(INTL_TARGETS): $(srcdir)/objc/objc-parse.c $(srcdir)/objc/objc-parse.c : $(srcdir)/objc/objc-parse.y cd $(srcdir)/objc; \ ! $(BISON) $(BISONFLAGS) -o op$$$$.c objc-parse.y ; \ ! mv -f op$$$$.c objc-parse.c $(srcdir)/objc/objc-parse.y: $(srcdir)/c-parse.in echo '/*WARNING: This file is automatically generated!*/' >tmp-objc-prs.y --- 48,85 ---- objc-warn = $(STRICT_WARN) # Language-specific object files for Objective C. ! OBJC_OBJS = objc-lang.o objc-parse.o objc-act.o $(C_AND_OBJC_OBJS) cc1obj$(exeext): $(OBJC_OBJS) $(BACKEND) $(LIBDEPS) $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(OBJC_OBJS) $(BACKEND) $(LIBS) # Objective C language specific files. + objc-lang.o : $(srcdir)/objc/objc-lang.c \ + $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(srcdir)/c-tree.h \ + $(srcdir)/c-common.h $(srcdir)/toplev.h $(srcdir)/objc/objc-act.h \ + $(srcdir)/langhooks.h $(srcdir)/langhooks-def.h + $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -I$(srcdir)/objc \ + -c $(srcdir)/objc/objc-lang.c $(OUTPUT_OPTION) + objc-parse.o : $(srcdir)/objc/objc-parse.c \ $(CONFIG_H) $(TREE_H) $(srcdir)/toplev.h $(srcdir)/ggc.h \ $(srcdir)/c-lex.h $(srcdir)/c-tree.h $(srcdir)/c-common.h \ $(srcdir)/input.h $(srcdir)/flags.h $(srcdir)/output.h \ ! $(srcdir)/objc/objc-act.h $(SYSTEM_H) $(CPPLIB_H) $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -I$(srcdir)/objc \ -c $(srcdir)/objc/objc-parse.c $(OUTPUT_OPTION) ! po-generated: $(srcdir)/objc/objc-parse.c $(srcdir)/objc/objc-parse.c : $(srcdir)/objc/objc-parse.y cd $(srcdir)/objc; \ ! if $(BISON) $(BISONFLAGS) -o op$$$$.c objc-parse.y ; then \ ! test -f op$$$$.output && mv -f op$$$$.output objc-parse.output ; \ ! mv -f op$$$$.c objc-parse.c ; \ ! else \ ! rm -f op$$$$.* ; \ ! false ; \ ! fi $(srcdir)/objc/objc-parse.y: $(srcdir)/c-parse.in echo '/*WARNING: This file is automatically generated!*/' >tmp-objc-prs.y *************** $(srcdir)/objc/objc-parse.y: $(srcdir)/c *** 77,86 **** $(SHELL) $(srcdir)/move-if-change tmp-objc-prs.y $(srcdir)/objc/objc-parse.y objc-act.o : $(srcdir)/objc/objc-act.c \ ! $(CONFIG_H) $(TREE_H) $(RTL_H) system.h $(EXPR_H) \ $(srcdir)/c-tree.h $(srcdir)/c-common.h $(srcdir)/c-lex.h \ $(srcdir)/toplev.h $(srcdir)/flags.h $(srcdir)/objc/objc-act.h \ ! $(srcdir)/input.h $(srcdir)/function.h $(srcdir)/output.h $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -I$(srcdir)/objc \ -c $(srcdir)/objc/objc-act.c --- 89,99 ---- $(SHELL) $(srcdir)/move-if-change tmp-objc-prs.y $(srcdir)/objc/objc-parse.y objc-act.o : $(srcdir)/objc/objc-act.c \ ! $(CONFIG_H) $(TREE_H) $(RTL_H) $(SYSTEM_H) $(EXPR_H) $(TARGET_H) \ $(srcdir)/c-tree.h $(srcdir)/c-common.h $(srcdir)/c-lex.h \ $(srcdir)/toplev.h $(srcdir)/flags.h $(srcdir)/objc/objc-act.h \ ! $(srcdir)/input.h $(srcdir)/function.h $(srcdir)/output.h $(srcdir)/debug.h \ ! $(srcdir)/langhooks.h $(srcdir)/langhooks-def.h $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -I$(srcdir)/objc \ -c $(srcdir)/objc/objc-act.c *************** objc.rest.encap: *** 94,99 **** --- 107,113 ---- objc.info: objc.dvi: + objc.generated-manpages: # # Install hooks: diff -Nrc3pad gcc-3.0.4/gcc/objc/config-lang.in gcc-3.1/gcc/objc/config-lang.in *** gcc-3.0.4/gcc/objc/config-lang.in Tue Dec 12 20:28:52 2000 --- gcc-3.1/gcc/objc/config-lang.in Thu Dec 20 00:20:47 2001 *************** *** 1,5 **** ! # Top level configure fragment for the GNU Objective-C Runtime Library. ! # Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. #This file is part of GNU CC. --- 1,5 ---- ! # Top level configure fragment for GNU Objective-C ! # Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc. #This file is part of GNU CC. *************** *** 24,30 **** # language - name of language as it would appear in $(LANGUAGES) # compilers - value to add to $(COMPILERS) # stagestuff - files to add to $(STAGESTUFF) - # diff_excludes - files to ignore when building diffs between two versions. language="objc" --- 24,29 ---- *************** compilers="cc1obj\$(exeext)" *** 32,37 **** stagestuff="" - diff_excludes="-x objc-parse.c -x objc-parse.y " - target_libs=target-libobjc --- 31,34 ---- diff -Nrc3pad gcc-3.0.4/gcc/objc/lang-specs.h gcc-3.1/gcc/objc/lang-specs.h *** gcc-3.0.4/gcc/objc/lang-specs.h Thu Mar 22 19:16:21 2001 --- gcc-3.1/gcc/objc/lang-specs.h Mon Mar 18 20:10:21 2002 *************** *** 1,5 **** /* Definitions for specs for Objective-C. ! Copyright (C) 1998, 1999 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Definitions for specs for Objective-C. ! Copyright (C) 1998, 1999, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 27,41 **** external preprocessor if -save-temps or -traditional is given. */ "%{E|M|MM:%(trad_capable_cpp) -lang-objc %{ansi:-std=c89} %(cpp_options)}\ %{!E:%{!M:%{!MM:\ ! %{save-temps:%(trad_capable_cpp) -lang-objc %{ansi:-std=c89}\ ! %(cpp_options) %b.mi \n\ ! cc1obj -fpreprocessed %b.mi %(cc1_options) %{gen-decls}}\ ! %{!save-temps:\ %{traditional|ftraditional|traditional-cpp:\ tradcpp0 -lang-objc %{ansi:-std=c89} %(cpp_options) %{!pipe:%g.mi} |\n\ cc1obj -fpreprocessed %{!pipe:%g.mi} %(cc1_options) %{gen-decls}}\ %{!traditional:%{!ftraditional:%{!traditional-cpp:\ ! cc1obj %{ansi:-std=c89} %(cpp_options) %(cc1_options) %{gen-decls}}}}}\ %{!fsyntax-only:%(invoke_as)}}}}", 0}, {".mi", "@objc-cpp-output", 0}, {"@objc-cpp-output", --- 27,41 ---- external preprocessor if -save-temps or -traditional is given. */ "%{E|M|MM:%(trad_capable_cpp) -lang-objc %{ansi:-std=c89} %(cpp_options)}\ %{!E:%{!M:%{!MM:\ ! %{save-temps|no-integrated-cpp:%(trad_capable_cpp) -lang-objc %{ansi:-std=c89}\ ! %(cpp_options) %{save-temps:%b.mi} %{!save-temps:%g.mi} \n\ ! cc1obj -fpreprocessed %{save-temps:%b.mi} %{!save-temps:%g.mi} %(cc1_options) %{gen-decls}}\ ! %{!save-temps:%{!no-integrated-cpp:\ %{traditional|ftraditional|traditional-cpp:\ tradcpp0 -lang-objc %{ansi:-std=c89} %(cpp_options) %{!pipe:%g.mi} |\n\ cc1obj -fpreprocessed %{!pipe:%g.mi} %(cc1_options) %{gen-decls}}\ %{!traditional:%{!ftraditional:%{!traditional-cpp:\ ! cc1obj %{ansi:-std=c89} %(cpp_unique_options) %(cc1_options) %{gen-decls}}}}}}\ %{!fsyntax-only:%(invoke_as)}}}}", 0}, {".mi", "@objc-cpp-output", 0}, {"@objc-cpp-output", diff -Nrc3pad gcc-3.0.4/gcc/objc/objc-act.c gcc-3.1/gcc/objc/objc-act.c *** gcc-3.0.4/gcc/objc/objc-act.c Fri Jun 29 19:20:43 2001 --- gcc-3.1/gcc/objc/objc-act.c Thu Mar 28 18:49:59 2002 *************** *** 1,5 **** /* Implement classes and message passing for Objective C. ! Copyright (C) 1992, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. Contributed by Steve Naroff. --- 1,5 ---- /* Implement classes and message passing for Objective C. ! Copyright (C) 1992, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Steve Naroff. *************** Boston, MA 02111-1307, USA. */ *** 37,43 **** code generation `options': ! - OBJC_INT_SELECTORS */ #include "config.h" #include "system.h" --- 37,43 ---- code generation `options': ! */ #include "config.h" #include "system.h" *************** Boston, MA 02111-1307, USA. */ *** 56,61 **** --- 56,63 ---- #include "toplev.h" #include "ggc.h" #include "cpplib.h" + #include "debug.h" + #include "target.h" /* This is the default way of generating a method name. */ /* I am not sure it is really correct. *************** Boston, MA 02111-1307, USA. */ *** 87,94 **** /* Define the special tree codes that we use. */ /* Table indexed by tree code giving a string containing a character ! classifying the tree code. Possibilities are ! t, d, s, c, r, <, 1 and 2. See objc-tree.def for details. */ #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE, --- 89,95 ---- /* 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, *************** char *util_firstobj; *** 136,144 **** --- 137,150 ---- /* for encode_method_def */ #include "rtl.h" + /* The version identifies which language generation and runtime + the module (file) was compiled for, and is recorded in the + module descriptor. */ + #define OBJC_VERSION (flag_next_runtime ? 5 : 8) #define PROTOCOL_VERSION 2 + /* (Decide if these can ever be validly changed.) */ #define OBJC_ENCODE_INLINE_DEFS 0 #define OBJC_ENCODE_DONT_INLINE_DEFS 1 *************** char *util_firstobj; *** 148,163 **** static void init_objc PARAMS ((void)); static void finish_objc PARAMS ((void)); - static void objc_init PARAMS ((void)); - static void objc_init_options PARAMS ((void)); - static int objc_decode_option PARAMS ((int, char **)); - static void objc_post_options PARAMS ((void)); /* Code generation. */ static void synth_module_prologue PARAMS ((void)); static tree build_constructor PARAMS ((tree, tree)); ! static const char *build_module_descriptor PARAMS ((void)); static tree init_module_descriptor PARAMS ((tree)); static tree build_objc_method_call PARAMS ((int, tree, tree, tree, tree, tree)); --- 154,165 ---- static void init_objc PARAMS ((void)); static void finish_objc PARAMS ((void)); /* Code generation. */ static void synth_module_prologue PARAMS ((void)); static tree build_constructor PARAMS ((tree, tree)); ! static rtx build_module_descriptor PARAMS ((void)); static tree init_module_descriptor PARAMS ((tree)); static tree build_objc_method_call PARAMS ((int, tree, tree, tree, tree, tree)); *************** static tree generate_protocol_list PARA *** 188,196 **** static void generate_forward_declaration_to_string_table PARAMS ((void)); static void build_protocol_reference PARAMS ((tree)); - #if 0 - static tree init_selector PARAMS ((int)); - #endif static tree build_keyword_selector PARAMS ((tree)); static tree synth_id_with_class_suffix PARAMS ((const char *, tree)); --- 190,195 ---- *************** static const char *objc_demangle PARAMS *** 203,225 **** static const char *objc_printable_name PARAMS ((tree, int)); static void objc_expand_function_end PARAMS ((void)); ! /* Misc. bookkeeping */ ! ! typedef struct hashed_entry *hash; ! typedef struct hashed_attribute *attr; ! struct hashed_attribute ! { ! attr next; ! tree value; ! }; ! struct hashed_entry ! { ! attr list; ! hash next; ! tree key; ! }; static void hash_init PARAMS ((void)); static void hash_enter PARAMS ((hash *, tree)); static hash hash_lookup PARAMS ((hash *, tree)); --- 202,213 ---- static const char *objc_printable_name PARAMS ((tree, int)); static void objc_expand_function_end PARAMS ((void)); ! /* Hash tables to manage the global pool of method prototypes. */ ! hash *nst_method_hash_list = 0; ! hash *cls_method_hash_list = 0; + static size_t hash_func PARAMS ((tree)); static void hash_init PARAMS ((void)); static void hash_enter PARAMS ((hash *, tree)); static hash hash_lookup PARAMS ((hash *, tree)); *************** static tree build_selector_reference_dec *** 248,253 **** --- 236,242 ---- static tree add_protocol PARAMS ((tree)); static tree lookup_protocol PARAMS ((tree)); + static void check_protocol_recursively PARAMS ((tree, tree)); static tree lookup_and_install_protocols PARAMS ((tree)); /* Type encoding. */ *************** static void warn_with_method PARAMS (( *** 272,277 **** --- 261,267 ---- static void error_with_ivar PARAMS ((const char *, tree, tree)); static char *gen_method_decl PARAMS ((tree, char *)); static char *gen_declaration PARAMS ((tree, char *)); + static void gen_declaration_1 PARAMS ((tree, char *)); static char *gen_declarator PARAMS ((tree, char *, const char *)); static int is_complex_decl PARAMS ((tree)); *************** static void dump_interface PARAMS ((FI *** 280,290 **** --- 270,283 ---- /* Everything else. */ + static void add_objc_tree_codes PARAMS ((void)); static tree define_decl PARAMS ((tree, tree)); static tree lookup_method_in_protocol_list PARAMS ((tree, tree, int)); static tree lookup_protocol_in_reflist PARAMS ((tree, tree)); static tree create_builtin_decl PARAMS ((enum tree_code, tree, const char *)); + static void setup_string_decl PARAMS ((void)); + static void build_string_class_template PARAMS ((void)); static tree my_build_string PARAMS ((int, const char *)); static void build_objc_symtab_template PARAMS ((void)); static tree init_def_list PARAMS ((tree)); *************** static tree init_objc_symtab PARAMS (( *** 292,300 **** static void forward_declare_categories PARAMS ((void)); static void generate_objc_symtab_decl PARAMS ((void)); static tree build_selector PARAMS ((tree)); - #if 0 - static tree build_msg_pool_reference PARAMS ((int)); - #endif static tree build_typed_selector_reference PARAMS ((tree, tree)); static tree build_selector_reference PARAMS ((tree)); static tree build_class_reference_decl PARAMS ((void)); --- 285,290 ---- *************** static tree check_duplicates PARAMS (( *** 332,337 **** --- 322,329 ---- static tree receiver_is_class_object PARAMS ((tree)); static int check_methods PARAMS ((tree, tree, int)); static int conforms_to_protocol PARAMS ((tree, tree)); + static void check_protocol PARAMS ((tree, const char *, + const char *)); static void check_protocols PARAMS ((tree, const char *, const char *)); static tree encode_method_def PARAMS ((tree)); *************** static void ggc_mark_hash_table PARAMS *** 371,377 **** #define UTAG_METHOD_PROTOTYPE "_objc_method_prototype" #define UTAG_METHOD_PROTOTYPE_LIST "_objc__method_prototype_list" ! #define STRING_OBJECT_CLASS_NAME "NXConstantString" #define PROTOCOL_OBJECT_CLASS_NAME "Protocol" static const char *constant_string_class_name = NULL; --- 363,372 ---- #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_NAME "_NSConstantStringClassReference" ! #define PROTOCOL_OBJECT_CLASS_NAME "Protocol" static const char *constant_string_class_name = NULL; *************** static const char *TAG_GETMETACLASS; *** 381,580 **** static const char *TAG_MSGSEND; static const char *TAG_MSGSENDSUPER; static const char *TAG_EXECCLASS; ! /* 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)) ! ! tree objc_ellipsis_node; ! ! enum objc_tree_index ! { ! OCTI_STATIC_NST, ! OCTI_STATIC_NST_DECL, ! OCTI_SELF_ID, ! OCTI_UCMD_ID, ! OCTI_UNUSED_LIST, ! OCTI_SELF_DECL, ! OCTI_UMSG_DECL, ! OCTI_UMSG_SUPER_DECL, ! OCTI_GET_CLASS_DECL, ! OCTI_GET_MCLASS_DECL, ! OCTI_SUPER_TYPE, ! OCTI_SEL_TYPE, ! OCTI_ID_TYPE, ! OCTI_CLS_TYPE, ! OCTI_NST_TYPE, ! OCTI_PROTO_TYPE, ! ! OCTI_CLS_CHAIN, ! OCTI_ALIAS_CHAIN, ! OCTI_INTF_CHAIN, ! OCTI_PROTO_CHAIN, ! OCTI_CLS_REF_CHAIN, ! OCTI_SEL_REF_CHAIN, ! OCTI_CLS_NAMES_CHAIN, ! OCTI_METH_VAR_NAMES_CHAIN, ! OCTI_METH_VAR_TYPES_CHAIN, ! ! OCTI_SYMBOLS_DECL, ! OCTI_NST_VAR_DECL, ! OCTI_CLS_VAR_DECL, ! OCTI_NST_METH_DECL, ! OCTI_CLS_METH_DECL, ! OCTI_CLS_DECL, ! OCTI_MCLS_DECL, ! OCTI_SEL_TABLE_DECL, ! OCTI_MODULES_DECL, ! OCTI_STRG_DECL, ! ! OCTI_IMPL_CTX, ! OCTI_IMPL_TEMPL, ! ! OCTI_CLS_TEMPL, ! OCTI_CAT_TEMPL, ! OCTI_UPRIV_REC, ! OCTI_PROTO_TEMPL, ! OCTI_SEL_TEMPL, ! OCTI_UCLS_SUPER_REF, ! OCTI_UUCLS_SUPER_REF, ! OCTI_METH_TEMPL, ! OCTI_IVAR_TEMPL, ! OCTI_SYMTAB_TEMPL, ! OCTI_MODULE_TEMPL, ! OCTI_SUPER_TEMPL, ! OCTI_OBJ_REF, ! OCTI_OBJ_ID, ! OCTI_CLS_ID, ! OCTI_ID_ID, ! OCTI_CNST_STR_ID, ! OCTI_CNST_STR_TYPE, ! OCTI_SUPER_DECL, ! OCTI_METH_CTX, ! ! OCTI_MAX ! }; ! ! static tree objc_global_trees[OCTI_MAX]; ! ! /* List of classes with list of their static instances. */ ! #define objc_static_instances objc_global_trees[OCTI_STATIC_NST] ! ! /* The declaration of the array administrating the static instances. */ ! #define static_instances_decl objc_global_trees[OCTI_STATIC_NST_DECL] ! ! /* Some commonly used instances of "identifier_node". */ ! ! #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 self_decl objc_global_trees[OCTI_SELF_DECL] ! #define umsg_decl objc_global_trees[OCTI_UMSG_DECL] ! #define umsg_super_decl objc_global_trees[OCTI_UMSG_SUPER_DECL] ! #define objc_get_class_decl objc_global_trees[OCTI_GET_CLASS_DECL] ! #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) \ ! (super_type && TYPE_MAIN_VARIANT (TYPE) == TYPE_MAIN_VARIANT (super_type)) ! ! #define class_chain objc_global_trees[OCTI_CLS_CHAIN] ! #define alias_chain objc_global_trees[OCTI_ALIAS_CHAIN] ! #define interface_chain objc_global_trees[OCTI_INTF_CHAIN] ! #define protocol_chain objc_global_trees[OCTI_PROTO_CHAIN] ! ! /* Chains to manage selectors that are referenced and defined in the ! module. */ ! ! #define cls_ref_chain objc_global_trees[OCTI_CLS_REF_CHAIN] /* Classes referenced. */ ! #define sel_ref_chain objc_global_trees[OCTI_SEL_REF_CHAIN] /* Selectors referenced. */ ! ! /* Chains to manage uniquing of strings. */ ! ! #define class_names_chain objc_global_trees[OCTI_CLS_NAMES_CHAIN] ! #define meth_var_names_chain objc_global_trees[OCTI_METH_VAR_NAMES_CHAIN] ! #define meth_var_types_chain objc_global_trees[OCTI_METH_VAR_TYPES_CHAIN] ! ! /* Hash tables to manage the global pool of method prototypes. */ ! ! static hash *nst_method_hash_list = 0; ! static hash *cls_method_hash_list = 0; ! ! /* Backend data declarations. */ ! ! #define UOBJC_SYMBOLS_decl objc_global_trees[OCTI_SYMBOLS_DECL] ! #define UOBJC_INSTANCE_VARIABLES_decl objc_global_trees[OCTI_NST_VAR_DECL] ! #define UOBJC_CLASS_VARIABLES_decl objc_global_trees[OCTI_CLS_VAR_DECL] ! #define UOBJC_INSTANCE_METHODS_decl objc_global_trees[OCTI_NST_METH_DECL] ! #define UOBJC_CLASS_METHODS_decl objc_global_trees[OCTI_CLS_METH_DECL] ! #define UOBJC_CLASS_decl objc_global_trees[OCTI_CLS_DECL] ! #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 ! none exists this will be equal to implementation_context...it is ! set in start_class. */ ! ! #define implementation_context objc_global_trees[OCTI_IMPL_CTX] ! #define implementation_template objc_global_trees[OCTI_IMPL_TEMPL] ! struct imp_entry ! { ! struct imp_entry *next; ! tree imp_context; ! tree imp_template; ! tree class_decl; /* _OBJC_CLASS_; */ ! tree meta_decl; /* _OBJC_METACLASS_; */ ! }; static void handle_impent PARAMS ((struct imp_entry *)); ! static struct imp_entry *imp_list = 0; ! static int imp_count = 0; /* `@implementation' */ ! static int cat_count = 0; /* `@category' */ ! ! #define objc_class_template objc_global_trees[OCTI_CLS_TEMPL] ! #define objc_category_template objc_global_trees[OCTI_CAT_TEMPL] ! #define uprivate_record objc_global_trees[OCTI_UPRIV_REC] ! #define objc_protocol_template objc_global_trees[OCTI_PROTO_TEMPL] ! #define objc_selector_template objc_global_trees[OCTI_SEL_TEMPL] ! #define ucls_super_ref objc_global_trees[OCTI_UCLS_SUPER_REF] ! #define uucls_super_ref objc_global_trees[OCTI_UUCLS_SUPER_REF] ! ! #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_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 UOBJC_SUPER_decl objc_global_trees[OCTI_SUPER_DECL] - #define method_context objc_global_trees[OCTI_METH_CTX] static int method_slot = 0; /* Used by start_method_def, */ #define BUFSIZE 1024 --- 376,394 ---- static const char *TAG_MSGSEND; static const char *TAG_MSGSENDSUPER; static const char *TAG_EXECCLASS; + static const char *default_constant_string_class_name; ! /* The OCTI_... enumeration itself is in objc/objc-act.h. */ ! tree objc_global_trees[OCTI_MAX]; ! int objc_receiver_context; static void handle_impent PARAMS ((struct imp_entry *)); ! struct imp_entry *imp_list = 0; ! int imp_count = 0; /* `@implementation' */ ! int cat_count = 0; /* `@category' */ static int method_slot = 0; /* Used by start_method_def, */ #define BUFSIZE 1024 *************** int flag_warn_protocol = 1; *** 619,652 **** /* Tells "encode_pointer/encode_aggregate" whether we are generating type descriptors for instance variables (as opposed to methods). Type descriptors for instance variables contain more information ! than methods (for static typing and embedded structures). This ! was added to support features being planned for dbkit2. */ static int generating_instance_variables = 0; ! /* Tells the compiler that this is a special run. Do not perform ! any compiling, instead we are to test some platform dependent ! features and output a C header file with appropriate definitions. */ static int print_struct_values = 0; ! /* Each front end provides its own. */ ! struct lang_hooks lang_hooks = {objc_init, ! NULL, /* objc_finish */ ! objc_init_options, ! objc_decode_option, ! objc_post_options}; ! ! /* Post-switch processing. */ ! static void ! objc_post_options () ! { ! cpp_post_options (parse_in); ! } ! ! /* Some platforms pass small structures through registers versus through ! an invisible pointer. Determine at what size structure is the ! transition point between the two possibilities. */ static void generate_struct_by_value_array () --- 433,451 ---- /* Tells "encode_pointer/encode_aggregate" whether we are generating type descriptors for instance variables (as opposed to methods). Type descriptors for instance variables contain more information ! than methods (for static typing and embedded structures). */ static int generating_instance_variables = 0; ! /* Tells the compiler that this is a special run. Do not perform any ! compiling, instead we are to test some platform dependent features ! and output a C header file with appropriate definitions. */ static int print_struct_values = 0; ! /* Some platforms pass small structures through registers versus ! through an invisible pointer. Determine at what size structure is ! the transition point between the two possibilities. */ static void generate_struct_by_value_array () *************** generate_struct_by_value_array () *** 657,663 **** int aggregate_in_mem[32]; int found = 0; ! /* Presumbaly no platform passes 32 byte structures in a register. */ for (i = 1; i < 32; i++) { char buffer[5]; --- 456,462 ---- int aggregate_in_mem[32]; int found = 0; ! /* Presumably no platform passes 32 byte structures in a register. */ for (i = 1; i < 32; i++) { char buffer[5]; *************** generate_struct_by_value_array () *** 687,693 **** } /* We found some structures that are returned in registers instead of memory ! so output the necessary data. */ if (found) { for (i = 31; i >= 0; i--) --- 486,492 ---- } /* We found some structures that are returned in registers instead of memory ! so output the necessary data. */ if (found) { for (i = 31; i >= 0; i--) *************** generate_struct_by_value_array () *** 707,733 **** exit (0); } ! static void ! objc_init_options () { ! parse_in = cpp_create_reader (CLK_OBJC); ! c_language = clk_objective_c; ! } - static void - objc_init () - { /* 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. */ lineno = 0; - c_common_lang_init (); - /* If gen_declaration desired, open the output file. */ if (flag_gen_declaration) { ! register char * const dumpname = concat (dumpname, ".decl", NULL); gen_declaration_file = fopen (dumpname, "w"); if (gen_declaration_file == 0) fatal_io_error ("can't open %s", dumpname); --- 506,529 ---- exit (0); } ! const char * ! objc_init (filename) ! const char *filename; { ! filename = c_objc_common_init (filename); ! add_objc_tree_codes (); ! ! decl_printable_name = objc_printable_name; /* 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. */ lineno = 0; /* If gen_declaration desired, open the output file. */ if (flag_gen_declaration) { ! register char * const dumpname = concat (dump_base_name, ".decl", NULL); gen_declaration_file = fopen (dumpname, "w"); if (gen_declaration_file == 0) fatal_io_error ("can't open %s", dumpname); *************** objc_init () *** 741,746 **** --- 537,543 ---- TAG_MSGSEND = "objc_msgSend"; TAG_MSGSENDSUPER = "objc_msgSendSuper"; TAG_EXECCLASS = "__objc_execClass"; + default_constant_string_class_name = "NSConstantString"; } else { *************** objc_init () *** 749,754 **** --- 546,552 ---- TAG_MSGSEND = "objc_msg_lookup"; TAG_MSGSENDSUPER = "objc_msg_lookup_super"; TAG_EXECCLASS = "__objc_exec_class"; + default_constant_string_class_name = "NXConstantString"; flag_typed_selectors = 1; } *************** objc_init () *** 760,784 **** generate_struct_by_value_array (); objc_act_parse_init (); ! c_parse_init (); } void finish_file () { finish_objc (); /* Objective-C finalization */ if (gen_declaration_file) fclose (gen_declaration_file); } ! const char * ! lang_identify () ! { ! return "objc"; ! } ! ! static int objc_decode_option (argc, argv) int argc; char **argv; --- 558,579 ---- generate_struct_by_value_array (); objc_act_parse_init (); ! ! return filename; } void finish_file () { + c_objc_common_finish_file (); + finish_objc (); /* Objective-C finalization */ if (gen_declaration_file) fclose (gen_declaration_file); } ! int objc_decode_option (argc, argv) int argc; char **argv; *************** objc_decode_option (argc, argv) *** 818,840 **** return 1; } - /* used by print-tree.c */ - - void - lang_print_xnode (file, node, indent) - FILE *file ATTRIBUTE_UNUSED; - tree node ATTRIBUTE_UNUSED; - int indent ATTRIBUTE_UNUSED; - { - } - static tree define_decl (declarator, declspecs) tree declarator; tree declspecs; { ! tree decl = start_decl (declarator, declspecs, 0, NULL_TREE, NULL_TREE); finish_decl (decl, NULL_TREE, NULL_TREE); return decl; } --- 613,625 ---- return 1; } static tree define_decl (declarator, declspecs) tree declarator; tree declspecs; { ! tree decl = start_decl (declarator, declspecs, 0, NULL_TREE); finish_decl (decl, NULL_TREE, NULL_TREE); return decl; } *************** lookup_method_in_protocol_list (rproto_l *** 896,933 **** static tree lookup_protocol_in_reflist (rproto_list, lproto) ! tree rproto_list; ! tree lproto; { ! tree rproto, p; ! /* Make sure the protocol is support by the object on the rhs. */ ! if (TREE_CODE (lproto) == PROTOCOL_INTERFACE_TYPE) ! { ! tree fnd = 0; ! for (rproto = rproto_list; rproto; rproto = TREE_CHAIN (rproto)) ! { ! p = TREE_VALUE (rproto); ! if (TREE_CODE (p) == PROTOCOL_INTERFACE_TYPE) ! { ! if (lproto == p) ! fnd = lproto; ! else if (PROTOCOL_LIST (p)) ! fnd = lookup_protocol_in_reflist (PROTOCOL_LIST (p), lproto); ! } ! if (fnd) ! return fnd; ! } ! } ! else ! { ! ; /* An identifier...if we could not find a protocol. */ ! } ! return 0; } /* Return 1 if LHS and RHS are compatible types for assignment --- 681,718 ---- static tree lookup_protocol_in_reflist (rproto_list, lproto) ! tree rproto_list; ! tree lproto; { ! tree rproto, p; ! /* Make sure the protocol is supported by the object on the rhs. */ ! if (TREE_CODE (lproto) == PROTOCOL_INTERFACE_TYPE) ! { ! tree fnd = 0; ! for (rproto = rproto_list; rproto; rproto = TREE_CHAIN (rproto)) ! { ! p = TREE_VALUE (rproto); ! if (TREE_CODE (p) == PROTOCOL_INTERFACE_TYPE) ! { ! if (lproto == p) ! fnd = lproto; ! else if (PROTOCOL_LIST (p)) ! fnd = lookup_protocol_in_reflist (PROTOCOL_LIST (p), lproto); ! } ! if (fnd) ! return fnd; ! } ! } ! else ! { ! ; /* An identifier...if we could not find a protocol. */ ! } ! return 0; } /* Return 1 if LHS and RHS are compatible types for assignment *************** objc_comptypes (lhs, rhs, reflexive) *** 991,996 **** --- 776,787 ---- tree cat; rproto_list = CLASS_PROTOCOL_LIST (rinter); + /* If the underlying ObjC class does not have + protocols attached to it, perhaps there are + "one-off" protocols attached to the rhs? + E.g., 'id foo;'. */ + if (!rproto_list) + rproto_list = TYPE_PROTOCOL_LIST (TREE_TYPE (rhs)); rproto = lookup_protocol_in_reflist (rproto_list, p); /* Check for protocols adopted by categories. */ *************** objc_comptypes (lhs, rhs, reflexive) *** 1021,1027 **** return (TYPED_OBJECT (TREE_TYPE (lhs)) != 0); else ! /* Defer to comptypes .*/ return -1; } --- 812,818 ---- return (TYPED_OBJECT (TREE_TYPE (lhs)) != 0); else ! /* Defer to comptypes. */ return -1; } *************** get_static_reference (interface, protoco *** 1118,1131 **** TYPE_NEXT_VARIANT (t) = TYPE_NEXT_VARIANT (m); TYPE_NEXT_VARIANT (m) = t; ! /* Look up protocols and install in lang specific list. */ 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) = 0; type = t; } --- 909,923 ---- 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! */ 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; } *************** get_object_reference (protocols) *** 1144,1155 **** { 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; } --- 936,947 ---- { 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; } *************** get_object_reference (protocols) *** 1175,1187 **** (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; type = t; } return type; } static tree lookup_and_install_protocols (protocols) tree protocols; --- 967,1005 ---- (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; } + /* Check for circular dependencies in protocols. The arguments are + PROTO, the protocol to check, and LIST, a list of protocol it + conforms to. */ + + static void + check_protocol_recursively (proto, list) + tree proto; + tree list; + { + tree p; + + for (p = list; p; p = TREE_CHAIN (p)) + { + tree pp = TREE_VALUE (p); + + if (TREE_CODE (pp) == IDENTIFIER_NODE) + 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)); + } + } + static tree lookup_and_install_protocols (protocols) tree protocols; *************** lookup_and_install_protocols (protocols) *** 1197,1203 **** if (!p) { ! error ("Cannot find protocol declaration for `%s'", IDENTIFIER_POINTER (ident)); if (prev) TREE_CHAIN (prev) = TREE_CHAIN (proto); --- 1015,1021 ---- if (!p) { ! error ("cannot find protocol declaration for `%s'", IDENTIFIER_POINTER (ident)); if (prev) TREE_CHAIN (prev) = TREE_CHAIN (proto); *************** create_builtin_decl (code, type, name) *** 1238,1243 **** --- 1056,1074 ---- return decl; } + /* Find the decl for the constant string class. */ + + static void + setup_string_decl () + { + if (!string_class_decl) + { + if (!constant_string_global_id) + constant_string_global_id = get_identifier (STRING_OBJECT_GLOBAL_NAME); + string_class_decl = lookup_name (constant_string_global_id); + } + } + /* Purpose: "play" parser, creating/installing representations of the declarations that are required by Objective-C. *************** synth_module_prologue () *** 1271,1285 **** /* Declare type of selector-objects that represent an operation name. */ - #ifdef OBJC_INT_SELECTORS - /* `unsigned int' */ - selector_type = unsigned_type_node; - #else /* `struct objc_selector *' */ selector_type = build_pointer_type (xref_tag (RECORD_TYPE, get_identifier (TAG_SELECTOR))); - #endif /* not OBJC_INT_SELECTORS */ /* Forward declare type, or else the prototype for msgSendSuper will complain. */ --- 1102,1111 ---- *************** synth_module_prologue () *** 1308,1314 **** if (flag_traditional && TAG_MSGSEND[0] != '_') DECL_BUILT_IN_NONANSI (umsg_decl) = 1; ! make_decl_rtl (umsg_decl, NULL_PTR); pushdecl (umsg_decl); } else --- 1134,1140 ---- if (flag_traditional && TAG_MSGSEND[0] != '_') DECL_BUILT_IN_NONANSI (umsg_decl) = 1; ! make_decl_rtl (umsg_decl, NULL); pushdecl (umsg_decl); } else *************** synth_module_prologue () *** 1350,1361 **** --- 1176,1190 ---- /* Suppress outputting debug symbols, because dbxout_init hasn'r been called yet. */ enum debug_info_type save_write_symbols = write_symbols; + struct gcc_debug_hooks *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); *************** synth_module_prologue () *** 1373,1384 **** /* Forward declare constant_string_id and constant_string_type. */ if (!constant_string_class_name) ! constant_string_class_name = STRING_OBJECT_CLASS_NAME; ! constant_string_id = get_identifier (constant_string_class_name); constant_string_type = xref_tag (RECORD_TYPE, constant_string_id); } /* Custom build_string which sets TREE_TYPE! */ static tree --- 1202,1241 ---- /* Forward declare constant_string_id and constant_string_type. */ if (!constant_string_class_name) ! constant_string_class_name = default_constant_string_class_name; ! constant_string_id = get_identifier (constant_string_class_name); constant_string_type = xref_tag (RECORD_TYPE, constant_string_id); } + /* Predefine the following data type: + + struct STRING_OBJECT_CLASS_NAME + { + Object isa; + char *cString; + unsigned int length; + }; */ + + static void + build_string_class_template () + { + tree field_decl, field_decl_chain; + + field_decl = create_builtin_decl (FIELD_DECL, id_type, "isa"); + field_decl_chain = field_decl; + + field_decl = create_builtin_decl (FIELD_DECL, + build_pointer_type (char_type_node), + "cString"); + chainon (field_decl_chain, field_decl); + + field_decl = create_builtin_decl (FIELD_DECL, unsigned_type_node, "length"); + chainon (field_decl_chain, field_decl); + + finish_struct (constant_string_type, field_decl_chain, NULL_TREE); + } + /* Custom build_string which sets TREE_TYPE! */ static tree *************** my_build_string (len, str) *** 1404,1414 **** } /* Given a chain of STRING_CST's, build a static instance of ! NXConstanString which points at the concatenation of those strings. We place the string object in the __string_objects section of the __OBJC segment. The Objective-C runtime will initialize the isa ! pointers of the string objects to point at the NXConstandString class ! object. */ tree build_objc_string_object (strings) --- 1261,1271 ---- } /* 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 section of the __OBJC segment. The Objective-C runtime will initialize the isa ! pointers of the string objects to point at the NXConstantString ! class object. */ tree build_objc_string_object (strings) *************** build_objc_string_object (strings) *** 1419,1425 **** if (lookup_interface (constant_string_id) == NULL_TREE) { ! error ("Cannot find interface declaration for `%s'", IDENTIFIER_POINTER (constant_string_id)); return error_mark_node; } --- 1276,1282 ---- if (lookup_interface (constant_string_id) == NULL_TREE) { ! error ("cannot find interface declaration for `%s'", IDENTIFIER_POINTER (constant_string_id)); return error_mark_node; } *************** build_objc_string_object (strings) *** 1430,1438 **** TREE_SET_CODE (string, STRING_CST); length = TREE_STRING_LENGTH (string) - 1; ! /* & ((NXConstantString) {0, string, length}) */ - 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); --- 1287,1319 ---- TREE_SET_CODE (string, STRING_CST); length = TREE_STRING_LENGTH (string) - 1; ! /* We could not properly create NXConstantString in synth_module_prologue, ! because that's called before debugging is initialized. Do it now. */ ! if (TYPE_FIELDS (constant_string_type) == NULL_TREE) ! build_string_class_template (); ! ! /* & ((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); *************** objc_add_static_instance (constructor, c *** 1474,1486 **** DECL_COMMON (decl) = 1; TREE_STATIC (decl) = 1; DECL_ARTIFICIAL (decl) = 1; pushdecl_top_level (decl); rest_of_decl_compilation (decl, 0, 1, 0); - /* Do this here so it gets output later instead of possibly - inside something else we are writing. */ - DECL_INITIAL (decl) = constructor; - /* Add the DECL to the head of this CLASS' list. */ TREE_PURPOSE (*chain) = tree_cons (NULL_TREE, decl, TREE_PURPOSE (*chain)); --- 1355,1368 ---- DECL_COMMON (decl) = 1; TREE_STATIC (decl) = 1; DECL_ARTIFICIAL (decl) = 1; + DECL_INITIAL (decl) = constructor; + + /* We may be writing something else just now. + 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)); *************** static tree *** 1494,1501 **** build_constructor (type, elts) tree type, elts; { ! tree constructor = build (CONSTRUCTOR, type, NULL_TREE, elts); TREE_CONSTANT (constructor) = 1; TREE_STATIC (constructor) = 1; TREE_READONLY (constructor) = 1; --- 1376,1402 ---- build_constructor (type, elts) tree type, 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 ; 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, NULL_TREE, elts); TREE_CONSTANT (constructor) = 1; TREE_STATIC (constructor) = 1; TREE_READONLY (constructor) = 1; *************** init_objc_symtab (type) *** 1659,1685 **** return build_constructor (type, nreverse (initlist)); } ! /* Push forward-declarations of all the categories ! so that init_def_list can use them in a CONSTRUCTOR. */ static void forward_declare_categories () { struct imp_entry *impent; ! tree sav = implementation_context; for (impent = imp_list; impent; impent = impent->next) { if (TREE_CODE (impent->imp_context) == CATEGORY_IMPLEMENTATION_TYPE) { /* Set an invisible arg to synth_id_with_class_suffix. */ ! implementation_context = impent->imp_context; impent->class_decl = create_builtin_decl (VAR_DECL, objc_category_template, ! IDENTIFIER_POINTER (synth_id_with_class_suffix ("_OBJC_CATEGORY", implementation_context))); } } ! implementation_context = sav; } /* Create the declaration of _OBJC_SYMBOLS, with type `strict _objc_symtab' --- 1560,1586 ---- return build_constructor (type, nreverse (initlist)); } ! /* Push forward-declarations of all the categories so that ! init_def_list can use them in a CONSTRUCTOR. */ static void forward_declare_categories () { struct imp_entry *impent; ! tree sav = objc_implementation_context; for (impent = imp_list; impent; impent = impent->next) { if (TREE_CODE (impent->imp_context) == CATEGORY_IMPLEMENTATION_TYPE) { /* Set an invisible arg to synth_id_with_class_suffix. */ ! objc_implementation_context = impent->imp_context; impent->class_decl = create_builtin_decl (VAR_DECL, objc_category_template, ! IDENTIFIER_POINTER (synth_id_with_class_suffix ("_OBJC_CATEGORY", objc_implementation_context))); } } ! objc_implementation_context = sav; } /* Create the declaration of _OBJC_SYMBOLS, with type `strict _objc_symtab' *************** generate_objc_symtab_decl () *** 1706,1712 **** tree_cons (NULL_TREE, objc_symtab_template, sc_spec), 1, ! NULL_TREE, NULL_TREE); TREE_USED (UOBJC_SYMBOLS_decl) = 1; DECL_IGNORED_P (UOBJC_SYMBOLS_decl) = 1; --- 1607,1613 ---- 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; *************** init_module_descriptor (type) *** 1750,1762 **** /* Write out the data structures to describe Objective C classes defined. If appropriate, compile and output a setup function to initialize them. ! Return a string which is the name of a 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 const char * build_module_descriptor () { tree decl_specs, field_decl, field_decl_chain; --- 1651,1662 ---- /* 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 () { tree decl_specs, field_decl, field_decl_chain; *************** build_module_descriptor () *** 1806,1812 **** ridpointers[(int) RID_STATIC])); UOBJC_MODULES_decl = start_decl (get_identifier ("_OBJC_MODULES"), ! decl_specs, 1, NULL_TREE, NULL_TREE); DECL_ARTIFICIAL (UOBJC_MODULES_decl) = 1; DECL_IGNORED_P (UOBJC_MODULES_decl) = 1; --- 1706,1712 ---- 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; *************** build_module_descriptor () *** 1825,1888 **** way of generating the requisite code. */ if (flag_next_runtime) ! return 0; { ! tree parms, function_decl, decelerator, void_list_node_1; ! tree function_type; ! tree init_function_name = get_file_function_name ('I'); /* Declare void __objc_execClass (void *); */ void_list_node_1 = build_tree_list (NULL_TREE, void_type_node); ! function_type ! = build_function_type (void_type_node, ! tree_cons (NULL_TREE, ptr_type_node, ! void_list_node_1)); ! function_decl = build_decl (FUNCTION_DECL, ! get_identifier (TAG_EXECCLASS), ! function_type); ! DECL_EXTERNAL (function_decl) = 1; ! DECL_ARTIFICIAL (function_decl) = 1; ! TREE_PUBLIC (function_decl) = 1; ! ! pushdecl (function_decl); ! rest_of_decl_compilation (function_decl, 0, 0, 0); ! ! parms ! = build_tree_list (NULL_TREE, ! build_unary_op (ADDR_EXPR, UOBJC_MODULES_decl, 0)); ! decelerator = build_function_call (function_decl, parms); /* void _GLOBAL_$I$ () {objc_execClass (&L_OBJC_MODULES);} */ start_function (void_list_node_1, build_nt (CALL_EXPR, init_function_name, - /* This has the format of the output - of get_parm_info. */ tree_cons (NULL_TREE, NULL_TREE, void_list_node_1), NULL_TREE), ! NULL_TREE, NULL_TREE); ! #if 0 /* This should be turned back on later ! for the systems where collect is not needed. */ ! /* Make these functions nonglobal ! so each file can use the same name. */ ! TREE_PUBLIC (current_function_decl) = 0; ! #endif ! TREE_USED (current_function_decl) = 1; store_parm_decls (); ! assemble_external (function_decl); ! c_expand_expr_stmt (decelerator); ! TREE_PUBLIC (current_function_decl) = 1; ! function_decl = current_function_decl; ! finish_function (0); ! /* Return the name of the constructor function. */ ! return XSTR (XEXP (DECL_RTL (function_decl), 0), 0); } } --- 1725,1781 ---- 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, ! void_list_node_1))); ! 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, void_list_node_1), 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 (0, 0); ! ! return XEXP (DECL_RTL (init_function_decl), 0); } } *************** generate_static_references () *** 1956,1962 **** 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, NULL_TREE); DECL_CONTEXT (decl) = 0; DECL_ARTIFICIAL (decl) = 1; --- 1849,1855 ---- 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; *************** generate_static_references () *** 1996,2002 **** build_tree_list (NULL_TREE, ridpointers[(int) RID_STATIC])); static_instances_decl ! = start_decl (expr_decl, decl_spec, 1, NULL_TREE, NULL_TREE); TREE_USED (static_instances_decl) = 1; DECL_CONTEXT (static_instances_decl) = 0; DECL_ARTIFICIAL (static_instances_decl) = 1; --- 1889,1895 ---- 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; *************** generate_strings () *** 2022,2028 **** = 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, NULL_TREE); DECL_CONTEXT (decl) = NULL_TREE; string_expr = my_build_string (IDENTIFIER_LENGTH (string) + 1, IDENTIFIER_POINTER (string)); --- 1915,1921 ---- = 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)); *************** generate_strings () *** 2037,2043 **** = 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, NULL_TREE); DECL_CONTEXT (decl) = NULL_TREE; string_expr = my_build_string (IDENTIFIER_LENGTH (string) + 1, IDENTIFIER_POINTER (string)); --- 1930,1936 ---- = 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)); *************** generate_strings () *** 2052,2058 **** = 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, NULL_TREE); DECL_CONTEXT (decl) = NULL_TREE; string_expr = my_build_string (IDENTIFIER_LENGTH (string) + 1, IDENTIFIER_POINTER (string)); --- 1945,1951 ---- = 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)); *************** build_selector (ident) *** 2098,2136 **** return build_c_cast (selector_type, expr); /* cast! */ } - /* Synthesize the following expr: (char *)&_OBJC_STRINGS[] - The cast stops the compiler from issuing the following message: - grok.m: warning: initialization of non-const * pointer from const * - grok.m: warning: initialization between incompatible pointer types. */ - - #if 0 - static tree - build_msg_pool_reference (offset) - int offset; - { - tree expr = build_int_2 (offset, 0); - tree cast; - - expr = build_array_ref (UOBJC_STRINGS_decl, expr); - expr = build_unary_op (ADDR_EXPR, expr, 0); - - cast = build_tree_list (build_tree_list (NULL_TREE, - ridpointers[(int) RID_CHAR]), - build1 (INDIRECT_REF, NULL_TREE, NULL_TREE)); - TREE_TYPE (expr) = groktypename (cast); - return expr; - } - - static tree - init_selector (offset) - int offset; - { - tree expr = build_msg_pool_reference (offset); - TREE_TYPE (expr) = selector_type; - return expr; - } - #endif - static void build_selector_translation_table () { --- 1991,1996 ---- *************** build_selector_translation_table () *** 2158,2164 **** /* 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, NULL_TREE); } /* add one for the '\0' character */ --- 2018,2024 ---- /* 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 */ *************** add_class_reference (ident) *** 2341,2347 **** tree get_class_reference (ident) ! tree ident; { if (flag_next_runtime) { --- 2201,2207 ---- tree get_class_reference (ident) ! tree ident; { if (flag_next_runtime) { *************** get_class_reference (ident) *** 2376,2388 **** } } ! /* SEL_REFDEF_CHAIN is a list whose "value" fields will be instances ! of identifier_node that represent the selector. It returns the ! offset of the selector from the beginning of the _OBJC_STRINGS ! pool. This offset is typically used by init_selector during code ! generation. ! ! For each string section we have a chain which maps identifier nodes to decls for the strings. */ static tree --- 2236,2242 ---- } } ! /* For each string section we have a chain which maps identifier nodes to decls for the strings. */ static tree *************** objc_declare_alias (alias_ident, class_i *** 2457,2465 **** tree class_ident; { if (is_class_name (class_ident) != 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 (class_ident, alias_ident, alias_chain); } --- 2311,2319 ---- tree class_ident; { if (is_class_name (class_ident) != 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 (class_ident, alias_ident, alias_chain); } *************** build_ivar_chain (interface, copy) *** 2583,2596 **** 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; --- 2437,2450 ---- 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; *************** build_method_prototype_template () *** 2806,2823 **** proto_record = start_struct (RECORD_TYPE, get_identifier (UTAG_METHOD_PROTOTYPE)); - #ifdef OBJC_INT_SELECTORS - /* unsigned int _cmd; */ - decl_specs - = tree_cons (NULL_TREE, ridpointers[(int) RID_UNSIGNED], NULL_TREE); - decl_specs = tree_cons (NULL_TREE, ridpointers[(int) RID_INT], decl_specs); - field_decl = get_identifier ("_cmd"); - #else /* OBJC_INT_SELECTORS */ /* 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")); - #endif /* OBJC_INT_SELECTORS */ field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE); --- 2660,2669 ---- *************** generate_descriptor_table (type, name, s *** 2967,2973 **** decl_specs = tree_cons (NULL_TREE, type, sc_spec); decl = start_decl (synth_id_with_class_suffix (name, proto), ! decl_specs, 1, NULL_TREE, NULL_TREE); DECL_CONTEXT (decl) = NULL_TREE; initlist = build_tree_list (NULL_TREE, build_int_2 (size, 0)); --- 2813,2819 ---- 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)); *************** generate_descriptor_table (type, name, s *** 2980,2998 **** } static void ! generate_method_descriptors (protocol) /* generate_dispatch_tables */ ! tree protocol; { - static tree objc_method_prototype_template; 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 (); ! ggc_add_tree_root (&objc_method_prototype_template, 1); ! } cast = build_tree_list (build_tree_list (NULL_TREE, xref_tag (RECORD_TYPE, get_identifier (UTAG_METHOD_PROTOTYPE_LIST))), --- 2826,2840 ---- } static void ! generate_method_descriptors (protocol) ! 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))), *************** generate_method_descriptors (protocol) / *** 3043,3048 **** --- 2885,2893 ---- UOBJC_INSTANCE_METHODS_decl = 0; } + /* Generate a temporary FUNCTION_DECL node to be used in + hack_method_prototype below. */ + static tree build_tmp_function_decl () { *************** build_tmp_function_decl () *** 3057,3070 **** (build_tree_list (decl_specs, build1 (INDIRECT_REF, NULL_TREE, NULL_TREE)), ! build_tree_list (NULL_TREE, NULL_TREE))); decl_specs = build_tree_list (NULL_TREE, xref_tag (RECORD_TYPE, get_identifier (TAG_SELECTOR))); expr_decl = build1 (INDIRECT_REF, NULL_TREE, NULL_TREE); push_parm_decl (build_tree_list (build_tree_list (decl_specs, expr_decl), ! build_tree_list (NULL_TREE, NULL_TREE))); parms = get_parm_info (0); poplevel (0, 0, 0); --- 2902,2915 ---- (build_tree_list (decl_specs, build1 (INDIRECT_REF, NULL_TREE, NULL_TREE)), ! NULL_TREE)); decl_specs = build_tree_list (NULL_TREE, xref_tag (RECORD_TYPE, get_identifier (TAG_SELECTOR))); expr_decl = build1 (INDIRECT_REF, NULL_TREE, NULL_TREE); push_parm_decl (build_tree_list (build_tree_list (decl_specs, expr_decl), ! NULL_TREE)); parms = get_parm_info (0); poplevel (0, 0, 0); *************** build_tmp_function_decl () *** 3076,3081 **** --- 2921,2933 ---- return define_decl (expr_decl, decl_specs); } + /* Generate the prototypes for protocol methods. This is used to + generate method encodings for these. + + NST_METHODS is the method to generate a _DECL node for TMP_DECL is + a decl node to be used. This is also where the return value is + given. */ + static void hack_method_prototype (nst_methods, tmp_decl) tree nst_methods; *************** hack_method_prototype (nst_methods, tmp_ *** 3099,3104 **** --- 2951,2959 ---- /* Usually called from store_parm_decls -> init_function_start. */ DECL_ARGUMENTS (tmp_decl) = TREE_PURPOSE (parms); + + if (current_function_decl) + abort (); current_function_decl = tmp_decl; { *************** hack_method_prototype (nst_methods, tmp_ *** 3122,3127 **** --- 2977,2983 ---- /* install return type */ TREE_TYPE (TREE_TYPE (tmp_decl)) = groktypename (TREE_TYPE (nst_methods)); + current_function_decl = NULL; } static void *************** generate_protocols () *** 3213,3219 **** 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, NULL_TREE); DECL_CONTEXT (decl) = NULL_TREE; --- 3069,3075 ---- 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; *************** synth_forward_declarations () *** 3578,3584 **** /* extern struct objc_class _OBJC_CLASS_; */ ! an_id = synth_id_with_class_suffix ("_OBJC_CLASS", implementation_context); sc_spec = build_tree_list (NULL_TREE, ridpointers[(int) RID_EXTERN]); decl_specs = tree_cons (NULL_TREE, objc_class_template, sc_spec); --- 3434,3440 ---- /* extern struct objc_class _OBJC_CLASS_; */ ! an_id = synth_id_with_class_suffix ("_OBJC_CLASS", objc_implementation_context); sc_spec = build_tree_list (NULL_TREE, ridpointers[(int) RID_EXTERN]); decl_specs = tree_cons (NULL_TREE, objc_class_template, sc_spec); *************** synth_forward_declarations () *** 3589,3595 **** /* extern struct objc_class _OBJC_METACLASS_; */ an_id = synth_id_with_class_suffix ("_OBJC_METACLASS", ! implementation_context); UOBJC_METACLASS_decl = define_decl (an_id, decl_specs); TREE_USED (UOBJC_METACLASS_decl) = 1; --- 3445,3451 ---- /* extern struct objc_class _OBJC_METACLASS_; */ an_id = synth_id_with_class_suffix ("_OBJC_METACLASS", ! objc_implementation_context); UOBJC_METACLASS_decl = define_decl (an_id, decl_specs); TREE_USED (UOBJC_METACLASS_decl) = 1; *************** error_with_ivar (message, decl, rawdecl) *** 3612,3621 **** report_error_function (DECL_SOURCE_FILE (decl)); ! fprintf (stderr, "%s:%d: ", ! DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl)); ! memset (errbuf, 0, BUFSIZE); ! fprintf (stderr, "%s `%s'\n", message, gen_declaration (rawdecl, errbuf)); } #define USERTYPE(t) \ --- 3468,3478 ---- report_error_function (DECL_SOURCE_FILE (decl)); ! error_with_file_and_line (DECL_SOURCE_FILE (decl), ! DECL_SOURCE_LINE (decl), ! "%s `%s'", ! message, gen_declaration (rawdecl, errbuf)); ! } #define USERTYPE(t) \ *************** build_ivar_list_initializer (type, field *** 3892,3898 **** ivar); obstack_free (&util_obstack, util_firstobj); ! /* Set offset. */ ivar = tree_cons (NULL_TREE, byte_position (field_decl), ivar); initlist = tree_cons (NULL_TREE, build_constructor (type, nreverse (ivar)), --- 3749,3755 ---- ivar); obstack_free (&util_obstack, util_firstobj); ! /* Set offset. */ ivar = tree_cons (NULL_TREE, byte_position (field_decl), ivar); initlist = tree_cons (NULL_TREE, build_constructor (type, nreverse (ivar)), *************** generate_ivars_list (type, name, size, l *** 3917,3924 **** 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, implementation_context), ! decl_specs, 1, NULL_TREE, NULL_TREE); initlist = build_tree_list (NULL_TREE, build_int_2 (size, 0)); initlist = tree_cons (NULL_TREE, list, initlist); --- 3774,3781 ---- 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); *************** build_dispatch_table_initializer (type, *** 4001,4006 **** --- 3858,3868 ---- build_selector (METHOD_SEL_NAME (entries)), NULL_TREE); + /* Generate the method encoding if we don't have one already. */ + if (! METHOD_ENCODING (entries)) + METHOD_ENCODING (entries) = + encode_method_def (METHOD_DEFINITION (entries)); + elemlist = tree_cons (NULL_TREE, add_objc_string (METHOD_ENCODING (entries), meth_var_types), *************** build_method_template () *** 4038,4057 **** _SLT_record = start_struct (RECORD_TYPE, get_identifier (UTAG_METHOD)); - #ifdef OBJC_INT_SELECTORS - /* unsigned int _cmd; */ - decl_specs = tree_cons (NULL_TREE, ridpointers[(int) RID_UNSIGNED], - NULL_TREE); - decl_specs = tree_cons (NULL_TREE, ridpointers[(int) RID_INT], decl_specs); - field_decl = get_identifier ("_cmd"); - #else /* not OBJC_INT_SELECTORS */ /* 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")); - #endif /* not OBJC_INT_SELECTORS */ field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE); --- 3900,3911 ---- *************** generate_dispatch_table (type, name, siz *** 4090,4097 **** 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, implementation_context), ! decl_specs, 1, NULL_TREE, NULL_TREE); initlist = build_tree_list (NULL_TREE, build_int_2 (0, 0)); initlist = tree_cons (NULL_TREE, build_int_2 (size, 0), initlist); --- 3944,3951 ---- 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); *************** generate_dispatch_tables () *** 4123,4129 **** variable_length_type = groktypename (cast); ! chain = CLASS_CLS_METHODS (implementation_context); if (chain) { size = list_length (chain); --- 3977,3983 ---- variable_length_type = groktypename (cast); ! chain = CLASS_CLS_METHODS (objc_implementation_context); if (chain) { size = list_length (chain); *************** generate_dispatch_tables () *** 4135,4141 **** UOBJC_CLASS_METHODS_decl = generate_dispatch_table (method_list_template, ! ((TREE_CODE (implementation_context) == CLASS_IMPLEMENTATION_TYPE) ? "_OBJC_CLASS_METHODS" : "_OBJC_CATEGORY_CLASS_METHODS"), --- 3989,3995 ---- UOBJC_CLASS_METHODS_decl = generate_dispatch_table (method_list_template, ! ((TREE_CODE (objc_implementation_context) == CLASS_IMPLEMENTATION_TYPE) ? "_OBJC_CLASS_METHODS" : "_OBJC_CATEGORY_CLASS_METHODS"), *************** generate_dispatch_tables () *** 4145,4151 **** else UOBJC_CLASS_METHODS_decl = 0; ! chain = CLASS_NST_METHODS (implementation_context); if (chain) { size = list_length (chain); --- 3999,4005 ---- else UOBJC_CLASS_METHODS_decl = 0; ! chain = CLASS_NST_METHODS (objc_implementation_context); if (chain) { size = list_length (chain); *************** generate_dispatch_tables () *** 4155,4161 **** initlist = build_dispatch_table_initializer (objc_method_template, chain); ! if (TREE_CODE (implementation_context) == CLASS_IMPLEMENTATION_TYPE) UOBJC_INSTANCE_METHODS_decl = generate_dispatch_table (method_list_template, "_OBJC_INSTANCE_METHODS", --- 4009,4015 ---- initlist = build_dispatch_table_initializer (objc_method_template, chain); ! if (TREE_CODE (objc_implementation_context) == CLASS_IMPLEMENTATION_TYPE) UOBJC_INSTANCE_METHODS_decl = generate_dispatch_table (method_list_template, "_OBJC_INSTANCE_METHODS", *************** generate_protocol_list (i_or_p) *** 4249,4255 **** expr_decl = build1 (INDIRECT_REF, NULL_TREE, expr_decl); ! refs_decl = start_decl (expr_decl, decl_specs, 1, NULL_TREE, NULL_TREE); DECL_CONTEXT (refs_decl) = NULL_TREE; finish_decl (refs_decl, build_constructor (TREE_TYPE (refs_decl), --- 4103,4109 ---- 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, build_constructor (TREE_TYPE (refs_decl), *************** generate_category (cat) *** 4458,4465 **** decl_specs = tree_cons (NULL_TREE, objc_category_template, sc_spec); decl = start_decl (synth_id_with_class_suffix ("_OBJC_CATEGORY", ! implementation_context), ! decl_specs, 1, NULL_TREE, NULL_TREE); initlist = build_category_initializer (TREE_TYPE (decl), cat_name_expr, class_name_expr, --- 4312,4319 ---- 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, *************** generate_shared_structures () *** 4542,4548 **** decl_specs = tree_cons (NULL_TREE, objc_class_template, sc_spec); decl = start_decl (DECL_NAME (UOBJC_METACLASS_decl), decl_specs, 1, ! NULL_TREE, NULL_TREE); initlist = build_shared_structure_initializer --- 4396,4402 ---- 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 *************** generate_shared_structures () *** 4559,4565 **** /* static struct objc_class _OBJC_CLASS_Foo={ ... }; */ decl = start_decl (DECL_NAME (UOBJC_CLASS_decl), decl_specs, 1, ! NULL_TREE, NULL_TREE); initlist = build_shared_structure_initializer --- 4413,4419 ---- /* 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 *************** synth_id_with_class_suffix (preamble, ct *** 4586,4593 **** if (TREE_CODE (ctxt) == CLASS_IMPLEMENTATION_TYPE || TREE_CODE (ctxt) == CLASS_INTERFACE_TYPE) { ! const char *class_name ! = IDENTIFIER_POINTER (CLASS_NAME (implementation_context)); string = (char *) alloca (strlen (preamble) + strlen (class_name) + 3); sprintf (string, "%s_%s", preamble, IDENTIFIER_POINTER (CLASS_NAME (ctxt))); --- 4440,4447 ---- 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))); *************** synth_id_with_class_suffix (preamble, ct *** 4596,4605 **** || TREE_CODE (ctxt) == CATEGORY_INTERFACE_TYPE) { /* We have a category. */ ! const char *class_name ! = IDENTIFIER_POINTER (CLASS_NAME (implementation_context)); ! const char *class_super_name ! = IDENTIFIER_POINTER (CLASS_SUPER_NAME (implementation_context)); string = (char *) alloca (strlen (preamble) + strlen (class_name) + strlen (class_super_name) --- 4450,4459 ---- || TREE_CODE (ctxt) == CATEGORY_INTERFACE_TYPE) { /* We have a category. */ ! const char *const class_name ! = 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) *************** build_keyword_selector (selector) *** 4711,4716 **** --- 4565,4571 ---- tree key_chain, key_name; char *buf; + /* Scan the selector to see how much space we'll need. */ for (key_chain = selector; key_chain; key_chain = TREE_CHAIN (key_chain)) { if (TREE_CODE (selector) == KEYWORD_DECL) *************** build_keyword_selector (selector) *** 4727,4734 **** len++; } ! buf = (char *)alloca (len + 1); ! memset (buf, 0, len + 1); for (key_chain = selector; key_chain; key_chain = TREE_CHAIN (key_chain)) { --- 4582,4590 ---- len++; } ! buf = (char *) alloca (len + 1); ! /* Start the buffer out as an empty string. */ ! buf[0] = '\0'; for (key_chain = selector; key_chain; key_chain = TREE_CHAIN (key_chain)) { *************** build_method_decl (code, ret_type, selec *** 4785,4792 **** #define METHOD_DEF 0 #define METHOD_REF 1 ! /* Used by `build_message_expr' and `comp_method_types'. Return an ! argument list for method METH. CONTEXT is either METHOD_DEF or METHOD_REF, saying whether we are trying to define a method or call one. SUPERFLAG says this is for a send to super; this makes a difference for the NeXT calling sequence in which the lookup and --- 4641,4648 ---- #define METHOD_DEF 0 #define METHOD_REF 1 ! /* Used by `build_objc_method_call' and `comp_method_types'. Return ! an argument list for method METH. CONTEXT is either METHOD_DEF or METHOD_REF, saying whether we are trying to define a method or call one. SUPERFLAG says this is for a send to super; this makes a difference for the NeXT calling sequence in which the lookup and *************** check_duplicates (hsh) *** 4862,4879 **** return meth; } ! /* 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. */ static tree receiver_is_class_object (receiver) tree receiver; { tree chain, exp, arg; if (flag_next_runtime) { ! /* The receiver is a variable created by build_class_reference_decl. */ if (TREE_CODE (receiver) == VAR_DECL && TREE_TYPE (receiver) == objc_class_type) /* Look up the identifier. */ --- 4718,4746 ---- return meth; } ! /* 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. */ static tree receiver_is_class_object (receiver) tree receiver; { tree chain, exp, arg; + + /* The receiver is 'self' in the context of a class method. */ + if (objc_method_context + && receiver == self_decl + && TREE_CODE (objc_method_context) == CLASS_METHOD_DECL) + { + return CLASS_NAME (objc_implementation_context); + } + if (flag_next_runtime) { ! /* The receiver is a variable created by ! build_class_reference_decl. */ if (TREE_CODE (receiver) == VAR_DECL && TREE_TYPE (receiver) == objc_class_type) /* Look up the identifier. */ *************** receiver_is_class_object (receiver) *** 4885,4896 **** { /* The receiver is a function call that returns an id. Check if it is a call to objc_getClass, if so, pick up the class name. */ ! if ((exp = TREE_OPERAND (receiver, 0)) && TREE_CODE (exp) == ADDR_EXPR && (exp = TREE_OPERAND (exp, 0)) && TREE_CODE (exp) == FUNCTION_DECL && exp == objc_get_class_decl ! /* we have a call to objc_getClass! */ && (arg = TREE_OPERAND (receiver, 1)) && TREE_CODE (arg) == TREE_LIST && (arg = TREE_VALUE (arg))) --- 4752,4764 ---- { /* The receiver is a function call that returns an id. Check if it is a call to objc_getClass, if so, pick up the class name. */ ! if (TREE_CODE (receiver) == CALL_EXPR ! && (exp = TREE_OPERAND (receiver, 0)) && TREE_CODE (exp) == ADDR_EXPR && (exp = TREE_OPERAND (exp, 0)) && TREE_CODE (exp) == FUNCTION_DECL && exp == objc_get_class_decl ! /* We have a call to objc_getClass! */ && (arg = TREE_OPERAND (receiver, 1)) && TREE_CODE (arg) == TREE_LIST && (arg = TREE_VALUE (arg))) *************** build_message_expr (mess) *** 4930,4987 **** tree mess; { tree receiver = TREE_PURPOSE (mess); ! tree selector, self_object; ! tree rtype, sel_name; tree args = TREE_VALUE (mess); tree method_params = NULL_TREE; - tree method_prototype = NULL_TREE; - tree retval; - int statically_typed = 0, statically_allocated = 0; - tree class_ident = 0; - - /* 1 if this is sending to the superclass. */ - int super; if (TREE_CODE (receiver) == ERROR_MARK) return error_mark_node; - /* Determine receiver type. */ - rtype = TREE_TYPE (receiver); - super = IS_SUPER (rtype); - - if (! super) - { - if (TREE_STATIC_TEMPLATE (rtype)) - statically_allocated = 1; - else if (TREE_CODE (rtype) == POINTER_TYPE - && TREE_STATIC_TEMPLATE (TREE_TYPE (rtype))) - statically_typed = 1; - else if ((flag_next_runtime - || (TREE_CODE (receiver) == CALL_EXPR && IS_ID (rtype))) - && (class_ident = receiver_is_class_object (receiver))) - ; - else if (! IS_ID (rtype) - /* Allow any type that matches objc_class_type. */ - && ! comptypes (rtype, objc_class_type)) - { - memset (errbuf, 0, BUFSIZE); - warning ("invalid receiver type `%s'", - gen_declaration (rtype, errbuf)); - } - - if (statically_allocated) - receiver = build_unary_op (ADDR_EXPR, receiver, 0); - - /* Don't evaluate the receiver twice. */ - receiver = save_expr (receiver); - self_object = receiver; - } - else - /* If sending to `super', use current self as the object. */ - self_object = self_decl; - /* Obtain the full selector name. */ - if (TREE_CODE (args) == IDENTIFIER_NODE) /* A unary selector. */ sel_name = args; --- 4798,4811 ---- 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) return error_mark_node; /* Obtain the full selector name. */ if (TREE_CODE (args) == IDENTIFIER_NODE) /* A unary selector. */ sel_name = args; *************** build_message_expr (mess) *** 4991,4998 **** abort (); /* Build the parameter list to give to the method. */ - - method_params = NULL_TREE; if (TREE_CODE (args) == TREE_LIST) { tree chain = args, prev = NULL_TREE; --- 4815,4820 ---- *************** build_message_expr (mess) *** 5016,5024 **** method_params = args; } /* Determine operation return type. */ ! if (IS_SUPER (rtype)) { tree iface; --- 4838,4895 ---- method_params = args; } + return finish_message_expr (receiver, sel_name, method_params); + } + + /* 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 (receiver, sel_name, method_params) + tree receiver, sel_name, method_params; + { + tree method_prototype = NULL_TREE, class_ident = NULL_TREE; + tree selector, self_object, retval; + int statically_typed = 0, statically_allocated = 0; + + /* Determine receiver type. */ + tree rtype = TREE_TYPE (receiver); + int super = IS_SUPER (rtype); + + if (! super) + { + if (TREE_STATIC_TEMPLATE (rtype)) + statically_allocated = 1; + else if (TREE_CODE (rtype) == POINTER_TYPE + && TREE_STATIC_TEMPLATE (TREE_TYPE (rtype))) + statically_typed = 1; + else if ((flag_next_runtime + || (IS_ID (rtype))) + && (class_ident = receiver_is_class_object (receiver))) + ; + else if (! IS_ID (rtype) + /* Allow any type that matches objc_class_type. */ + && ! comptypes (rtype, objc_class_type)) + { + warning ("invalid receiver type `%s'", + gen_declaration (rtype, errbuf)); + } + if (statically_allocated) + receiver = build_unary_op (ADDR_EXPR, receiver, 0); + + /* Don't evaluate the receiver twice. */ + receiver = save_expr (receiver); + self_object = receiver; + } + else + /* If sending to `super', use current self as the object. */ + self_object = self_decl; + /* Determine operation return type. */ ! if (super) { tree iface; *************** build_message_expr (mess) *** 5027,5033 **** iface = lookup_interface (CLASS_SUPER_NAME (implementation_template)); ! if (TREE_CODE (method_context) == INSTANCE_METHOD_DECL) method_prototype = lookup_instance_method_static (iface, sel_name); else method_prototype = lookup_class_method_static (iface, sel_name); --- 4898,4904 ---- iface = lookup_interface (CLASS_SUPER_NAME (implementation_template)); ! if (TREE_CODE (objc_method_context) == INSTANCE_METHOD_DECL) method_prototype = lookup_instance_method_static (iface, sel_name); else method_prototype = lookup_class_method_static (iface, sel_name); *************** build_message_expr (mess) *** 5069,5076 **** /* `self' is now statically_typed. All methods should be visible within the context of the implementation. */ ! if (implementation_context ! && CLASS_NAME (implementation_context) == TYPE_NAME (ctype)) { method_prototype = lookup_instance_method_static (implementation_template, --- 4940,4947 ---- /* `self' is now statically_typed. All methods should be visible within the context of the implementation. */ ! if (objc_implementation_context ! && CLASS_NAME (objc_implementation_context) == TYPE_NAME (ctype)) { method_prototype = lookup_instance_method_static (implementation_template, *************** build_message_expr (mess) *** 5082,5092 **** sel_name, 0); if (! method_prototype ! && implementation_template != implementation_context) /* The method is not published in the interface. Check locally. */ method_prototype ! = lookup_method (CLASS_NST_METHODS (implementation_context), sel_name); } else --- 4953,4963 ---- sel_name, 0); if (! method_prototype ! && implementation_template != objc_implementation_context) /* The method is not published in the interface. Check locally. */ method_prototype ! = lookup_method (CLASS_NST_METHODS (objc_implementation_context), sel_name); } else *************** build_message_expr (mess) *** 5113,5130 **** } else if (class_ident) { ! if (implementation_context ! && CLASS_NAME (implementation_context) == class_ident) { method_prototype = lookup_class_method_static (implementation_template, sel_name); if (!method_prototype ! && implementation_template != implementation_context) /* The method is not published in the interface. Check locally. */ method_prototype ! = lookup_method (CLASS_CLS_METHODS (implementation_context), sel_name); } else --- 4984,5001 ---- } else if (class_ident) { ! if (objc_implementation_context ! && CLASS_NAME (objc_implementation_context) == class_ident) { method_prototype = lookup_class_method_static (implementation_template, sel_name); if (!method_prototype ! && implementation_template != objc_implementation_context) /* The method is not published in the interface. Check locally. */ method_prototype ! = lookup_method (CLASS_CLS_METHODS (objc_implementation_context), sel_name); } else *************** build_message_expr (mess) *** 5137,5143 **** if (!method_prototype) { ! warning ("cannot find class (factory) method."); warning ("return type for `%s' defaults to id", IDENTIFIER_POINTER (sel_name)); } --- 5008,5014 ---- if (!method_prototype) { ! warning ("cannot find class (factory) method"); warning ("return type for `%s' defaults to id", IDENTIFIER_POINTER (sel_name)); } *************** build_message_expr (mess) *** 5155,5161 **** { hash hsh; ! warning ("method `%s' not implemented by protocol.", IDENTIFIER_POINTER (sel_name)); /* Try and find the method signature in the global pools. */ --- 5026,5032 ---- { hash hsh; ! warning ("method `%s' not implemented by protocol", IDENTIFIER_POINTER (sel_name)); /* Try and find the method signature in the global pools. */ *************** build_message_expr (mess) *** 5173,5187 **** /* We think we have an instance...loophole: extern id Object; */ hsh = hash_lookup (nst_method_hash_list, sel_name); if (!hsh) ! /* For various loopholes, like sending messages to self in a ! factory context. */ hsh = hash_lookup (cls_method_hash_list, sel_name); method_prototype = check_duplicates (hsh); if (!method_prototype) { ! warning ("cannot find method."); warning ("return type for `%s' defaults to id", IDENTIFIER_POINTER (sel_name)); } --- 5044,5058 ---- /* We think we have an instance...loophole: extern id Object; */ hsh = hash_lookup (nst_method_hash_list, sel_name); + if (!hsh) ! /* For various loopholes */ hsh = hash_lookup (cls_method_hash_list, sel_name); method_prototype = check_duplicates (hsh); if (!method_prototype) { ! warning ("cannot find method"); warning ("return type for `%s' defaults to id", IDENTIFIER_POINTER (sel_name)); } *************** build_objc_method_call (super_flag, meth *** 5242,5253 **** Clobber the data type of SENDER temporarily to accept all the arguments for this operation, and to return whatever this operation returns. */ ! tree arglist = NULL_TREE; ! tree retval; /* Save the proper contents of SENDER's data type. */ ! tree savarg = TYPE_ARG_TYPES (TREE_TYPE (sender)); ! tree savret = TREE_TYPE (TREE_TYPE (sender)); /* Install this method's argument types. */ arglist = get_arg_type_list (method_prototype, METHOD_REF, --- 5113,5124 ---- Clobber the data type of SENDER temporarily to accept all the arguments for this operation, and to return whatever this operation returns. */ ! tree arglist = NULL_TREE, retval, savarg, savret; ! tree ret_type = groktypename (TREE_TYPE (method_prototype)); /* Save the proper contents of SENDER's data type. */ ! savarg = TYPE_ARG_TYPES (TREE_TYPE (sender)); ! savret = TREE_TYPE (TREE_TYPE (sender)); /* Install this method's argument types. */ arglist = get_arg_type_list (method_prototype, METHOD_REF, *************** build_objc_method_call (super_flag, meth *** 5255,5262 **** TYPE_ARG_TYPES (TREE_TYPE (sender)) = arglist; /* Install this method's return type. */ ! TREE_TYPE (TREE_TYPE (sender)) ! = groktypename (TREE_TYPE (method_prototype)); /* Call SENDER with all the parameters. This will do type checking using the arg types for this method. */ --- 5126,5132 ---- TYPE_ARG_TYPES (TREE_TYPE (sender)) = arglist; /* Install this method's return type. */ ! TREE_TYPE (TREE_TYPE (sender)) = ret_type; /* Call SENDER with all the parameters. This will do type checking using the arg types for this method. */ *************** build_protocol_expr (protoname) *** 5356,5362 **** if (!p) { ! error ("Cannot find protocol declaration for `%s'", IDENTIFIER_POINTER (protoname)); return error_mark_node; } --- 5226,5232 ---- if (!p) { ! error ("cannot find protocol declaration for `%s'", IDENTIFIER_POINTER (protoname)); return error_mark_node; } *************** tree *** 5414,5420 **** build_ivar_reference (id) tree id; { ! if (TREE_CODE (method_context) == CLASS_METHOD_DECL) { /* Historically, a class method that produced objects (factory method) would assign `self' to the instance that it --- 5284,5290 ---- build_ivar_reference (id) tree id; { ! if (TREE_CODE (objc_method_context) == CLASS_METHOD_DECL) { /* Historically, a class method that produced objects (factory method) would assign `self' to the instance that it *************** build_ivar_reference (id) *** 5433,5465 **** return build_component_ref (build_indirect_ref (self_decl, "->"), id); } ! #define HASH_ALLOC_LIST_SIZE 170 ! #define ATTR_ALLOC_LIST_SIZE 170 ! #define SIZEHASHTABLE 257 ! ! /* make positive */ ! #define HASHFUNCTION(key) ((HOST_WIDE_INT) key & 0x7fffffff) static void hash_init () { ! nst_method_hash_list = (hash *)xmalloc (SIZEHASHTABLE * sizeof (hash)); ! cls_method_hash_list = (hash *)xmalloc (SIZEHASHTABLE * sizeof (hash)); ! ! if (!nst_method_hash_list || !cls_method_hash_list) ! perror ("unable to allocate space in objc-tree.c"); ! else ! { ! int i; ! ! for (i = 0; i < SIZEHASHTABLE; i++) ! { ! nst_method_hash_list[i] = 0; ! cls_method_hash_list[i] = 0; ! } ! } } static void hash_enter (hashlist, method) hash *hashlist; --- 5303,5335 ---- return build_component_ref (build_indirect_ref (self_decl, "->"), id); } ! /* Compute a hash value for a given method SEL_NAME. */ + static size_t + hash_func (sel_name) + tree sel_name; + { + const unsigned char *s + = (const unsigned char *)IDENTIFIER_POINTER (sel_name); + size_t h = 0; + + while (*s) + h = h * 67 + *s++ - 113; + return h; + } + static void hash_init () { ! nst_method_hash_list = (hash *) xcalloc (SIZEHASHTABLE, sizeof (hash)); ! cls_method_hash_list = (hash *) xcalloc (SIZEHASHTABLE, sizeof (hash)); } + /* WARNING!!!! hash_enter is called with a method, and will peek + inside to find its selector! But hash_lookup is given a selector + directly, and looks for the selector that's inside the found + entry's key (method) for comparison. */ + static void hash_enter (hashlist, method) hash *hashlist; *************** hash_enter (hashlist, method) *** 5468,5482 **** static hash hash_alloc_list = 0; static int hash_alloc_index = 0; hash obj; ! int slot = HASHFUNCTION (METHOD_SEL_NAME (method)) % SIZEHASHTABLE; if (! hash_alloc_list || hash_alloc_index >= HASH_ALLOC_LIST_SIZE) { hash_alloc_index = 0; hash_alloc_list = (hash) xmalloc (sizeof (struct hashed_entry) * HASH_ALLOC_LIST_SIZE); - if (! hash_alloc_list) - perror ("unable to allocate in objc-tree.c"); } obj = &hash_alloc_list[hash_alloc_index++]; obj->list = 0; --- 5338,5350 ---- static hash hash_alloc_list = 0; static int hash_alloc_index = 0; hash obj; ! int slot = hash_func (METHOD_SEL_NAME (method)) % SIZEHASHTABLE; if (! hash_alloc_list || hash_alloc_index >= HASH_ALLOC_LIST_SIZE) { hash_alloc_index = 0; hash_alloc_list = (hash) xmalloc (sizeof (struct hashed_entry) * HASH_ALLOC_LIST_SIZE); } obj = &hash_alloc_list[hash_alloc_index++]; obj->list = 0; *************** hash_lookup (hashlist, sel_name) *** 5493,5499 **** { hash target; ! target = hashlist[HASHFUNCTION (sel_name) % SIZEHASHTABLE]; while (target) { --- 5361,5367 ---- { hash target; ! target = hashlist[hash_func (sel_name) % SIZEHASHTABLE]; while (target) { *************** hash_add_attr (entry, value) *** 5519,5526 **** attr_alloc_index = 0; attr_alloc_list = (attr) xmalloc (sizeof (struct hashed_attribute) * ATTR_ALLOC_LIST_SIZE); - if (! attr_alloc_list) - perror ("unable to allocate in objc-tree.c"); } obj = &attr_alloc_list[attr_alloc_index++]; obj->next = entry->list; --- 5387,5392 ---- *************** lookup_class_method_static (interface, i *** 5656,5662 **** } while (inter); ! /* Simulate wrap around. */ return lookup_instance_method_static (root_inter, ident); } --- 5522,5530 ---- } while (inter); ! /* If no class (factory) method was found, check if an _instance_ ! method of the same name exists in the root class. This is what ! the Objective-C runtime will do. */ return lookup_instance_method_static (root_inter, ident); } *************** add_class_method (class, method) *** 5677,5689 **** else { if (TREE_CODE (class) == CLASS_IMPLEMENTATION_TYPE) ! error ("duplicate definition of class method `%s'.", IDENTIFIER_POINTER (METHOD_SEL_NAME (mth))); else { /* Check types; if different, complain. */ if (!comp_proto_with_proto (method, mth)) ! error ("duplicate declaration of class method `%s'.", IDENTIFIER_POINTER (METHOD_SEL_NAME (mth))); } } --- 5545,5557 ---- else { if (TREE_CODE (class) == CLASS_IMPLEMENTATION_TYPE) ! error ("duplicate definition of class method `%s'", IDENTIFIER_POINTER (METHOD_SEL_NAME (mth))); else { /* Check types; if different, complain. */ if (!comp_proto_with_proto (method, mth)) ! error ("duplicate declaration of class method `%s'", IDENTIFIER_POINTER (METHOD_SEL_NAME (mth))); } } *************** add_instance_method (class, method) *** 5719,5731 **** else { if (TREE_CODE (class) == CLASS_IMPLEMENTATION_TYPE) ! error ("duplicate definition of instance method `%s'.", IDENTIFIER_POINTER (METHOD_SEL_NAME (mth))); else { /* Check types; if different, complain. */ if (!comp_proto_with_proto (method, mth)) ! error ("duplicate declaration of instance method `%s'.", IDENTIFIER_POINTER (METHOD_SEL_NAME (mth))); } } --- 5587,5599 ---- else { if (TREE_CODE (class) == CLASS_IMPLEMENTATION_TYPE) ! error ("duplicate definition of instance method `%s'", IDENTIFIER_POINTER (METHOD_SEL_NAME (mth))); else { /* Check types; if different, complain. */ if (!comp_proto_with_proto (method, mth)) ! error ("duplicate declaration of instance method `%s'", IDENTIFIER_POINTER (METHOD_SEL_NAME (mth))); } } *************** is_public (expr, identifier) *** 5876,5882 **** { if (!lookup_interface (TYPE_NAME (basetype))) { ! error ("Cannot find interface declaration for `%s'", IDENTIFIER_POINTER (TYPE_NAME (basetype))); return 0; } --- 5744,5750 ---- { if (!lookup_interface (TYPE_NAME (basetype))) { ! error ("cannot find interface declaration for `%s'", IDENTIFIER_POINTER (TYPE_NAME (basetype))); return 0; } *************** is_public (expr, identifier) *** 5889,5900 **** /* Important difference between the Stepstone translator: all instance variables should be public within the context of the implementation. */ ! if (implementation_context ! && (((TREE_CODE (implementation_context) == CLASS_IMPLEMENTATION_TYPE) ! || (TREE_CODE (implementation_context) == CATEGORY_IMPLEMENTATION_TYPE)) ! && (CLASS_NAME (implementation_context) == TYPE_NAME (basetype)))) return ! is_private (decl); --- 5757,5768 ---- /* Important difference between the Stepstone translator: all instance variables should be public within the context of the implementation. */ ! if (objc_implementation_context ! && (((TREE_CODE (objc_implementation_context) == CLASS_IMPLEMENTATION_TYPE) ! || (TREE_CODE (objc_implementation_context) == CATEGORY_IMPLEMENTATION_TYPE)) ! && (CLASS_NAME (objc_implementation_context) == TYPE_NAME (basetype)))) return ! is_private (decl); *************** is_public (expr, identifier) *** 5905,5911 **** } } ! else if (implementation_context && (basetype == objc_object_reference)) { TREE_TYPE (expr) = uprivate_record; warning ("static access to object of type `id'"); --- 5773,5779 ---- } } ! else if (objc_implementation_context && (basetype == objc_object_reference)) { TREE_TYPE (expr) = uprivate_record; warning ("static access to object of type `id'"); *************** tree *** 5921,5926 **** --- 5789,5797 ---- get_class_ivars (interface) tree interface; { + /* Make sure we copy the leaf ivars in case @defs is used in a local + context. Otherwise finish_struct will overwrite the layout info + using temporary storage. */ return build_ivar_chain (interface, 1); } *************** check_methods (chain, list, mtype) *** 5940,5953 **** { if (first) { ! if (TREE_CODE (implementation_context) == CLASS_IMPLEMENTATION_TYPE) warning ("incomplete implementation of class `%s'", ! IDENTIFIER_POINTER (CLASS_NAME (implementation_context))); ! else if (TREE_CODE (implementation_context) == CATEGORY_IMPLEMENTATION_TYPE) warning ("incomplete implementation of category `%s'", ! IDENTIFIER_POINTER (CLASS_SUPER_NAME (implementation_context))); first = 0; } --- 5811,5824 ---- { if (first) { ! 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; } *************** check_methods (chain, list, mtype) *** 5961,5976 **** return first; } static int conforms_to_protocol (class, protocol) tree class; tree protocol; { ! while (protocol) { tree p = CLASS_PROTOCOL_LIST (class); ! ! while (p && TREE_VALUE (p) != TREE_VALUE (protocol)) p = TREE_CHAIN (p); if (!p) --- 5832,5848 ---- return first; } + /* Check if CLASS, or its superclasses, explicitly conforms to PROTOCOL. */ + static int conforms_to_protocol (class, protocol) tree class; tree protocol; { ! if (TREE_CODE (protocol) == PROTOCOL_INTERFACE_TYPE) { tree p = CLASS_PROTOCOL_LIST (class); ! while (p && TREE_VALUE (p) != protocol) p = TREE_CHAIN (p); if (!p) *************** conforms_to_protocol (class, protocol) *** 5982,5989 **** if (!tmp) return 0; } - - protocol = TREE_CHAIN (protocol); } return 1; --- 5854,5859 ---- *************** check_methods_accessible (chain, context *** 6034,6049 **** { if (first) { ! if (TREE_CODE (implementation_context) == CLASS_IMPLEMENTATION_TYPE) warning ("incomplete implementation of class `%s'", IDENTIFIER_POINTER ! (CLASS_NAME (implementation_context))); ! else if (TREE_CODE (implementation_context) == CATEGORY_IMPLEMENTATION_TYPE) warning ("incomplete implementation of category `%s'", IDENTIFIER_POINTER ! (CLASS_SUPER_NAME (implementation_context))); first = 0; } warning ("method definition for `%c%s' not found", --- 5904,5919 ---- { if (first) { ! 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", *************** check_methods_accessible (chain, context *** 6052,6111 **** chain = TREE_CHAIN (chain); /* next method... */ } ! return first; } static void ! check_protocols (proto_list, type, name) ! tree proto_list; const char *type; const char *name; { ! for ( ; proto_list; proto_list = TREE_CHAIN (proto_list)) { ! tree p = TREE_VALUE (proto_list); ! if (TREE_CODE (p) == PROTOCOL_INTERFACE_TYPE) { ! int f1, f2; ! ! /* Ensure that all protocols have bodies. */ ! if (flag_warn_protocol) { ! f1 = check_methods (PROTOCOL_CLS_METHODS (p), ! CLASS_CLS_METHODS (implementation_context), ! '+'); ! f2 = check_methods (PROTOCOL_NST_METHODS (p), ! CLASS_NST_METHODS (implementation_context), ! '-'); ! } else { ! f1 = check_methods_accessible (PROTOCOL_CLS_METHODS (p), ! implementation_context, ! '+'); ! f2 = check_methods_accessible (PROTOCOL_NST_METHODS (p), ! implementation_context, ! '-'); ! } ! ! if (!f1 || !f2) ! warning ("%s `%s' does not fully implement the `%s' protocol", ! type, name, IDENTIFIER_POINTER (PROTOCOL_NAME (p))); ! } else ! { ! ; /* An identifier if we could not find a protocol. */ ! } ! /* Check protocols recursively. */ ! if (PROTOCOL_LIST (p)) { ! tree super_class ! = lookup_interface (CLASS_SUPER_NAME (implementation_template)); ! if (! conforms_to_protocol (super_class, PROTOCOL_LIST (p))) ! check_protocols (PROTOCOL_LIST (p), type, name); } } } /* Make sure that the class CLASS_NAME is defined CODE says which kind of thing CLASS_NAME ought to be. --- 5922,6006 ---- chain = TREE_CHAIN (chain); /* next method... */ } ! return first; } + /* Check whether the current interface (accessible via + 'objc_implementation_context') actually implements protocol P, along + with any protocols that P inherits. */ + static void ! check_protocol (p, type, name) ! tree p; const char *type; const char *name; { ! if (TREE_CODE (p) == PROTOCOL_INTERFACE_TYPE) { ! int f1, f2; ! /* Ensure that all protocols have bodies! */ ! if (flag_warn_protocol) { ! f1 = check_methods (PROTOCOL_CLS_METHODS (p), ! CLASS_CLS_METHODS (objc_implementation_context), ! '+'); ! f2 = check_methods (PROTOCOL_NST_METHODS (p), ! CLASS_NST_METHODS (objc_implementation_context), ! '-'); } else ! { ! f1 = check_methods_accessible (PROTOCOL_CLS_METHODS (p), ! objc_implementation_context, ! '+'); ! f2 = check_methods_accessible (PROTOCOL_NST_METHODS (p), ! objc_implementation_context, ! '-'); ! } ! if (!f1 || !f2) ! warning ("%s `%s' does not fully implement the `%s' protocol", ! type, name, IDENTIFIER_POINTER (PROTOCOL_NAME (p))); ! } ! ! /* Check protocols recursively. */ ! if (PROTOCOL_LIST (p)) ! { ! tree subs = PROTOCOL_LIST (p); ! tree super_class = ! lookup_interface (CLASS_SUPER_NAME (implementation_template)); ! ! while (subs) { ! tree sub = TREE_VALUE (subs); ! ! /* If the superclass does not conform to the protocols ! inherited by P, then we must! */ ! if (!super_class || !conforms_to_protocol (super_class, sub)) ! check_protocol (sub, type, name); ! subs = TREE_CHAIN (subs); } } } + + /* Check whether the current interface (accessible via + 'objc_implementation_context') actually implements the protocols listed + in PROTO_LIST. */ + + static void + check_protocols (proto_list, type, name) + tree proto_list; + const char *type; + const char *name; + { + for ( ; proto_list; proto_list = TREE_CHAIN (proto_list)) + { + tree p = TREE_VALUE (proto_list); + + check_protocol (p, type, name); + } + } /* Make sure that the class CLASS_NAME is defined CODE says which kind of thing CLASS_NAME ought to be. *************** start_class (code, class_name, super_nam *** 6121,6126 **** --- 6016,6029 ---- { tree class, decl; + 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 (5); *************** start_class (code, class_name, super_nam *** 6138,6148 **** if (code == CLASS_IMPLEMENTATION_TYPE) { { - static tree implemented_classes = 0; tree chain; - if (!implemented_classes) - ggc_add_tree_root (&implemented_classes, 1); for (chain = implemented_classes; chain; chain = TREE_CHAIN (chain)) if (TREE_VALUE (chain) == class_name) { --- 6041,6048 ---- *************** start_class (code, class_name, super_nam *** 6168,6182 **** /* Reset for multiple classes per file. */ method_slot = 0; ! implementation_context = class; /* Lookup the interface for this implementation. */ if (!(implementation_template = lookup_interface (class_name))) { ! warning ("Cannot find interface declaration for `%s'", IDENTIFIER_POINTER (class_name)); ! add_class (implementation_template = implementation_context); } /* If a super class has been specified in the implementation, --- 6068,6082 ---- /* Reset for multiple classes per file. */ method_slot = 0; ! objc_implementation_context = class; /* Lookup the interface for this implementation. */ 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); } /* If a super class has been specified in the implementation, *************** start_class (code, class_name, super_nam *** 6186,6192 **** && (super_name != CLASS_SUPER_NAME (implementation_template))) { tree previous_name = CLASS_SUPER_NAME (implementation_template); ! const char *name = previous_name ? IDENTIFIER_POINTER (previous_name) : ""; error ("conflicting super class name `%s'", IDENTIFIER_POINTER (super_name)); --- 6086,6092 ---- && (super_name != CLASS_SUPER_NAME (implementation_template))) { 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)); *************** start_class (code, class_name, super_nam *** 6195,6201 **** else if (! super_name) { ! CLASS_SUPER_NAME (implementation_context) = CLASS_SUPER_NAME (implementation_template); } } --- 6095,6101 ---- else if (! super_name) { ! CLASS_SUPER_NAME (objc_implementation_context) = CLASS_SUPER_NAME (implementation_template); } } *************** start_class (code, class_name, super_nam *** 6223,6229 **** 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); } --- 6123,6129 ---- 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); } *************** start_class (code, class_name, super_nam *** 6251,6257 **** /* Reset for multiple classes per file. */ method_slot = 0; ! implementation_context = class; /* For a category, class_name is really the name of the class that the following set of methods will be associated with. We must --- 6151,6157 ---- /* Reset for multiple classes per file. */ method_slot = 0; ! objc_implementation_context = class; /* For a category, class_name is really the name of the class that the following set of methods will be associated with. We must *************** start_class (code, class_name, super_nam *** 6259,6265 **** if (!(implementation_template = lookup_interface (class_name))) { ! error ("Cannot find interface declaration for `%s'", IDENTIFIER_POINTER (class_name)); exit (FATAL_EXIT_CODE); } --- 6159,6165 ---- if (!(implementation_template = lookup_interface (class_name))) { ! error ("cannot find interface declaration for `%s'", IDENTIFIER_POINTER (class_name)); exit (FATAL_EXIT_CODE); } *************** continue_class (class) *** 6289,6297 **** if (!objc_class_template) build_class_template (); ! if (!(imp_entry ! = (struct imp_entry *) xmalloc (sizeof (struct imp_entry)))) ! perror ("unable to allocate in objc-tree.c"); imp_entry->next = imp_list; imp_entry->imp_context = class; --- 6189,6195 ---- if (!objc_class_template) build_class_template (); ! imp_entry = (struct imp_entry *) xmalloc (sizeof (struct imp_entry)); imp_entry->next = imp_list; imp_entry->imp_context = class; *************** finish_class (class) *** 6341,6358 **** { /* All code generation is done in finish_objc. */ ! if (implementation_template != implementation_context) { /* Ensure that all method listed in the interface contain bodies. */ check_methods (CLASS_CLS_METHODS (implementation_template), ! CLASS_CLS_METHODS (implementation_context), '+'); check_methods (CLASS_NST_METHODS (implementation_template), ! CLASS_NST_METHODS (implementation_context), '-'); if (CLASS_PROTOCOL_LIST (implementation_template)) check_protocols (CLASS_PROTOCOL_LIST (implementation_template), "class", ! IDENTIFIER_POINTER (CLASS_NAME (implementation_context))); } } --- 6239,6256 ---- { /* All code generation is done in finish_objc. */ ! if (implementation_template != objc_implementation_context) { /* Ensure that all method listed in the interface contain bodies. */ check_methods (CLASS_CLS_METHODS (implementation_template), ! CLASS_CLS_METHODS (objc_implementation_context), '+'); check_methods (CLASS_NST_METHODS (implementation_template), ! CLASS_NST_METHODS (objc_implementation_context), '-'); if (CLASS_PROTOCOL_LIST (implementation_template)) check_protocols (CLASS_PROTOCOL_LIST (implementation_template), "class", ! IDENTIFIER_POINTER (CLASS_NAME (objc_implementation_context))); } } *************** finish_class (class) *** 6372,6385 **** { /* Ensure all method listed in the interface contain bodies. */ check_methods (CLASS_CLS_METHODS (category), ! CLASS_CLS_METHODS (implementation_context), '+'); check_methods (CLASS_NST_METHODS (category), ! CLASS_NST_METHODS (implementation_context), '-'); if (CLASS_PROTOCOL_LIST (category)) check_protocols (CLASS_PROTOCOL_LIST (category), "category", ! IDENTIFIER_POINTER (CLASS_SUPER_NAME (implementation_context))); } } --- 6270,6283 ---- { /* Ensure all method listed in the interface contain bodies. */ check_methods (CLASS_CLS_METHODS (category), ! CLASS_CLS_METHODS (objc_implementation_context), '+'); check_methods (CLASS_NST_METHODS (category), ! CLASS_NST_METHODS (objc_implementation_context), '-'); if (CLASS_PROTOCOL_LIST (category)) check_protocols (CLASS_PROTOCOL_LIST (category), "category", ! IDENTIFIER_POINTER (CLASS_SUPER_NAME (objc_implementation_context))); } } *************** lookup_protocol (ident) *** 6417,6430 **** tree chain; for (chain = protocol_chain; chain; chain = TREE_CHAIN (chain)) ! { ! if (ident == PROTOCOL_NAME (chain)) ! return chain; ! } return NULL_TREE; } tree start_protocol (code, name, list) enum tree_code code; --- 6315,6353 ---- tree chain; for (chain = protocol_chain; chain; chain = TREE_CHAIN (chain)) ! if (ident == PROTOCOL_NAME (chain)) ! return chain; return NULL_TREE; } + /* This function forward declares the protocols named by NAMES. If + they are already declared or defined, the function has no effect. */ + + void + objc_declare_protocols (names) + tree names; + { + tree list; + + for (list = names; list; list = TREE_CHAIN (list)) + { + tree name = TREE_VALUE (list); + + if (lookup_protocol (name) == NULL_TREE) + { + 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); + PROTOCOL_DEFINED (protocol) = 0; + PROTOCOL_FORWARD_DECL (protocol) = NULL_TREE; + } + } + } + tree start_protocol (code, name, list) enum tree_code code; *************** start_protocol (code, name, list) *** 6433,6464 **** { tree protocol; ! /* 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 = make_node (code); ! TYPE_BINFO (protocol) = make_tree_vec (2); ! ! PROTOCOL_NAME (protocol) = name; ! PROTOCOL_LIST (protocol) = list; ! lookup_and_install_protocols (list); ! if (lookup_protocol (name)) ! warning ("duplicate declaration for protocol `%s'", ! IDENTIFIER_POINTER (name)); ! else ! add_protocol (protocol); ! PROTOCOL_FORWARD_DECL (protocol) = NULL_TREE; return protocol; } void finish_protocol (protocol) ! tree protocol ATTRIBUTE_UNUSED; { } --- 6356,6399 ---- { tree protocol; ! /* 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); ! add_protocol (protocol); ! PROTOCOL_DEFINED (protocol) = 1; ! PROTOCOL_FORWARD_DECL (protocol) = NULL_TREE; ! check_protocol_recursively (protocol, list); ! } ! else if (! PROTOCOL_DEFINED (protocol)) ! { ! PROTOCOL_DEFINED (protocol) = 1; ! PROTOCOL_LIST (protocol) = lookup_and_install_protocols (list); + check_protocol_recursively (protocol, list); + } + else + { + warning ("duplicate declaration for protocol `%s'", + IDENTIFIER_POINTER (name)); + } return protocol; } void finish_protocol (protocol) ! tree protocol ATTRIBUTE_UNUSED; { } *************** encode_pointer (type, curtype, format) *** 6534,6546 **** obstack_1grow (&util_obstack, '#'); return; } - #ifndef OBJC_INT_SELECTORS else if (strcmp (name, TAG_SELECTOR) == 0) /* ':' */ { obstack_1grow (&util_obstack, ':'); return; } - #endif /* OBJC_INT_SELECTORS */ } } else if (TREE_CODE (pointer_to) == INTEGER_TYPE --- 6469,6479 ---- *************** encode_aggregate_within (type, curtype, *** 6592,6608 **** int left; int right; { if (obstack_object_size (&util_obstack) > 0 && *(obstack_next_free (&util_obstack) - 1) == '^') { tree name = TYPE_NAME (type); ! /* we have a reference; this is a NeXT extension. */ if (obstack_object_size (&util_obstack) - curtype == 1 && format == OBJC_ENCODE_INLINE_DEFS) { ! /* Output format of struct for first level only. */ tree fields = TYPE_FIELDS (type); if (name && TREE_CODE (name) == IDENTIFIER_NODE) --- 6525,6546 ---- int left; int right; { + /* The RECORD_TYPE may in fact be a typedef! For purposes + of encoding, we need the real underlying enchilada. */ + if (TYPE_MAIN_VARIANT (type)) + type = TYPE_MAIN_VARIANT (type); + if (obstack_object_size (&util_obstack) > 0 && *(obstack_next_free (&util_obstack) - 1) == '^') { tree name = TYPE_NAME (type); ! /* we have a reference; this is a NeXT extension. */ if (obstack_object_size (&util_obstack) - curtype == 1 && format == OBJC_ENCODE_INLINE_DEFS) { ! /* Output format of struct for first level only. */ tree fields = TYPE_FIELDS (type); if (name && TREE_CODE (name) == IDENTIFIER_NODE) *************** encode_aggregate_within (type, curtype, *** 6636,6642 **** else { ! /* We have an untagged structure or a typedef. */ obstack_1grow (&util_obstack, left); obstack_1grow (&util_obstack, '?'); obstack_1grow (&util_obstack, right); --- 6574,6580 ---- else { ! /* We have an untagged structure or a typedef. */ obstack_1grow (&util_obstack, left); obstack_1grow (&util_obstack, '?'); obstack_1grow (&util_obstack, right); *************** encode_aggregate_within (type, curtype, *** 6692,6698 **** IDENTIFIER_POINTER (name), strlen (IDENTIFIER_POINTER (name))); else ! /* We have an untagged structure or a typedef. */ obstack_1grow (&util_obstack, '?'); obstack_1grow (&util_obstack, right); --- 6630,6636 ---- IDENTIFIER_POINTER (name), strlen (IDENTIFIER_POINTER (name))); else ! /* We have an untagged structure or a typedef. */ obstack_1grow (&util_obstack, '?'); obstack_1grow (&util_obstack, right); *************** encode_complete_bitfield (int position, *** 6874,6880 **** charType = 'q'; } } ! else abort (); --- 6812,6819 ---- charType = 'q'; } } ! else if (code == ENUMERAL_TYPE) ! charType = 'i'; else abort (); *************** expr_last (complex_expr) *** 6926,6944 **** return complex_expr; } - /* The selector of the current method, - or NULL if we aren't compiling a method. */ - - tree - maybe_objc_method_name (decl) - tree decl ATTRIBUTE_UNUSED; - { - if (method_context) - return METHOD_SEL_NAME (method_context); - else - return 0; - } - /* Transform a method definition into a function definition as follows: - synthesize the first two arguments, "self" and "_cmd". */ --- 6865,6870 ---- *************** start_method_def (method) *** 6949,6955 **** tree decl_specs; /* Required to implement _msgSuper. */ ! method_context = method; UOBJC_SUPER_decl = NULL_TREE; /* Must be called BEFORE start_function. */ --- 6875,6881 ---- tree decl_specs; /* Required to implement _msgSuper. */ ! objc_method_context = method; UOBJC_SUPER_decl = NULL_TREE; /* Must be called BEFORE start_function. */ *************** start_method_def (method) *** 6957,6963 **** /* Generate prototype declarations for arguments..."new-style". */ ! if (TREE_CODE (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 --- 6883,6889 ---- /* Generate prototype declarations for arguments..."new-style". */ ! if (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 *************** start_method_def (method) *** 6967,6988 **** push_parm_decl (build_tree_list (build_tree_list (decl_specs, build1 (INDIRECT_REF, NULL_TREE, self_id)), ! build_tree_list (unused_list, NULL_TREE))); - #ifdef OBJC_INT_SELECTORS - decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_UNSIGNED]); - decl_specs = tree_cons (NULL_TREE, ridpointers[(int) RID_INT], decl_specs); - push_parm_decl (build_tree_list (build_tree_list (decl_specs, ucmd_id), - build_tree_list (unused_list, NULL_TREE))); - #else /* not OBJC_INT_SELECTORS */ 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)), ! build_tree_list (unused_list, NULL_TREE))); ! #endif /* not OBJC_INT_SELECTORS */ /* Generate argument declarations if a keyword_decl. */ if (METHOD_SEL_ARGS (method)) --- 6893,6907 ---- 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)); /* Generate argument declarations if a keyword_decl. */ if (METHOD_SEL_ARGS (method)) *************** start_method_def (method) *** 7001,7007 **** TREE_OPERAND (last_expr, 0) = KEYWORD_ARG_NAME (arglist); push_parm_decl (build_tree_list (build_tree_list (arg_spec, arg_decl), ! build_tree_list (NULL_TREE, NULL_TREE))); /* Unhook: restore the abstract declarator. */ TREE_OPERAND (last_expr, 0) = NULL_TREE; --- 6920,6926 ---- TREE_OPERAND (last_expr, 0) = KEYWORD_ARG_NAME (arglist); push_parm_decl (build_tree_list (build_tree_list (arg_spec, arg_decl), ! NULL_TREE)); /* Unhook: restore the abstract declarator. */ TREE_OPERAND (last_expr, 0) = NULL_TREE; *************** start_method_def (method) *** 7011,7017 **** push_parm_decl (build_tree_list (build_tree_list (arg_spec, KEYWORD_ARG_NAME (arglist)), ! build_tree_list (NULL_TREE, NULL_TREE))); arglist = TREE_CHAIN (arglist); } --- 6930,6936 ---- push_parm_decl (build_tree_list (build_tree_list (arg_spec, KEYWORD_ARG_NAME (arglist)), ! NULL_TREE)); arglist = TREE_CHAIN (arglist); } *************** warn_with_method (message, mtype, method *** 7045,7055 **** report_error_function (DECL_SOURCE_FILE (method)); ! fprintf (stderr, "%s:%d: warning: ", ! DECL_SOURCE_FILE (method), DECL_SOURCE_LINE (method)); ! memset (errbuf, 0, BUFSIZE); ! fprintf (stderr, "%s `%c%s'\n", ! message, mtype, gen_method_decl (method, errbuf)); } /* Return 1 if METHOD is consistent with PROTO. */ --- 6964,6975 ---- report_error_function (DECL_SOURCE_FILE (method)); ! /* Add a readable method name to the warning. */ ! warning_with_file_and_line (DECL_SOURCE_FILE (method), ! DECL_SOURCE_LINE (method), ! "%s `%c%s'", ! message, mtype, ! gen_method_decl (method, errbuf)); } /* Return 1 if METHOD is consistent with PROTO. */ *************** static int *** 7058,7079 **** comp_method_with_proto (method, proto) tree method, proto; { ! static tree function_type = 0; ! ! /* Create a function_type node once. */ ! if (!function_type) ! { ! function_type = make_node (FUNCTION_TYPE); ! ggc_add_tree_root (&function_type, 1); ! } /* Install argument types - normally set by build_function_type. */ ! TYPE_ARG_TYPES (function_type) = get_arg_type_list (proto, METHOD_DEF, 0); /* install return type */ ! TREE_TYPE (function_type) = groktypename (TREE_TYPE (proto)); ! return comptypes (TREE_TYPE (METHOD_DEFINITION (method)), function_type); } /* Return 1 if PROTO1 is consistent with PROTO2. */ --- 6978,6994 ---- comp_method_with_proto (method, proto) tree method, 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); } /* Return 1 if PROTO1 is consistent with PROTO2. */ *************** static int *** 7082,7106 **** comp_proto_with_proto (proto0, proto1) tree proto0, proto1; { ! static tree function_type[2]; ! ! /* Create a couple function_type node's once. */ ! if (!function_type[0]) ! { ! function_type[0] = make_node (FUNCTION_TYPE); ! function_type[1] = make_node (FUNCTION_TYPE); ! ggc_add_tree_root (function_type, 2); ! } /* Install argument types; normally set by build_function_type. */ ! TYPE_ARG_TYPES (function_type[0]) = get_arg_type_list (proto0, METHOD_REF, 0); ! TYPE_ARG_TYPES (function_type[1]) = get_arg_type_list (proto1, METHOD_REF, 0); /* Install return type. */ ! TREE_TYPE (function_type[0]) = groktypename (TREE_TYPE (proto0)); ! TREE_TYPE (function_type[1]) = groktypename (TREE_TYPE (proto1)); ! return comptypes (function_type[0], function_type[1]); } /* - Generate an identifier for the function. the format is "_n_cls", --- 6997,7017 ---- comp_proto_with_proto (proto0, proto1) tree proto0, proto1; { ! /* Create a couple of function_template nodes at most once. */ ! if (!function1_template) ! function1_template = make_node (FUNCTION_TYPE); ! if (!function2_template) ! function2_template = make_node (FUNCTION_TYPE); /* Install argument types; normally set by build_function_type. */ ! TYPE_ARG_TYPES (function1_template) = get_arg_type_list (proto0, METHOD_REF, 0); ! TYPE_ARG_TYPES (function2_template) = get_arg_type_list (proto1, METHOD_REF, 0); /* Install return type. */ ! TREE_TYPE (function1_template) = groktypename (TREE_TYPE (proto0)); ! TREE_TYPE (function2_template) = groktypename (TREE_TYPE (proto1)); ! return comptypes (function1_template, function2_template); } /* - Generate an identifier for the function. the format is "_n_cls", *************** really_start_method (method, parmlist) *** 7124,7134 **** decl_specs = chainon (sc_spec, ret_spec); sel_name = IDENTIFIER_POINTER (METHOD_SEL_NAME (method)); ! class_name = IDENTIFIER_POINTER (CLASS_NAME (implementation_context)); ! cat_name = ((TREE_CODE (implementation_context) == CLASS_IMPLEMENTATION_TYPE) ? NULL ! : IDENTIFIER_POINTER (CLASS_SUPER_NAME (implementation_context))); method_slot++; /* Make sure this is big enough for any plausible method label. */ --- 7035,7045 ---- decl_specs = chainon (sc_spec, ret_spec); sel_name = IDENTIFIER_POINTER (METHOD_SEL_NAME (method)); ! class_name = IDENTIFIER_POINTER (CLASS_NAME (objc_implementation_context)); ! cat_name = ((TREE_CODE (objc_implementation_context) == CLASS_IMPLEMENTATION_TYPE) ? NULL ! : IDENTIFIER_POINTER (CLASS_SUPER_NAME (objc_implementation_context))); method_slot++; /* Make sure this is big enough for any plausible method label. */ *************** really_start_method (method, parmlist) *** 7153,7159 **** method_decl = ret_decl; /* Fool the parser into thinking it is starting a function. */ ! start_function (decl_specs, method_decl, NULL_TREE, NULL_TREE); /* Unhook: this has the effect of restoring the abstract declarator. */ TREE_OPERAND (save_expr, 0) = NULL_TREE; --- 7064,7070 ---- 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; *************** really_start_method (method, parmlist) *** 7164,7170 **** 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, NULL_TREE); /* Unhook: this has the effect of restoring the abstract declarator. */ TREE_VALUE (TREE_TYPE (method)) = NULL_TREE; --- 7075,7081 ---- 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; *************** really_start_method (method, parmlist) *** 7172,7178 **** METHOD_DEFINITION (method) = current_function_decl; ! if (implementation_template != implementation_context) { tree proto; --- 7083,7091 ---- METHOD_DEFINITION (method) = current_function_decl; ! /* Check consistency...start_function, pushdecl, duplicate_decls. */ ! ! if (implementation_template != objc_implementation_context) { tree proto; *************** continue_method_def () *** 7203,7209 **** { tree parmlist; ! if (METHOD_ADD_ARGS (method_context) == objc_ellipsis_node) /* We have a `, ...' immediately following the selector. */ parmlist = get_parm_info (0); else --- 7116,7122 ---- { 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 *************** continue_method_def () *** 7214,7220 **** self_decl = TREE_PURPOSE (parmlist); poplevel (0, 0, 0); ! really_start_method (method_context, parmlist); store_parm_decls (); } --- 7127,7133 ---- self_decl = TREE_PURPOSE (parmlist); poplevel (0, 0, 0); ! really_start_method (objc_method_context, parmlist); store_parm_decls (); } *************** add_objc_decls () *** 7228,7234 **** UOBJC_SUPER_decl = start_decl (get_identifier (UTAG_SUPER), build_tree_list (NULL_TREE, objc_super_template), ! 0, NULL_TREE, NULL_TREE); finish_decl (UOBJC_SUPER_decl, NULL_TREE, NULL_TREE); --- 7141,7147 ---- UOBJC_SUPER_decl = start_decl (get_identifier (UTAG_SUPER), build_tree_list (NULL_TREE, objc_super_template), ! 0, NULL_TREE); finish_decl (UOBJC_SUPER_decl, NULL_TREE, NULL_TREE); *************** add_objc_decls () *** 7247,7253 **** tree get_super_receiver () { ! if (method_context) { tree super_expr, super_expr_list; --- 7160,7166 ---- tree get_super_receiver () { ! if (objc_method_context) { tree super_expr, super_expr_list; *************** get_super_receiver () *** 7260,7272 **** super_expr = build_component_ref (UOBJC_SUPER_decl, get_identifier ("class")); ! if (TREE_CODE (implementation_context) == CLASS_IMPLEMENTATION_TYPE) { /* [_cls, __cls]Super are "pre-built" in synth_forward_declarations. */ super_expr = build_modify_expr (super_expr, NOP_EXPR, ! ((TREE_CODE (method_context) == INSTANCE_METHOD_DECL) ? ucls_super_ref : uucls_super_ref)); --- 7173,7185 ---- super_expr = build_component_ref (UOBJC_SUPER_decl, get_identifier ("class")); ! if (TREE_CODE (objc_implementation_context) == CLASS_IMPLEMENTATION_TYPE) { /* [_cls, __cls]Super are "pre-built" in synth_forward_declarations. */ super_expr = build_modify_expr (super_expr, NOP_EXPR, ! ((TREE_CODE (objc_method_context) == INSTANCE_METHOD_DECL) ? ucls_super_ref : uucls_super_ref)); *************** get_super_receiver () *** 7278,7283 **** --- 7191,7197 ---- tree super_name = CLASS_SUPER_NAME (implementation_template); tree super_class; + /* Barf if super used in a category of Object. */ if (!super_name) { error ("no super class declared in interface for `%s'", *************** get_super_receiver () *** 7288,7294 **** if (flag_next_runtime) { super_class = get_class_reference (super_name); ! if (TREE_CODE (method_context) == CLASS_METHOD_DECL) super_class = build_component_ref (build_indirect_ref (super_class, "->"), get_identifier ("isa")); --- 7202,7208 ---- if (flag_next_runtime) { super_class = get_class_reference (super_name); ! if (TREE_CODE (objc_method_context) == CLASS_METHOD_DECL) super_class = build_component_ref (build_indirect_ref (super_class, "->"), get_identifier ("isa")); *************** get_super_receiver () *** 7296,7302 **** else { add_class_reference (super_name); ! super_class = (TREE_CODE (method_context) == INSTANCE_METHOD_DECL ? objc_get_class_decl : objc_get_meta_class_decl); assemble_external (super_class); super_class --- 7210,7216 ---- else { add_class_reference (super_name); ! super_class = (TREE_CODE (objc_method_context) == INSTANCE_METHOD_DECL ? objc_get_class_decl : objc_get_meta_class_decl); assemble_external (super_class); super_class *************** encode_method_def (func_decl) *** 7376,7381 **** --- 7290,7296 ---- obstack_grow (&util_obstack, buffer, strlen (buffer)); } + /* Null terminate string. */ obstack_1grow (&util_obstack, 0); result = get_identifier (obstack_finish (&util_obstack)); obstack_free (&util_obstack, util_firstobj); *************** encode_method_def (func_decl) *** 7385,7403 **** static void objc_expand_function_end () { ! METHOD_ENCODING (method_context) = encode_method_def (current_function_decl); } void finish_method_def () { lang_expand_function_end = objc_expand_function_end; ! finish_function (0); 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. */ ! method_context = NULL_TREE; } #if 0 --- 7300,7318 ---- static void objc_expand_function_end () { ! METHOD_ENCODING (objc_method_context) = encode_method_def (current_function_decl); } void finish_method_def () { lang_expand_function_end = objc_expand_function_end; ! finish_function (0, 1); 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. */ ! objc_method_context = NULL_TREE; } #if 0 *************** int *** 7405,7414 **** lang_report_error_function (decl) tree decl; { ! if (method_context) { fprintf (stderr, "In method `%s'\n", ! IDENTIFIER_POINTER (METHOD_SEL_NAME (method_context))); return 1; } --- 7320,7329 ---- lang_report_error_function (decl) tree decl; { ! if (objc_method_context) { fprintf (stderr, "In method `%s'\n", ! IDENTIFIER_POINTER (METHOD_SEL_NAME (objc_method_context))); return 1; } *************** adorn_decl (decl, str) *** 7469,7475 **** strcat (str, "("); while (chain) { ! gen_declaration (chain, str); chain = TREE_CHAIN (chain); if (chain) strcat (str, ", "); --- 7384,7390 ---- strcat (str, "("); while (chain) { ! gen_declaration_1 (chain, str); chain = TREE_CHAIN (chain); if (chain) strcat (str, ", "); *************** adorn_decl (decl, str) *** 7484,7490 **** strcat (str, "("); while (chain && TREE_VALUE (chain) != void_type_node) { ! gen_declaration (TREE_VALUE (chain), str); chain = TREE_CHAIN (chain); if (chain && TREE_VALUE (chain) != void_type_node) strcat (str, ", "); --- 7399,7405 ---- 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, ", "); *************** gen_declspecs (declspecs, buf, raw) *** 7782,7788 **** strcat (buf, "long double "); break; ! case RECORD_TYPE: if (TYPE_NAME (declspecs) && TREE_CODE (TYPE_NAME (declspecs)) == IDENTIFIER_NODE) { --- 7697,7703 ---- strcat (buf, "long double "); break; ! case RECORD_TYPE: if (TYPE_NAME (declspecs) && TREE_CODE (TYPE_NAME (declspecs)) == IDENTIFIER_NODE) { *************** gen_declspecs (declspecs, buf, raw) *** 7877,7887 **** --- 7792,7818 ---- } } + /* Given a tree node, produce a printable description of it in the given + buffer, overwriting the buffer. */ + static char * gen_declaration (atype_or_adecl, buf) 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 (atype_or_adecl, buf) + tree atype_or_adecl; + char *buf; + { char declbuf[256]; if (TREE_CODE (atype_or_adecl) == TREE_LIST) *************** gen_declaration (atype_or_adecl, buf) *** 7939,7945 **** || TREE_CODE (atype_or_adecl) == PARM_DECL || TREE_CODE (atype_or_adecl) == FUNCTION_DECL) { ! const char *decl_name = (DECL_NAME (atype_or_adecl) ? IDENTIFIER_POINTER (DECL_NAME (atype_or_adecl)) : ""); --- 7870,7876 ---- || 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)) : ""); *************** gen_declaration (atype_or_adecl, buf) *** 7961,7972 **** strcat (buf, gen_declarator (declarator, declbuf, "")); } } - - return buf; } #define RAW_TYPESPEC(meth) (TREE_VALUE (TREE_PURPOSE (TREE_TYPE (meth)))) static char * gen_method_decl (method, buf) tree method; --- 7892,7904 ---- 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 (method, buf) tree method; *************** gen_method_decl (method, buf) *** 7974,7983 **** { tree chain; if (RAW_TYPESPEC (method) != objc_object_reference) { ! strcpy (buf, "("); ! gen_declaration (TREE_TYPE (method), buf); strcat (buf, ")"); } --- 7906,7916 ---- { tree chain; + buf[0] = '\0'; if (RAW_TYPESPEC (method) != objc_object_reference) { ! strcat (buf, "("); ! gen_declaration_1 (TREE_TYPE (method), buf); strcat (buf, ")"); } *************** gen_method_decl (method, buf) *** 7994,8000 **** if (RAW_TYPESPEC (chain) != objc_object_reference) { strcat (buf, "("); ! gen_declaration (TREE_TYPE (chain), buf); strcat (buf, ")"); } --- 7927,7933 ---- if (RAW_TYPESPEC (chain) != objc_object_reference) { strcat (buf, "("); ! gen_declaration_1 (TREE_TYPE (chain), buf); strcat (buf, ")"); } *************** gen_method_decl (method, buf) *** 8015,8021 **** while (chain) { strcat (buf, ", "); ! gen_declaration (chain, buf); chain = TREE_CHAIN (chain); } } --- 7948,7954 ---- while (chain) { strcat (buf, ", "); ! gen_declaration_1 (chain, buf); chain = TREE_CHAIN (chain); } } *************** dump_interface (fp, chain) *** 8035,8041 **** FILE *fp; tree chain; { ! char *buf = (char *)xmalloc (256); const char *my_name = IDENTIFIER_POINTER (CLASS_NAME (chain)); tree ivar_decls = CLASS_RAW_IVARS (chain); tree nst_methods = CLASS_NST_METHODS (chain); --- 7968,7974 ---- FILE *fp; tree chain; { ! char *buf = (char *) xmalloc (256); const char *my_name = IDENTIFIER_POINTER (CLASS_NAME (chain)); tree ivar_decls = CLASS_RAW_IVARS (chain); tree nst_methods = CLASS_NST_METHODS (chain); *************** dump_interface (fp, chain) *** 8056,8062 **** fprintf (fp, "{\n"); do { - memset (buf, 0, 256); fprintf (fp, "\t%s;\n", gen_declaration (ivar_decls, buf)); ivar_decls = TREE_CHAIN (ivar_decls); } --- 7989,7994 ---- *************** dump_interface (fp, chain) *** 8066,8079 **** while (nst_methods) { - memset (buf, 0, 256); fprintf (fp, "- %s;\n", gen_method_decl (nst_methods, buf)); nst_methods = TREE_CHAIN (nst_methods); } while (cls_methods) { - memset (buf, 0, 256); fprintf (fp, "+ %s;\n", gen_method_decl (cls_methods, buf)); cls_methods = TREE_CHAIN (cls_methods); } --- 7998,8009 ---- *************** objc_printable_name (decl, kind) *** 8145,8181 **** return objc_demangle (IDENTIFIER_POINTER (DECL_NAME (decl))); } static void ! init_objc () { ! /* Add the special tree codes of Objective C to the tables. */ ! #define LAST_CODE LAST_C_TREE_CODE gcc_obstack_init (&util_obstack); util_firstobj = (char *) obstack_finish (&util_obstack); ! memcpy (tree_code_type + (int) LAST_CODE, ! objc_tree_code_type, ! (int) LAST_OBJC_TREE_CODE - (int) LAST_CODE); ! memcpy (tree_code_length + (int) LAST_CODE, ! objc_tree_code_length, ! (((int) LAST_OBJC_TREE_CODE - (int) LAST_CODE) * sizeof (int))); ! memcpy (tree_code_name + (int) LAST_CODE, ! objc_tree_code_name, ! (((int) LAST_OBJC_TREE_CODE - (int) LAST_CODE) * sizeof (char *))); ! ! errbuf = (char *)xmalloc (BUFSIZE); hash_init (); synth_module_prologue (); - - /* Change the default error function */ - save_lang_status = &push_c_function_context; - restore_lang_status = &pop_c_function_context; - mark_lang_status = &mark_c_function_context; - decl_printable_name = objc_printable_name; - lang_expand_expr = c_expand_expr; - lang_expand_decl_stmt = c_expand_decl_stmt; } static void --- 8075,8105 ---- return objc_demangle (IDENTIFIER_POINTER (DECL_NAME (decl))); } + /* Adds the tree codes specific to the ObjC/ObjC++ front end to the + list of all tree codes. */ + static void ! add_objc_tree_codes () { ! int add = (int) LAST_OBJC_TREE_CODE - (int) LAST_BASE_TREE_CODE; ! memcpy (tree_code_type + (int) LAST_BASE_TREE_CODE, ! objc_tree_code_type, add); ! memcpy (tree_code_length + (int) LAST_BASE_TREE_CODE, ! objc_tree_code_length, add * sizeof (int)); ! memcpy (tree_code_name + (int) LAST_BASE_TREE_CODE, ! objc_tree_code_name, add * sizeof (char *)); ! } + static void + init_objc () + { gcc_obstack_init (&util_obstack); util_firstobj = (char *) obstack_finish (&util_obstack); ! errbuf = (char *) xmalloc (BUFSIZE); hash_init (); synth_module_prologue (); } static void *************** finish_objc () *** 8188,8193 **** --- 8112,8126 ---- int save_warn_missing_braces = warn_missing_braces; warn_missing_braces = 0; + /* 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 (); #ifdef OBJC_PROLOGUE *************** finish_objc () *** 8195,8217 **** #endif /* Process the static instances here because initialization of objc_symtab ! depends on them. */ if (objc_static_instances) generate_static_references (); ! if (implementation_context || class_names_chain || meth_var_names_chain || meth_var_types_chain || sel_ref_chain) generate_objc_symtab_decl (); for (impent = imp_list; impent; impent = impent->next) { ! implementation_context = impent->imp_context; implementation_template = impent->imp_template; UOBJC_CLASS_decl = impent->class_decl; UOBJC_METACLASS_decl = impent->meta_decl; ! if (TREE_CODE (implementation_context) == CLASS_IMPLEMENTATION_TYPE) { /* all of the following reference the string pool... */ generate_ivar_lists (); --- 8128,8150 ---- #endif /* Process the static instances here because initialization of objc_symtab ! depends on them. */ if (objc_static_instances) generate_static_references (); ! if (imp_list || class_names_chain || meth_var_names_chain || meth_var_types_chain || sel_ref_chain) generate_objc_symtab_decl (); for (impent = imp_list; impent; impent = impent->next) { ! objc_implementation_context = impent->imp_context; implementation_template = impent->imp_template; UOBJC_CLASS_decl = impent->class_decl; UOBJC_METACLASS_decl = impent->meta_decl; ! if (TREE_CODE (objc_implementation_context) == CLASS_IMPLEMENTATION_TYPE) { /* all of the following reference the string pool... */ generate_ivar_lists (); *************** finish_objc () *** 8221,8227 **** else { generate_dispatch_tables (); ! generate_category (implementation_context); } } --- 8154,8160 ---- else { generate_dispatch_tables (); ! generate_category (objc_implementation_context); } } *************** finish_objc () *** 8233,8245 **** if (protocol_chain) generate_protocols (); ! if (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. */ ! const char *init_name = build_module_descriptor (); ! if (init_name) ! assemble_constructor (init_name); } /* Dump the class references. This forces the appropriate classes --- 8166,8178 ---- if (protocol_chain) generate_protocols (); ! 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 *************** finish_objc () *** 8263,8270 **** if (flag_gen_declaration) { ! add_class (implementation_context); ! dump_interface (gen_declaration_file, implementation_context); } if (warn_selector) --- 8196,8203 ---- if (flag_gen_declaration) { ! add_class (objc_implementation_context); ! dump_interface (gen_declaration_file, objc_implementation_context); } if (warn_selector) *************** finish_objc () *** 8315,8321 **** static void generate_classref_translation_entry (chain) ! tree chain; { tree expr, name, decl_specs, decl, sc_spec; tree type; --- 8248,8254 ---- static void generate_classref_translation_entry (chain) ! tree chain; { tree expr, name, decl_specs, decl, sc_spec; tree type; *************** generate_classref_translation_entry (cha *** 8334,8340 **** /* 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, NULL_TREE); DECL_CONTEXT (decl) = NULL_TREE; finish_decl (decl, expr, NULL_TREE); return; --- 8267,8273 ---- /* 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; *************** handle_class_ref (chain) *** 8345,8546 **** tree chain; { const char *name = IDENTIFIER_POINTER (TREE_VALUE (chain)); ! if (! flag_next_runtime) ! { ! tree decl; ! char *string = (char *) alloca (strlen (name) + 30); ! tree exp; ! ! sprintf (string, "%sobjc_class_name_%s", ! (flag_next_runtime ? "." : "__"), name); ! ! /* Make a decl for this name, so we can use its address in a tree. */ ! decl = build_decl (VAR_DECL, get_identifier (string), char_type_node); ! DECL_EXTERNAL (decl) = 1; ! TREE_PUBLIC (decl) = 1; ! pushdecl (decl); ! rest_of_decl_compilation (decl, 0, 0, 0); ! /* Put the decl in the variable section. It may need relocation. */ ! variable_section (decl, 1); ! exp = build1 (ADDR_EXPR, string_type_node, decl); ! /* Align the section properly. */ ! assemble_constant_align (exp); ! /* Inform the assembler about this new external thing. */ ! assemble_external (decl); ! /* Output a constant to reference this address. */ ! output_constant (exp, int_size_in_bytes (string_type_node)); ! } ! else ! { ! /* This overreliance on our assembler (i.e. lack of portability) ! should be dealt with at some point. The GNU strategy (above) ! won't work either, but it is a start. */ ! char *string = (char *) alloca (strlen (name) + 30); ! sprintf (string, ".reference .objc_class_name_%s", name); ! assemble_asm (my_build_string (strlen (string) + 1, string)); ! } } static void handle_impent (impent) struct imp_entry *impent; { ! implementation_context = impent->imp_context; implementation_template = impent->imp_template; if (TREE_CODE (impent->imp_context) == CLASS_IMPLEMENTATION_TYPE) { ! const char *class_name = IDENTIFIER_POINTER (CLASS_NAME (impent->imp_context)); - char *string = (char *) alloca (strlen (class_name) + 30); - - if (flag_next_runtime) - { - /* Grossly unportable. - People should know better than to assume - such things about assembler syntax! */ - sprintf (string, ".objc_class_name_%s=0", class_name); - assemble_asm (my_build_string (strlen (string) + 1, string)); ! sprintf (string, ".globl .objc_class_name_%s", class_name); ! assemble_asm (my_build_string (strlen (string) + 1, string)); ! } ! else ! { ! sprintf (string, "%sobjc_class_name_%s", ! (flag_next_runtime ? "." : "__"), class_name); ! readonly_data_section (); ! assemble_global (string); ! assemble_label (string); ! } } - else if (TREE_CODE (impent->imp_context) == CATEGORY_IMPLEMENTATION_TYPE) { ! const char *class_name = IDENTIFIER_POINTER (CLASS_NAME (impent->imp_context)); ! const char *class_super_name = ! IDENTIFIER_POINTER (CLASS_SUPER_NAME (impent->imp_context)); ! char *string = (char *) alloca (strlen (class_name) ! + strlen (class_super_name) + 30); ! ! /* Do the same for categories. Even though no references to these ! symbols are generated automatically by the compiler, it gives ! you a handle to pull them into an archive by hand. */ ! if (flag_next_runtime) ! { ! /* Grossly unportable. */ ! sprintf (string, ".objc_category_name_%s_%s=0", ! class_name, class_super_name); ! assemble_asm (my_build_string (strlen (string) + 1, string)); ! sprintf (string, ".globl .objc_category_name_%s_%s", ! class_name, class_super_name); ! assemble_asm (my_build_string (strlen (string) + 1, string)); ! } ! else ! { ! sprintf (string, "%sobjc_category_name_%s_%s", ! (flag_next_runtime ? "." : "__"), ! class_name, class_super_name); ! readonly_data_section (); ! assemble_global (string); ! assemble_label (string); ! } } ! } ! ! #ifdef DEBUG ! ! static void ! objc_debug (fp) ! FILE *fp; ! { ! char *buf = (char *)xmalloc (256); ! ! { /* dump function prototypes */ ! tree loop = UOBJC_MODULES_decl; ! ! fprintf (fp, "\n\nfunction prototypes:\n"); ! while (loop) ! { ! if (TREE_CODE (loop) == FUNCTION_DECL && DECL_INITIAL (loop)) ! { ! /* We have a function definition: generate prototype. */ ! memset (errbuf, 0, BUFSIZE); ! gen_declaration (loop, errbuf); ! fprintf (fp, "%s;\n", errbuf); ! } ! loop = TREE_CHAIN (loop); ! } ! } ! { ! /* Dump global chains. */ ! tree loop; ! int i, index = 0, offset = 0; ! hash hashlist; ! ! for (i = 0; i < SIZEHASHTABLE; i++) ! { ! if (hashlist = nst_method_hash_list[i]) ! { ! fprintf (fp, "\n\nnst_method_hash_list[%d]:\n", i); ! do ! { ! memset (buf, 0, 256); ! fprintf (fp, "-%s;\n", gen_method_decl (hashlist->key, buf)); ! hashlist = hashlist->next; ! } ! while (hashlist); ! } ! } ! ! for (i = 0; i < SIZEHASHTABLE; i++) ! { ! if (hashlist = cls_method_hash_list[i]) ! { ! fprintf (fp, "\n\ncls_method_hash_list[%d]:\n", i); ! do ! { ! memset (buf, 0, 256); ! fprintf (fp, "-%s;\n", gen_method_decl (hashlist->key, buf)); ! hashlist = hashlist->next; ! } ! while (hashlist); ! } ! } ! ! fprintf (fp, "\nsel_refdef_chain:\n"); ! for (loop = sel_refdef_chain; loop; loop = TREE_CHAIN (loop)) ! { ! fprintf (fp, "(index: %4d offset: %4d) %s\n", index, offset, ! IDENTIFIER_POINTER (TREE_VALUE (loop))); ! index++; ! /* add one for the '\0' character */ ! offset += IDENTIFIER_LENGTH (TREE_VALUE (loop)) + 1; ! } ! fprintf (fp, "\n (max_selector_index: %4d.\n", max_selector_index); ! } ! } #endif ! void ! print_lang_statistics () ! { } ! static void ggc_mark_imp_list (arg) ! void *arg; { struct imp_entry *impent; --- 8278,8385 ---- tree chain; { const char *name = IDENTIFIER_POINTER (TREE_VALUE (chain)); ! char *string = (char *) alloca (strlen (name) + 30); ! tree decl; ! tree exp; ! sprintf (string, "%sobjc_class_name_%s", ! (flag_next_runtime ? "." : "__"), name); ! #ifdef ASM_DECLARE_UNRESOLVED_REFERENCE ! if (flag_next_runtime) ! { ! ASM_DECLARE_UNRESOLVED_REFERENCE (asm_out_file, string); ! return; ! } ! #endif ! /* Make a decl for this name, so we can use its address in a tree. */ ! decl = build_decl (VAR_DECL, get_identifier (string), char_type_node); ! DECL_EXTERNAL (decl) = 1; ! 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", ! (flag_next_runtime ? "." : "__"), name); ! exp = build1 (ADDR_EXPR, string_type_node, decl); ! decl = build_decl (VAR_DECL, get_identifier (string), string_type_node); ! DECL_INITIAL (decl) = exp; ! TREE_STATIC (decl) = 1; ! TREE_USED (decl) = 1; ! pushdecl (decl); ! rest_of_decl_compilation (decl, 0, 0, 0); } static void handle_impent (impent) struct imp_entry *impent; { ! char *string; ! ! objc_implementation_context = impent->imp_context; implementation_template = impent->imp_template; if (TREE_CODE (impent->imp_context) == CLASS_IMPLEMENTATION_TYPE) { ! const char *const class_name = IDENTIFIER_POINTER (CLASS_NAME (impent->imp_context)); ! string = (char *) alloca (strlen (class_name) + 30); ! sprintf (string, "%sobjc_class_name_%s", ! (flag_next_runtime ? "." : "__"), class_name); } else if (TREE_CODE (impent->imp_context) == CATEGORY_IMPLEMENTATION_TYPE) { ! const char *const class_name = IDENTIFIER_POINTER (CLASS_NAME (impent->imp_context)); ! const char *const class_super_name = ! IDENTIFIER_POINTER (CLASS_SUPER_NAME (impent->imp_context)); ! string = (char *) alloca (strlen (class_name) ! + strlen (class_super_name) + 30); ! /* Do the same for categories. Even though no references to ! these symbols are generated automatically by the compiler, it ! gives you a handle to pull them into an archive by hand. */ ! sprintf (string, "*%sobjc_category_name_%s_%s", ! (flag_next_runtime ? "." : "__"), class_name, class_super_name); } ! else ! return; ! #ifdef ASM_DECLARE_CLASS_REFERENCE ! if (flag_next_runtime) ! { ! ASM_DECLARE_CLASS_REFERENCE (asm_out_file, string); ! return; ! } ! else #endif + { + tree decl, init; ! init = build_int_2 (0, 0); ! TREE_TYPE (init) = 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; ! TREE_USED (decl) = 1; ! TREE_CONSTANT (decl) = 1; ! DECL_CONTEXT (decl) = 0; ! DECL_ARTIFICIAL (decl) = 1; ! DECL_INITIAL (decl) = init; ! assemble_variable (decl, 1, 0, 0); ! } } ! static void ggc_mark_imp_list (arg) ! void *arg; { struct imp_entry *impent; *************** ggc_mark_imp_list (arg) *** 8555,8561 **** static void ggc_mark_hash_table (arg) ! void *arg; { hash *hash_table = *(hash **)arg; hash hst; --- 8394,8400 ---- static void ggc_mark_hash_table (arg) ! void *arg; { hash *hash_table = *(hash **)arg; hash hst; *************** ggc_mark_hash_table (arg) *** 8577,8583 **** static void objc_act_parse_init () { - ggc_add_tree_root (&objc_ellipsis_node, 1); ggc_add_tree_root (objc_global_trees, OCTI_MAX); ggc_add_root (&imp_list, 1, sizeof imp_list, ggc_mark_imp_list); ggc_add_root (&nst_method_hash_list, 1, sizeof nst_method_hash_list, ggc_mark_hash_table); --- 8416,8421 ---- *************** lookup_objc_ivar (id) *** 8604,8649 **** else return 0; } - - /* Parser callbacks. - Some ObjC keywords are reserved only in a particular context: - in out inout bycopy byref oneway. - We have to save and restore the IDENTIFIER_NODEs that describe - them as keywords, when appropriate. */ - - #define N_PQ 6 - static tree saved_pq[N_PQ]; - static tree saved_not_pq[N_PQ]; - static const char *const pq_strings[N_PQ] = { - "bycopy", "byref", "in", "inout", "oneway", "out" - }; - - void - save_and_forget_protocol_qualifiers () - { - int i; - for (i = 0; i < N_PQ; i++) - saved_pq[i] = set_identifier (pq_strings[i], NULL_TREE); - - ggc_add_tree_root (saved_pq, N_PQ); - ggc_add_tree_root (saved_not_pq, N_PQ); - } - - void - forget_protocol_qualifiers () - { - int i; - for (i = 0; i < N_PQ; i++) - { - set_identifier (pq_strings[i], saved_not_pq[i]); - saved_not_pq[i] = NULL_TREE; - } - } - - void - remember_protocol_qualifiers () - { - int i; - for (i = 0; i < N_PQ; i++) - saved_not_pq[i] = set_identifier (pq_strings[i], saved_pq[i]); - } --- 8442,8444 ---- diff -Nrc3pad gcc-3.0.4/gcc/objc/objc-act.h gcc-3.1/gcc/objc/objc-act.h *** gcc-3.0.4/gcc/objc/objc-act.h Sun Sep 17 07:38:22 2000 --- gcc-3.1/gcc/objc/objc-act.h Tue Dec 4 00:25:20 2001 *************** *** 1,5 **** /* Declarations for objc-act.c. ! Copyright (C) 1990, 2000 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Declarations for objc-act.c. ! Copyright (C) 1990, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU CC. *************** along with GNU CC; see the file COPYING. *** 18,26 **** --- 18,31 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + #ifndef GCC_OBJC_ACT_H + #define GCC_OBJC_ACT_H /*** Public Interface (procedures) ***/ + const char *objc_init PARAMS ((const char *)); + int objc_decode_option PARAMS ((int, char **)); + /* used by yyparse */ void finish_file PARAMS ((void)); *************** tree get_class_reference PARAMS ((tree *** 46,51 **** --- 51,57 ---- tree get_static_reference PARAMS ((tree, tree)); tree get_object_reference PARAMS ((tree)); tree build_message_expr PARAMS ((tree)); + tree finish_message_expr PARAMS ((tree, tree, tree)); tree build_selector_expr PARAMS ((tree)); tree build_ivar_reference PARAMS ((tree)); tree build_keyword_decl PARAMS ((tree, tree, tree)); *************** tree build_method_decl PARAMS ((enum *** 53,64 **** tree build_protocol_expr PARAMS ((tree)); tree build_objc_string_object PARAMS ((tree)); - extern tree objc_ivar_chain; - extern tree objc_method_context; - extern tree objc_ellipsis_node; - void objc_declare_alias PARAMS ((tree, tree)); void objc_declare_class PARAMS ((tree)); extern int objc_receiver_context; --- 59,67 ---- tree build_protocol_expr PARAMS ((tree)); tree build_objc_string_object PARAMS ((tree)); void objc_declare_alias PARAMS ((tree, tree)); void objc_declare_class PARAMS ((tree)); + void objc_declare_protocols PARAMS ((tree)); extern int objc_receiver_context; *************** tree build_encode_expr PARAMS ((tree) *** 101,118 **** #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 TYPE_PROTOCOL_LIST(TYPE) ((TYPE)->type.context) /* Define the Objective-C or Objective-C++ language-specific tree codes. */ #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) SYM, enum objc_tree_code { #ifdef OBJCPLUS ! dummy_tree_code = LAST_CPLUS_TREE_CODE, #else ! dummy_tree_code = LAST_C_TREE_CODE, #endif #include "objc-tree.def" LAST_OBJC_TREE_CODE }; #undef DEFTREECODE --- 104,361 ---- #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) #define TYPE_PROTOCOL_LIST(TYPE) ((TYPE)->type.context) + /* 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 the Objective-C or Objective-C++ language-specific tree codes. */ #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) SYM, enum objc_tree_code { #ifdef OBJCPLUS ! LAST_BASE_TREE_CODE = LAST_CPLUS_TREE_CODE, #else ! LAST_BASE_TREE_CODE = LAST_C_TREE_CODE, #endif #include "objc-tree.def" LAST_OBJC_TREE_CODE }; #undef DEFTREECODE + + /* Hash tables to manage the global pool of method prototypes. */ + + typedef struct hashed_entry *hash; + typedef struct hashed_attribute *attr; + + struct hashed_attribute + { + attr next; + tree value; + }; + struct hashed_entry + { + attr list; + hash next; + tree key; + }; + + extern hash *nst_method_hash_list; + extern hash *cls_method_hash_list; + + #define HASH_ALLOC_LIST_SIZE 170 + #define ATTR_ALLOC_LIST_SIZE 170 + #define SIZEHASHTABLE 257 + + /* Objective-C/Objective-C++ @implementation list. */ + + struct imp_entry + { + struct imp_entry *next; + tree imp_context; + tree imp_template; + tree class_decl; /* _OBJC_CLASS_; */ + tree meta_decl; /* _OBJC_METACLASS_; */ + }; + + extern struct imp_entry *imp_list; + extern int imp_count; /* `@implementation' */ + extern int cat_count; /* `@category' */ + + /* Objective-C/Objective-C++ global tree enumeration. */ + + enum objc_tree_index + { + OCTI_STATIC_NST, + OCTI_STATIC_NST_DECL, + OCTI_SELF_ID, + OCTI_UCMD_ID, + OCTI_UNUSED_LIST, + OCTI_ELLIPSIS_NODE, + + OCTI_SELF_DECL, + OCTI_UMSG_DECL, + OCTI_UMSG_SUPER_DECL, + OCTI_GET_CLASS_DECL, + OCTI_GET_MCLASS_DECL, + OCTI_SUPER_TYPE, + OCTI_SEL_TYPE, + OCTI_ID_TYPE, + OCTI_CLS_TYPE, + OCTI_NST_TYPE, + OCTI_PROTO_TYPE, + + OCTI_CLS_CHAIN, + OCTI_ALIAS_CHAIN, + OCTI_INTF_CHAIN, + OCTI_PROTO_CHAIN, + OCTI_IMPL_CHAIN, + OCTI_CLS_REF_CHAIN, + OCTI_SEL_REF_CHAIN, + OCTI_IVAR_CHAIN, + OCTI_CLS_NAMES_CHAIN, + OCTI_METH_VAR_NAMES_CHAIN, + OCTI_METH_VAR_TYPES_CHAIN, + + OCTI_SYMBOLS_DECL, + OCTI_NST_VAR_DECL, + OCTI_CLS_VAR_DECL, + OCTI_NST_METH_DECL, + OCTI_CLS_METH_DECL, + OCTI_CLS_DECL, + OCTI_MCLS_DECL, + OCTI_SEL_TABLE_DECL, + OCTI_MODULES_DECL, + OCTI_STRG_DECL, + + OCTI_INTF_CTX, + OCTI_IMPL_CTX, + OCTI_METH_CTX, + OCTI_IVAR_CTX, + + OCTI_IMPL_TEMPL, + OCTI_CLS_TEMPL, + OCTI_CAT_TEMPL, + OCTI_UPRIV_REC, + OCTI_PROTO_TEMPL, + OCTI_SEL_TEMPL, + OCTI_UCLS_SUPER_REF, + OCTI_UUCLS_SUPER_REF, + OCTI_METH_TEMPL, + OCTI_IVAR_TEMPL, + OCTI_SYMTAB_TEMPL, + 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, + OCTI_STRING_CLASS_DECL, + OCTI_SUPER_DECL, + + OCTI_MAX + }; + + extern tree objc_global_trees[OCTI_MAX]; + + /* List of classes with list of their static instances. */ + #define objc_static_instances objc_global_trees[OCTI_STATIC_NST] + + /* The declaration of the array administrating the static instances. */ + #define static_instances_decl objc_global_trees[OCTI_STATIC_NST_DECL] + + /* Some commonly used instances of "identifier_node". */ + + #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] + #define umsg_super_decl objc_global_trees[OCTI_UMSG_SUPER_DECL] + #define objc_get_class_decl objc_global_trees[OCTI_GET_CLASS_DECL] + #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) \ + (super_type && TYPE_MAIN_VARIANT (TYPE) == TYPE_MAIN_VARIANT (super_type)) + + #define class_chain objc_global_trees[OCTI_CLS_CHAIN] + #define alias_chain objc_global_trees[OCTI_ALIAS_CHAIN] + #define interface_chain objc_global_trees[OCTI_INTF_CHAIN] + #define protocol_chain objc_global_trees[OCTI_PROTO_CHAIN] + #define implemented_classes objc_global_trees[OCTI_IMPL_CHAIN] + + /* Chains to manage selectors that are referenced and defined in the + module. */ + + #define cls_ref_chain objc_global_trees[OCTI_CLS_REF_CHAIN] /* Classes referenced. */ + #define sel_ref_chain objc_global_trees[OCTI_SEL_REF_CHAIN] /* Selectors referenced. */ + #define objc_ivar_chain objc_global_trees[OCTI_IVAR_CHAIN] + + /* Chains to manage uniquing of strings. */ + + #define class_names_chain objc_global_trees[OCTI_CLS_NAMES_CHAIN] + #define meth_var_names_chain objc_global_trees[OCTI_METH_VAR_NAMES_CHAIN] + #define meth_var_types_chain objc_global_trees[OCTI_METH_VAR_TYPES_CHAIN] + + + /* Backend data declarations. */ + + #define UOBJC_SYMBOLS_decl objc_global_trees[OCTI_SYMBOLS_DECL] + #define UOBJC_INSTANCE_VARIABLES_decl objc_global_trees[OCTI_NST_VAR_DECL] + #define UOBJC_CLASS_VARIABLES_decl objc_global_trees[OCTI_CLS_VAR_DECL] + #define UOBJC_INSTANCE_METHODS_decl objc_global_trees[OCTI_NST_METH_DECL] + #define UOBJC_CLASS_METHODS_decl objc_global_trees[OCTI_CLS_METH_DECL] + #define UOBJC_CLASS_decl objc_global_trees[OCTI_CLS_DECL] + #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 + none exists this will be equal to objc_implementation_context...it is + set in start_class. */ + + #define objc_interface_context objc_global_trees[OCTI_INTF_CTX] + #define objc_implementation_context objc_global_trees[OCTI_IMPL_CTX] + #define objc_method_context objc_global_trees[OCTI_METH_CTX] + #define objc_ivar_context objc_global_trees[OCTI_IVAR_CTX] + + #define implementation_template objc_global_trees[OCTI_IMPL_TEMPL] + #define objc_class_template objc_global_trees[OCTI_CLS_TEMPL] + #define objc_category_template objc_global_trees[OCTI_CAT_TEMPL] + #define uprivate_record objc_global_trees[OCTI_UPRIV_REC] + #define objc_protocol_template objc_global_trees[OCTI_PROTO_TEMPL] + #define objc_selector_template objc_global_trees[OCTI_SEL_TEMPL] + #define ucls_super_ref objc_global_trees[OCTI_UCLS_SUPER_REF] + #define uucls_super_ref objc_global_trees[OCTI_UUCLS_SUPER_REF] + + #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] + #define function2_template objc_global_trees[OCTI_FUNCTION2_TEMPL] + + #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 \ + objc_global_trees[OCTI_CNST_STR_GLOB_ID] + #define string_class_decl objc_global_trees[OCTI_STRING_CLASS_DECL] + #define UOBJC_SUPER_decl objc_global_trees[OCTI_SUPER_DECL] + + #endif /* GCC_OBJC_ACT_H */ diff -Nrc3pad gcc-3.0.4/gcc/objc/objc-lang.c gcc-3.1/gcc/objc/objc-lang.c *** gcc-3.0.4/gcc/objc/objc-lang.c Thu Jan 1 00:00:00 1970 --- gcc-3.1/gcc/objc/objc-lang.c Tue Mar 19 07:56:39 2002 *************** *** 0 **** --- 1,84 ---- + /* Language-dependent hooks for Objective-C. + Copyright 2001 Free Software Foundation, Inc. + Contributed by Ziemowit Laski + + This file is part of GNU CC. + + GNU CC 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 CC 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 CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #include "config.h" + #include "system.h" + #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" + + static void objc_init_options PARAMS ((void)); + static void objc_post_options PARAMS ((void)); + + #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 objc_init_options + #undef LANG_HOOKS_DECODE_OPTION + #define LANG_HOOKS_DECODE_OPTION objc_decode_option + #undef LANG_HOOKS_POST_OPTIONS + #define LANG_HOOKS_POST_OPTIONS objc_post_options + #undef LANG_HOOKS_STATICP + #define LANG_HOOKS_STATICP c_staticp + #undef LANG_HOOKS_PRINT_IDENTIFIER + #define LANG_HOOKS_PRINT_IDENTIFIER c_print_identifier + #undef LANG_HOOKS_SET_YYDEBUG + #define LANG_HOOKS_SET_YYDEBUG c_set_yydebug + /* 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 + + /* Each front end provides its own hooks, for toplev.c. */ + const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; + + static void + objc_init_options () + { + c_common_init_options (clk_objective_c); + } + + /* Post-switch processing. */ + + static void + objc_post_options () + { + c_common_post_options (); + } + + diff -Nrc3pad gcc-3.0.4/gcc/objc/objc-parse.c gcc-3.1/gcc/objc/objc-parse.c *** gcc-3.0.4/gcc/objc/objc-parse.c Wed Feb 20 19:42:15 2002 --- gcc-3.1/gcc/objc/objc-parse.c Wed May 15 03:01:01 2002 *************** *** 37,78 **** #define REALPART 287 #define IMAGPART 288 #define VA_ARG 289 ! #define PTR_VALUE 290 ! #define PTR_BASE 291 ! #define PTR_EXTENT 292 ! #define ASSIGN 293 ! #define OROR 294 ! #define ANDAND 295 ! #define EQCOMPARE 296 ! #define ARITHCOMPARE 297 ! #define LSHIFT 298 ! #define RSHIFT 299 ! #define UNARY 300 ! #define PLUSPLUS 301 ! #define MINUSMINUS 302 ! #define HYPERUNARY 303 ! #define POINTSAT 304 ! #define INTERFACE 305 ! #define IMPLEMENTATION 306 ! #define END 307 ! #define SELECTOR 308 ! #define DEFS 309 ! #define ENCODE 310 ! #define CLASSNAME 311 ! #define PUBLIC 312 ! #define PRIVATE 313 ! #define PROTECTED 314 ! #define PROTOCOL 315 ! #define OBJECTNAME 316 ! #define CLASS 317 ! #define ALIAS 318 ! #define OBJC_STRING 319 #line 34 "objc-parse.y" #include "config.h" #include "system.h" - #include #include "tree.h" #include "input.h" #include "cpplib.h" --- 37,80 ---- #define REALPART 287 #define IMAGPART 288 #define VA_ARG 289 ! #define CHOOSE_EXPR 290 ! #define TYPES_COMPATIBLE_P 291 ! #define PTR_VALUE 292 ! #define PTR_BASE 293 ! #define PTR_EXTENT 294 ! #define STRING_FUNC_NAME 295 ! #define VAR_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 #line 34 "objc-parse.y" #include "config.h" #include "system.h" #include "tree.h" #include "input.h" #include "cpplib.h" *************** *** 92,101 **** #include "objc-act.h" - /* Since parsers are distinct for each language, put the language string - definition here. */ - const char * const language_string = "GNU Objective-C"; - /* Like YYERROR but do call yyerror. */ #define YYERROR1 { yyerror ("syntax error"); YYERROR; } --- 94,99 ---- *************** const char * const language_string = "GN *** 105,114 **** /* Rename the "yyparse" function so that we can override it elsewhere. */ #define yyparse yyparse_1 ! #line 73 "objc-parse.y" typedef union {long itype; tree ttype; enum tree_code code; const char *filename; int lineno; } YYSTYPE; ! #line 204 "objc-parse.y" /* Number of statements (loosely speaking) and compound statements seen so far. */ --- 103,112 ---- /* Rename the "yyparse" function so that we can override it elsewhere. */ #define yyparse yyparse_1 ! #line 68 "objc-parse.y" typedef union {long itype; tree ttype; enum tree_code code; const char *filename; int lineno; } YYSTYPE; ! #line 212 "objc-parse.y" /* Number of statements (loosely speaking) and compound statements seen so far. */ *************** static int if_stmt_line; *** 124,153 **** static tree current_declspecs = NULL_TREE; static tree prefix_attributes = NULL_TREE; ! /* Stack of saved values of current_declspecs and prefix_attributes. */ static tree declspec_stack; /* For __extension__, save/restore the warning flags which are controlled by __extension__. */ ! #define SAVE_WARN_FLAGS() \ ! size_int (pedantic | (warn_pointer_arith << 1)) ! #define RESTORE_WARN_FLAGS(tval) \ ! do { \ ! int val = tree_low_cst (tval, 0); \ ! pedantic = val & 1; \ ! warn_pointer_arith = (val >> 1) & 1; \ } while (0) ! /* Objective-C specific information */ ! tree objc_interface_context; ! tree objc_implementation_context; ! tree objc_method_context; ! tree objc_ivar_chain; ! tree objc_ivar_context; ! enum tree_code objc_inherit_code; ! int objc_receiver_context; ! int objc_public_flag; /* Tell yyparse how to print a token's value, if yydebug is set. */ --- 122,180 ---- static tree current_declspecs = NULL_TREE; static tree prefix_attributes = NULL_TREE; ! /* List of all the attributes applying to the identifier currently being ! declared; includes prefix_attributes and possibly some more attributes ! just after a comma. */ ! static tree all_prefix_attributes = NULL_TREE; ! ! /* Stack of saved values of current_declspecs, prefix_attributes and ! all_prefix_attributes. */ static 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 controlled by __extension__. */ ! #define SAVE_WARN_FLAGS() \ ! size_int (pedantic \ ! | (warn_pointer_arith << 1) \ ! | (warn_traditional << 2)) ! ! #define RESTORE_WARN_FLAGS(tval) \ ! do { \ ! int val = tree_low_cst (tval, 0); \ ! pedantic = val & 1; \ ! warn_pointer_arith = (val >> 1) & 1; \ ! warn_traditional = (val >> 2) & 1; \ } while (0) ! /* 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 ! an identifier to an ObjC class, even if a class with that name ! exists. */ ! static int objc_need_raw_identifier; ! #define OBJC_NEED_RAW_IDENTIFIER(VAL) objc_need_raw_identifier = VAL /* Tell yyparse how to print a token's value, if yydebug is set. */ *************** static void init_reswords PARAMS ((void) *** 165,178 **** void c_parse_init () { ggc_add_tree_root (&declspec_stack, 1); ggc_add_tree_root (¤t_declspecs, 1); ggc_add_tree_root (&prefix_attributes, 1); ! ggc_add_tree_root (&objc_interface_context, 1); ! ggc_add_tree_root (&objc_implementation_context, 1); ! ggc_add_tree_root (&objc_method_context, 1); ! ggc_add_tree_root (&objc_ivar_chain, 1); ! ggc_add_tree_root (&objc_ivar_context, 1); } #include --- 192,203 ---- void c_parse_init () { + init_reswords (); + ggc_add_tree_root (&declspec_stack, 1); ggc_add_tree_root (¤t_declspecs, 1); ggc_add_tree_root (&prefix_attributes, 1); ! ggc_add_tree_root (&all_prefix_attributes, 1); } #include *************** c_parse_init () *** 185,210 **** ! #define YYFINAL 993 #define YYFLAG -32768 ! #define YYNTBASE 88 ! #define YYTRANSLATE(x) ((unsigned)(x) <= 319 ? yytranslate[x] : 325) static const char yytranslate[] = { 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, 84, 2, 2, 2, 56, 47, 2, 63, ! 80, 54, 52, 85, 53, 62, 55, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 42, 81, 2, ! 40, 2, 41, 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, ! 64, 2, 87, 46, 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, 86, 45, 82, 83, 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, --- 210,235 ---- ! #define YYFINAL 1163 #define YYFLAG -32768 ! #define YYNTBASE 92 ! #define YYTRANSLATE(x) ((unsigned)(x) <= 322 ? yytranslate[x] : 356) static const char yytranslate[] = { 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, 87, 2, 2, 2, 60, 51, 2, 67, ! 83, 58, 56, 88, 57, 66, 59, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 46, 84, 2, ! 44, 2, 45, 91, 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, 90, 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, 89, 49, 85, 86, 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, *************** static const char yytranslate[] = { *** 221,542 **** 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, 43, 44, 48, 49, 50, 51, 57, ! 58, 59, 60, 61, 65, 66, 67, 68, 69, 70, ! 71, 72, 73, 74, 75, 76, 77, 78, 79 }; #if YYDEBUG != 0 static const short yyprhs[] = { 0, 0, 1, 3, 4, 7, 8, 12, 14, 16, 18, ! 24, 27, 31, 36, 41, 44, 47, 50, 53, 55, ! 56, 57, 67, 72, 73, 74, 84, 89, 90, 91, ! 100, 104, 106, 108, 110, 112, 114, 116, 118, 120, ! 122, 124, 126, 128, 129, 131, 133, 137, 139, 142, ! 145, 148, 151, 154, 159, 162, 167, 170, 173, 175, ! 177, 179, 184, 186, 190, 194, 198, 202, 206, 210, ! 214, 218, 222, 226, 230, 234, 235, 240, 241, 246, ! 247, 248, 256, 257, 263, 267, 271, 273, 275, 277, ! 278, 286, 290, 294, 298, 302, 307, 314, 319, 323, ! 327, 330, 333, 335, 337, 339, 341, 343, 345, 348, ! 350, 353, 354, 356, 359, 363, 365, 367, 370, 373, ! 378, 383, 386, 389, 393, 394, 395, 400, 405, 409, ! 413, 416, 419, 422, 425, 429, 430, 433, 436, 439, ! 442, 446, 447, 450, 453, 455, 457, 460, 463, 465, ! 467, 470, 473, 476, 480, 481, 484, 486, 488, 490, ! 493, 496, 498, 503, 508, 510, 512, 514, 516, 520, ! 522, 526, 527, 532, 533, 540, 544, 545, 552, 556, ! 557, 559, 561, 564, 571, 573, 577, 578, 580, 585, ! 592, 597, 599, 601, 603, 605, 607, 608, 613, 615, ! 616, 619, 621, 625, 629, 632, 633, 638, 640, 641, ! 646, 648, 650, 652, 655, 658, 659, 660, 668, 669, ! 670, 678, 680, 682, 686, 690, 695, 699, 703, 707, ! 709, 711, 715, 720, 724, 728, 732, 734, 738, 742, ! 746, 751, 755, 759, 761, 763, 766, 768, 771, 773, ! 776, 777, 785, 791, 794, 795, 803, 809, 812, 813, ! 822, 823, 831, 834, 835, 837, 838, 840, 842, 845, ! 846, 850, 853, 858, 862, 868, 872, 874, 876, 879, ! 881, 885, 890, 897, 903, 905, 909, 911, 913, 917, ! 918, 922, 925, 926, 928, 930, 933, 934, 937, 941, ! 945, 948, 952, 957, 961, 964, 968, 971, 975, 977, ! 979, 981, 983, 985, 988, 991, 994, 997, 999, 1002, ! 1005, 1008, 1010, 1013, 1016, 1019, 1022, 1024, 1027, 1029, ! 1031, 1033, 1035, 1038, 1039, 1040, 1041, 1042, 1043, 1045, ! 1047, 1050, 1054, 1056, 1059, 1061, 1063, 1069, 1071, 1073, ! 1076, 1079, 1082, 1085, 1086, 1092, 1093, 1098, 1099, 1100, ! 1102, 1105, 1109, 1113, 1117, 1118, 1123, 1125, 1129, 1130, ! 1131, 1139, 1145, 1148, 1149, 1150, 1151, 1152, 1165, 1166, ! 1173, 1176, 1178, 1180, 1183, 1187, 1190, 1193, 1196, 1200, ! 1207, 1216, 1227, 1240, 1244, 1249, 1251, 1255, 1261, 1264, ! 1270, 1271, 1273, 1274, 1276, 1277, 1279, 1281, 1285, 1290, ! 1292, 1296, 1297, 1300, 1303, 1304, 1309, 1312, 1313, 1315, ! 1317, 1321, 1323, 1327, 1332, 1337, 1342, 1347, 1352, 1353, ! 1356, 1358, 1361, 1363, 1367, 1369, 1373, 1375, 1377, 1379, ! 1381, 1383, 1385, 1387, 1389, 1393, 1397, 1402, 1403, 1404, ! 1415, 1416, 1423, 1424, 1425, 1438, 1439, 1448, 1449, 1456, ! 1459, 1460, 1469, 1474, 1475, 1485, 1491, 1492, 1499, 1500, ! 1502, 1506, 1510, 1512, 1514, 1516, 1518, 1519, 1523, 1526, ! 1530, 1534, 1536, 1537, 1539, 1543, 1545, 1549, 1552, 1553, ! 1554, 1555, 1563, 1564, 1565, 1566, 1574, 1575, 1576, 1579, ! 1581, 1583, 1586, 1587, 1591, 1593, 1595, 1596, 1597, 1603, ! 1604, 1605, 1611, 1616, 1618, 1624, 1627, 1628, 1631, 1632, ! 1634, 1636, 1638, 1641, 1644, 1649, 1652, 1655, 1657, 1661, ! 1664, 1667, 1670, 1671, 1674, 1675, 1679, 1681, 1683, 1686, ! 1688, 1690, 1692, 1694, 1696, 1698, 1700, 1702, 1704, 1706, ! 1708, 1710, 1712, 1714, 1716, 1718, 1720, 1722, 1724, 1726, ! 1728, 1730, 1732, 1734, 1736, 1743, 1747, 1753, 1756, 1758, ! 1760, 1762, 1765, 1767, 1771, 1774, 1776, 1778, 1779, 1780, ! 1787, 1789, 1791, 1793, 1796, 1799, 1801, 1806, 1811 }; static const short yyrhs[] = { -1, ! 89, 0, 0, 90, 92, 0, 0, 89, 91, 92, ! 0, 94, 0, 93, 0, 256, 0, 27, 63, 103, ! 80, 81, 0, 255, 92, 0, 125, 139, 81, 0, ! 132, 125, 139, 81, 0, 128, 125, 138, 81, 0, ! 132, 81, 0, 128, 81, 0, 1, 81, 0, 1, ! 82, 0, 81, 0, 0, 0, 128, 125, 167, 95, ! 120, 96, 219, 220, 208, 0, 128, 125, 167, 1, ! 0, 0, 0, 132, 125, 170, 97, 120, 98, 219, ! 220, 208, 0, 132, 125, 170, 1, 0, 0, 0, ! 125, 170, 99, 120, 100, 219, 220, 208, 0, 125, ! 170, 1, 0, 3, 0, 4, 0, 76, 0, 71, ! 0, 47, 0, 53, 0, 52, 0, 58, 0, 59, ! 0, 83, 0, 84, 0, 105, 0, 0, 105, 0, ! 110, 0, 105, 85, 110, 0, 116, 0, 54, 109, ! 0, 255, 109, 0, 102, 109, 0, 44, 101, 0, ! 107, 106, 0, 107, 63, 188, 80, 0, 108, 106, ! 0, 108, 63, 188, 80, 0, 33, 109, 0, 34, ! 109, 0, 11, 0, 29, 0, 106, 0, 63, 188, ! 80, 109, 0, 109, 0, 110, 52, 110, 0, 110, ! 53, 110, 0, 110, 54, 110, 0, 110, 55, 110, ! 0, 110, 56, 110, 0, 110, 50, 110, 0, 110, ! 51, 110, 0, 110, 49, 110, 0, 110, 48, 110, ! 0, 110, 47, 110, 0, 110, 45, 110, 0, 110, ! 46, 110, 0, 0, 110, 44, 111, 110, 0, 0, ! 110, 43, 112, 110, 0, 0, 0, 110, 41, 113, ! 103, 42, 114, 110, 0, 0, 110, 41, 115, 42, ! 110, 0, 110, 40, 110, 0, 110, 39, 110, 0, ! 3, 0, 8, 0, 118, 0, 0, 63, 188, 80, ! 86, 117, 153, 82, 0, 63, 103, 80, 0, 63, ! 1, 80, 0, 212, 210, 80, 0, 212, 1, 80, ! 0, 116, 63, 104, 80, 0, 35, 63, 110, 85, ! 188, 80, 0, 116, 64, 103, 87, 0, 116, 62, ! 101, 0, 116, 61, 101, 0, 116, 58, 0, 116, ! 59, 0, 316, 0, 322, 0, 323, 0, 324, 0, ! 119, 0, 9, 0, 118, 9, 0, 79, 0, 119, ! 79, 0, 0, 122, 0, 122, 10, 0, 219, 220, ! 123, 0, 121, 0, 200, 0, 122, 121, 0, 121, ! 200, 0, 130, 125, 138, 81, 0, 133, 125, 139, ! 81, 0, 130, 81, 0, 133, 81, 0, 219, 220, ! 127, 0, 0, 0, 128, 125, 138, 81, 0, 132, ! 125, 139, 81, 0, 128, 125, 161, 0, 132, 125, ! 164, 0, 128, 81, 0, 132, 81, 0, 255, 127, ! 0, 136, 129, 0, 132, 136, 129, 0, 0, 129, ! 137, 0, 129, 5, 0, 129, 146, 0, 136, 131, ! 0, 133, 136, 131, 0, 0, 131, 137, 0, 131, ! 5, 0, 133, 0, 146, 0, 132, 133, 0, 132, ! 146, 0, 7, 0, 5, 0, 133, 7, 0, 133, ! 5, 0, 136, 135, 0, 191, 136, 135, 0, 0, ! 135, 137, 0, 6, 0, 174, 0, 4, 0, 71, ! 272, 0, 76, 272, 0, 273, 0, 28, 63, 103, ! 80, 0, 28, 63, 188, 80, 0, 6, 0, 7, ! 0, 174, 0, 141, 0, 138, 85, 141, 0, 143, ! 0, 139, 85, 141, 0, 0, 27, 63, 118, 80, ! 0, 0, 167, 140, 145, 40, 142, 151, 0, 167, ! 140, 145, 0, 0, 170, 140, 145, 40, 144, 151, ! 0, 170, 140, 145, 0, 0, 146, 0, 147, 0, ! 146, 147, 0, 30, 63, 63, 148, 80, 80, 0, ! 149, 0, 148, 85, 149, 0, 0, 150, 0, 150, ! 63, 3, 80, 0, 150, 63, 3, 85, 105, 80, ! 0, 150, 63, 104, 80, 0, 101, 0, 5, 0, ! 6, 0, 7, 0, 110, 0, 0, 86, 152, 153, ! 82, 0, 1, 0, 0, 154, 179, 0, 155, 0, ! 154, 85, 155, 0, 159, 40, 157, 0, 160, 157, ! 0, 0, 101, 42, 156, 157, 0, 157, 0, 0, ! 86, 158, 153, 82, 0, 110, 0, 1, 0, 160, ! 0, 159, 160, 0, 62, 101, 0, 0, 0, 167, ! 162, 120, 163, 219, 220, 213, 0, 0, 0, 170, ! 165, 120, 166, 219, 220, 213, 0, 168, 0, 170, ! 0, 63, 168, 80, 0, 168, 63, 250, 0, 168, ! 64, 103, 87, 0, 168, 64, 87, 0, 54, 192, ! 168, 0, 146, 126, 168, 0, 4, 0, 76, 0, ! 169, 63, 250, 0, 169, 64, 103, 87, 0, 169, ! 64, 87, 0, 54, 192, 169, 0, 146, 126, 169, ! 0, 4, 0, 170, 63, 250, 0, 63, 170, 80, ! 0, 54, 192, 170, 0, 170, 64, 103, 87, 0, ! 170, 64, 87, 0, 146, 126, 170, 0, 3, 0, ! 13, 0, 13, 146, 0, 14, 0, 14, 146, 0, ! 12, 0, 12, 146, 0, 0, 171, 101, 86, 175, ! 181, 82, 145, 0, 171, 86, 181, 82, 145, 0, ! 171, 101, 0, 0, 172, 101, 86, 176, 181, 82, ! 145, 0, 172, 86, 181, 82, 145, 0, 172, 101, ! 0, 0, 173, 101, 86, 177, 186, 180, 82, 145, ! 0, 0, 173, 86, 178, 186, 180, 82, 145, 0, ! 173, 101, 0, 0, 85, 0, 0, 85, 0, 182, ! 0, 182, 183, 0, 0, 182, 183, 81, 0, 182, ! 81, 0, 69, 63, 71, 80, 0, 134, 125, 184, ! 0, 134, 125, 219, 220, 145, 0, 191, 125, 184, ! 0, 191, 0, 1, 0, 255, 183, 0, 185, 0, ! 184, 85, 185, 0, 219, 220, 167, 145, 0, 219, ! 220, 167, 42, 110, 145, 0, 219, 220, 42, 110, ! 145, 0, 187, 0, 186, 85, 187, 0, 1, 0, ! 101, 0, 101, 40, 110, 0, 0, 134, 189, 190, ! 0, 191, 190, 0, 0, 193, 0, 7, 0, 191, ! 7, 0, 0, 192, 7, 0, 63, 193, 80, 0, ! 54, 192, 193, 0, 54, 192, 0, 193, 63, 243, ! 0, 193, 64, 103, 87, 0, 193, 64, 87, 0, ! 63, 243, 0, 64, 103, 87, 0, 64, 87, 0, ! 146, 126, 193, 0, 195, 0, 196, 0, 197, 0, ! 198, 0, 223, 0, 195, 223, 0, 196, 223, 0, ! 197, 223, 0, 198, 223, 0, 124, 0, 195, 124, ! 0, 196, 124, 0, 198, 124, 0, 224, 0, 195, ! 224, 0, 196, 224, 0, 197, 224, 0, 198, 224, ! 0, 200, 0, 199, 200, 0, 195, 0, 196, 0, ! 197, 0, 198, 0, 1, 81, 0, 0, 0, 0, ! 0, 0, 206, 0, 207, 0, 206, 207, 0, 32, ! 254, 81, 0, 213, 0, 1, 213, 0, 86, 0, ! 82, 0, 201, 205, 211, 82, 202, 0, 194, 0, ! 1, 0, 63, 86, 0, 209, 210, 0, 215, 222, ! 0, 215, 1, 0, 0, 15, 216, 63, 103, 80, ! 0, 0, 18, 218, 222, 17, 0, 0, 0, 223, ! 0, 224, 221, 0, 203, 221, 204, 0, 219, 220, ! 235, 0, 219, 220, 236, 0, 0, 214, 16, 226, ! 222, 0, 214, 0, 214, 16, 1, 0, 0, 0, ! 17, 227, 63, 103, 80, 228, 222, 0, 217, 63, ! 103, 80, 81, 0, 217, 1, 0, 0, 0, 0, ! 0, 19, 229, 63, 234, 230, 238, 81, 231, 238, ! 80, 232, 222, 0, 0, 20, 63, 103, 80, 233, ! 222, 0, 238, 81, 0, 127, 0, 213, 0, 103, ! 81, 0, 203, 225, 204, 0, 23, 81, 0, 24, ! 81, 0, 25, 81, 0, 25, 103, 81, 0, 27, ! 237, 63, 103, 80, 81, 0, 27, 237, 63, 103, ! 42, 239, 80, 81, 0, 27, 237, 63, 103, 42, ! 239, 42, 239, 80, 81, 0, 27, 237, 63, 103, ! 42, 239, 42, 239, 42, 242, 80, 81, 0, 26, ! 101, 81, 0, 26, 54, 103, 81, 0, 81, 0, ! 21, 110, 42, 0, 21, 110, 10, 110, 42, 0, ! 22, 42, 0, 101, 219, 220, 42, 145, 0, 0, ! 7, 0, 0, 103, 0, 0, 240, 0, 241, 0, ! 240, 85, 241, 0, 9, 63, 103, 80, 0, 118, ! 0, 242, 85, 118, 0, 0, 244, 245, 0, 247, ! 80, 0, 0, 248, 81, 246, 245, 0, 1, 80, ! 0, 0, 10, 0, 248, 0, 248, 85, 10, 0, ! 249, 0, 248, 85, 249, 0, 128, 125, 169, 145, ! 0, 128, 125, 170, 145, 0, 128, 125, 190, 145, ! 0, 132, 125, 170, 145, 0, 132, 125, 190, 145, ! 0, 0, 251, 252, 0, 245, 0, 253, 80, 0, ! 3, 0, 253, 85, 3, 0, 101, 0, 254, 85, ! 101, 0, 31, 0, 260, 0, 258, 0, 259, 0, ! 270, 0, 280, 0, 67, 0, 101, 0, 257, 85, ! 101, 0, 77, 257, 81, 0, 78, 101, 101, 81, ! 0, 0, 0, 65, 101, 272, 86, 261, 274, 82, ! 262, 287, 67, 0, 0, 65, 101, 272, 263, 287, ! 67, 0, 0, 0, 65, 101, 42, 101, 272, 86, ! 264, 274, 82, 265, 287, 67, 0, 0, 65, 101, ! 42, 101, 272, 266, 287, 67, 0, 0, 66, 101, ! 86, 267, 274, 82, 0, 66, 101, 0, 0, 66, ! 101, 42, 101, 86, 268, 274, 82, 0, 66, 101, ! 42, 101, 0, 0, 65, 101, 63, 101, 80, 272, ! 269, 287, 67, 0, 66, 101, 63, 101, 80, 0, ! 0, 75, 101, 272, 271, 287, 67, 0, 0, 273, ! 0, 49, 257, 49, 0, 274, 275, 276, 0, 276, ! 0, 73, 0, 74, 0, 72, 0, 0, 276, 277, ! 81, 0, 276, 81, 0, 134, 125, 278, 0, 191, ! 125, 278, 0, 1, 0, 0, 279, 0, 278, 85, ! 279, 0, 167, 0, 167, 42, 110, 0, 42, 110, ! 0, 0, 0, 0, 52, 281, 297, 282, 298, 283, ! 208, 0, 0, 0, 0, 53, 284, 297, 285, 298, ! 286, 208, 0, 0, 0, 288, 289, 0, 292, 0, ! 93, 0, 289, 292, 0, 0, 289, 290, 93, 0, ! 81, 0, 1, 0, 0, 0, 52, 293, 297, 294, ! 291, 0, 0, 0, 53, 295, 297, 296, 291, 0, ! 63, 188, 80, 306, 0, 306, 0, 63, 188, 80, ! 307, 304, 0, 307, 304, 0, 0, 81, 299, 0, ! 0, 300, 0, 301, 0, 200, 0, 300, 301, 0, ! 301, 200, 0, 128, 125, 302, 81, 0, 128, 81, ! 0, 132, 81, 0, 303, 0, 302, 85, 303, 0, ! 169, 145, 0, 170, 145, 0, 190, 145, 0, 0, ! 85, 10, 0, 0, 85, 305, 247, 0, 308, 0, ! 310, 0, 307, 310, 0, 3, 0, 4, 0, 76, ! 0, 309, 0, 12, 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, 11, 0, 28, 0, 29, ! 0, 6, 0, 7, 0, 308, 42, 63, 188, 80, ! 101, 0, 308, 42, 101, 0, 42, 63, 188, 80, ! 101, 0, 42, 101, 0, 308, 0, 312, 0, 314, ! 0, 312, 314, 0, 105, 0, 308, 42, 313, 0, ! 42, 313, 0, 103, 0, 71, 0, 0, 0, 64, ! 317, 315, 318, 311, 87, 0, 308, 0, 320, 0, ! 321, 0, 320, 321, 0, 308, 42, 0, 42, 0, ! 68, 63, 319, 80, 0, 75, 63, 101, 80, 0, ! 70, 63, 188, 80, 0 }; #endif #if YYDEBUG != 0 static const short yyrline[] = { 0, ! 273, 278, 292, 294, 294, 295, 297, 299, 300, 301, ! 309, 313, 323, 327, 331, 333, 335, 336, 337, 342, ! 349, 350, 357, 361, 367, 368, 375, 379, 385, 386, ! 393, 399, 401, 402, 403, 406, 408, 410, 413, 415, ! 417, 419, 423, 427, 430, 433, 436, 440, 442, 445, ! 448, 452, 480, 486, 489, 492, 495, 497, 501, 505, ! 509, 511, 523, 525, 527, 529, 531, 533, 535, 537, ! 539, 541, 543, 545, 547, 549, 553, 555, 559, 561, ! 564, 568, 570, 577, 580, 588, 599, 606, 607, 609, ! 613, 638, 644, 646, 662, 669, 671, 673, 675, 687, ! 701, 703, 705, 707, 709, 711, 713, 718, 720, 728, ! 730, 734, 736, 737, 747, 752, 754, 755, 756, 763, ! 768, 772, 775, 783, 792, 802, 806, 811, 815, 819, ! 823, 825, 827, 836, 839, 843, 845, 847, 852, 856, ! 859, 863, 866, 868, 880, 883, 885, 887, 891, 895, ! 897, 900, 913, 916, 920, 922, 930, 931, 932, 936, ! 938, 943, 945, 947, 953, 954, 955, 958, 960, 963, ! 965, 968, 971, 977, 984, 986, 993, 1000, 1003, 1010, ! 1013, 1017, 1020, 1024, 1029, 1032, 1036, 1039, 1041, 1043, ! 1045, 1052, 1054, 1055, 1056, 1061, 1063, 1065, 1067, 1072, ! 1076, 1079, 1081, 1086, 1090, 1093, 1098, 1098, 1101, 1104, ! 1106, 1108, 1111, 1113, 1116, 1124, 1138, 1145, 1154, 1168, ! 1175, 1187, 1189, 1194, 1197, 1202, 1204, 1206, 1213, 1215, ! 1216, 1224, 1230, 1232, 1234, 1241, 1243, 1249, 1255, 1257, ! 1259, 1261, 1268, 1270, 1273, 1276, 1280, 1283, 1287, 1290, ! 1294, 1299, 1301, 1305, 1307, 1309, 1311, 1315, 1317, 1319, ! 1322, 1324, 1327, 1335, 1337, 1340, 1342, 1347, 1350, 1355, ! 1357, 1359, 1363, 1387, 1393, 1406, 1411, 1416, 1418, 1423, ! 1425, 1429, 1433, 1437, 1447, 1449, 1454, 1459, 1462, 1466, ! 1470, 1471, 1475, 1478, 1481, 1484, 1488, 1491, 1495, 1499, ! 1501, 1503, 1505, 1507, 1509, 1511, 1513, 1517, 1527, 1529, ! 1530, 1534, 1537, 1539, 1540, 1541, 1542, 1545, 1547, 1550, ! 1551, 1554, 1556, 1557, 1558, 1559, 1562, 1564, 1567, 1569, ! 1570, 1571, 1574, 1577, 1586, 1590, 1608, 1623, 1625, 1630, ! 1632, 1635, 1649, 1652, 1655, 1658, 1660, 1667, 1669, 1672, ! 1689, 1695, 1701, 1704, 1715, 1726, 1738, 1746, 1752, 1758, ! 1760, 1764, 1770, 1784, 1793, 1798, 1802, 1814, 1824, 1827, ! 1833, 1834, 1837, 1839, 1843, 1846, 1849, 1852, 1853, 1857, ! 1860, 1863, 1868, 1871, 1874, 1878, 1881, 1884, 1887, 1890, ! 1913, 1917, 1922, 1926, 1938, 1944, 1952, 1955, 1958, 1961, ! 1976, 1980, 1984, 1987, 1992, 1994, 1997, 1999, 2003, 2008, ! 2011, 2017, 2022, 2027, 2029, 2038, 2039, 2045, 2047, 2057, ! 2059, 2063, 2066, 2072, 2081, 2089, 2097, 2106, 2119, 2124, ! 2129, 2131, 2140, 2143, 2148, 2151, 2155, 2164, 2166, 2167, ! 2168, 2169, 2170, 2184, 2187, 2191, 2197, 2203, 2210, 2215, ! 2221, 2228, 2234, 2240, 2245, 2251, 2258, 2264, 2270, 2276, ! 2284, 2290, 2296, 2304, 2311, 2317, 2326, 2333, 2341, 2346, ! 2349, 2359, 2361, 2364, 2366, 2367, 2370, 2375, 2376, 2393, ! 2399, 2404, 2408, 2411, 2412, 2415, 2423, 2429, 2438, 2448, ! 2455, 2459, 2464, 2473, 2480, 2484, 2494, 2496, 2497, 2499, ! 2501, 2502, 2503, 2504, 2506, 2508, 2511, 2519, 2526, 2526, ! 2533, 2539, 2541, 2547, 2552, 2557, 2566, 2568, 2574, 2576, ! 2579, 2581, 2582, 2583, 2586, 2591, 2593, 2597, 2600, 2607, ! 2613, 2618, 2625, 2630, 2635, 2640, 2647, 2651, 2654, 2660, ! 2662, 2663, 2664, 2667, 2668, 2668, 2668, 2668, 2668, 2668, ! 2668, 2669, 2669, 2669, 2669, 2669, 2669, 2670, 2670, 2670, ! 2670, 2670, 2671, 2671, 2674, 2680, 2685, 2690, 2696, 2698, ! 2701, 2703, 2710, 2722, 2727, 2733, 2735, 2741, 2745, 2746, ! 2752, 2754, 2757, 2759, 2765, 2770, 2776, 2783, 2792 }; #endif --- 246,634 ---- 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 }; #if YYDEBUG != 0 static const short yyprhs[] = { 0, 0, 1, 3, 4, 7, 8, 12, 14, 16, 18, ! 24, 27, 31, 36, 41, 44, 47, 50, 52, 53, ! 54, 64, 69, 70, 71, 81, 86, 87, 88, 97, ! 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, ! 121, 123, 125, 126, 128, 130, 134, 136, 139, 142, ! 145, 148, 151, 156, 159, 164, 167, 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, 322, 329, ! 334, 338, 342, 345, 348, 350, 352, 354, 356, 358, ! 360, 363, 366, 370, 371, 373, 376, 380, 382, 384, ! 387, 390, 395, 400, 403, 406, 410, 411, 413, 418, ! 423, 427, 431, 434, 437, 439, 442, 445, 448, 451, ! 454, 456, 459, 461, 464, 467, 470, 473, 476, 479, ! 481, 484, 487, 490, 493, 496, 499, 502, 505, 508, ! 511, 514, 517, 520, 523, 526, 529, 531, 534, 537, ! 540, 543, 546, 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, 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, 763, 765, 767, 769, 771, 773, 775, 776, 778, ! 780, 782, 784, 786, 788, 790, 792, 795, 798, 800, ! 805, 810, 812, 817, 819, 824, 825, 830, 831, 838, ! 842, 843, 850, 854, 855, 857, 859, 862, 869, 871, ! 875, 876, 878, 883, 890, 895, 897, 899, 901, 903, ! 905, 906, 911, 913, 914, 917, 919, 923, 927, 930, ! 931, 936, 938, 939, 944, 946, 948, 950, 953, 956, ! 957, 958, 966, 967, 968, 976, 978, 980, 985, 989, ! 992, 996, 998, 1000, 1002, 1004, 1008, 1011, 1013, 1015, ! 1019, 1022, 1026, 1030, 1035, 1039, 1044, 1048, 1051, 1053, ! 1055, 1058, 1060, 1063, 1065, 1068, 1069, 1077, 1083, 1084, ! 1092, 1098, 1099, 1108, 1109, 1117, 1120, 1123, 1126, 1127, ! 1129, 1130, 1132, 1134, 1137, 1138, 1142, 1145, 1150, 1154, ! 1159, 1163, 1165, 1167, 1170, 1172, 1177, 1179, 1184, 1189, ! 1196, 1202, 1207, 1214, 1220, 1222, 1226, 1228, 1230, 1234, ! 1235, 1239, 1240, 1242, 1243, 1245, 1248, 1250, 1252, 1254, ! 1258, 1261, 1265, 1270, 1274, 1277, 1280, 1282, 1286, 1291, ! 1294, 1298, 1302, 1307, 1312, 1318, 1324, 1326, 1328, 1330, ! 1332, 1334, 1337, 1340, 1343, 1346, 1348, 1351, 1354, 1357, ! 1359, 1362, 1365, 1368, 1371, 1373, 1376, 1378, 1380, 1382, ! 1384, 1387, 1388, 1389, 1390, 1391, 1392, 1394, 1396, 1399, ! 1403, 1405, 1408, 1410, 1412, 1418, 1420, 1422, 1425, 1428, ! 1431, 1434, 1435, 1441, 1442, 1447, 1448, 1449, 1451, 1454, ! 1458, 1462, 1466, 1467, 1472, 1474, 1478, 1479, 1480, 1488, ! 1494, 1497, 1498, 1499, 1500, 1501, 1514, 1515, 1522, 1525, ! 1527, 1529, 1532, 1536, 1539, 1542, 1545, 1549, 1556, 1565, ! 1576, 1589, 1593, 1598, 1600, 1604, 1610, 1613, 1619, 1620, ! 1622, 1623, 1625, 1626, 1628, 1630, 1634, 1639, 1647, 1649, ! 1653, 1654, 1658, 1661, 1662, 1663, 1670, 1673, 1674, 1676, ! 1678, 1682, 1684, 1688, 1693, 1698, 1702, 1707, 1711, 1716, ! 1721, 1725, 1730, 1734, 1736, 1737, 1741, 1743, 1746, 1748, ! 1752, 1754, 1758, 1760, 1762, 1764, 1766, 1768, 1770, 1772, ! 1774, 1778, 1782, 1787, 1788, 1789, 1800, 1801, 1808, 1809, ! 1810, 1823, 1824, 1833, 1834, 1841, 1844, 1845, 1854, 1859, ! 1860, 1870, 1876, 1877, 1884, 1888, 1889, 1891, 1895, 1899, ! 1901, 1903, 1905, 1907, 1908, 1912, 1915, 1919, 1923, 1925, ! 1926, 1928, 1933, 1935, 1939, 1942, 1944, 1946, 1947, 1948, ! 1949, 1957, 1958, 1959, 1962, 1964, 1966, 1969, 1970, 1974, ! 1976, 1978, 1979, 1980, 1986, 1991, 1993, 1999, 2002, 2003, ! 2006, 2007, 2009, 2011, 2013, 2016, 2019, 2024, 2027, 2030, ! 2032, 2036, 2039, 2042, 2044, 2045, 2048, 2049, 2053, 2055, ! 2057, 2060, 2062, 2064, 2066, 2068, 2070, 2072, 2074, 2076, ! 2078, 2080, 2082, 2084, 2086, 2088, 2090, 2092, 2094, 2096, ! 2098, 2100, 2102, 2104, 2106, 2108, 2110, 2112, 2119, 2123, ! 2129, 2132, 2134, 2136, 2138, 2141, 2143, 2147, 2150, 2152, ! 2154, 2155, 2156, 2163, 2165, 2167, 2169, 2172, 2175, 2177, ! 2182, 2187 }; static const short yyrhs[] = { -1, ! 93, 0, 0, 94, 96, 0, 0, 93, 95, 96, ! 0, 98, 0, 97, 0, 291, 0, 27, 67, 107, ! 83, 84, 0, 290, 96, 0, 129, 163, 84, 0, ! 149, 129, 163, 84, 0, 148, 129, 162, 84, 0, ! 155, 84, 0, 1, 84, 0, 1, 85, 0, 84, ! 0, 0, 0, 148, 129, 191, 99, 124, 100, 251, ! 252, 240, 0, 148, 129, 191, 1, 0, 0, 0, ! 149, 129, 196, 101, 124, 102, 251, 252, 240, 0, ! 149, 129, 196, 1, 0, 0, 0, 129, 196, 103, ! 124, 104, 251, 252, 240, 0, 129, 196, 1, 0, ! 3, 0, 4, 0, 80, 0, 75, 0, 51, 0, ! 57, 0, 56, 0, 62, 0, 63, 0, 86, 0, ! 87, 0, 109, 0, 0, 109, 0, 114, 0, 109, ! 88, 114, 0, 120, 0, 58, 113, 0, 290, 113, ! 0, 106, 113, 0, 48, 105, 0, 111, 110, 0, ! 111, 67, 217, 83, 0, 112, 110, 0, 112, 67, ! 217, 83, 0, 33, 113, 0, 34, 113, 0, 11, ! 0, 29, 0, 110, 0, 67, 217, 83, 113, 0, ! 113, 0, 114, 56, 114, 0, 114, 57, 114, 0, ! 114, 58, 114, 0, 114, 59, 114, 0, 114, 60, ! 114, 0, 114, 54, 114, 0, 114, 55, 114, 0, ! 114, 53, 114, 0, 114, 52, 114, 0, 114, 51, ! 114, 0, 114, 49, 114, 0, 114, 50, 114, 0, ! 0, 114, 48, 115, 114, 0, 0, 114, 47, 116, ! 114, 0, 0, 0, 114, 45, 117, 107, 46, 118, ! 114, 0, 0, 114, 45, 119, 46, 114, 0, 114, ! 44, 114, 0, 114, 43, 114, 0, 3, 0, 8, ! 0, 122, 0, 42, 0, 0, 67, 217, 83, 89, ! 121, 177, 85, 0, 67, 107, 83, 0, 67, 1, ! 83, 0, 244, 242, 83, 0, 244, 1, 83, 0, ! 120, 67, 108, 83, 0, 35, 67, 114, 88, 217, ! 83, 0, 36, 67, 114, 88, 114, 88, 114, 83, ! 0, 37, 67, 217, 88, 217, 83, 0, 120, 68, ! 107, 90, 0, 120, 66, 105, 0, 120, 65, 105, ! 0, 120, 62, 0, 120, 63, 0, 347, 0, 353, ! 0, 354, 0, 355, 0, 123, 0, 9, 0, 122, ! 9, 0, 91, 9, 0, 123, 91, 9, 0, 0, ! 126, 0, 126, 10, 0, 251, 252, 127, 0, 125, ! 0, 232, 0, 126, 125, 0, 125, 232, 0, 150, ! 129, 162, 84, 0, 151, 129, 163, 84, 0, 150, ! 84, 0, 151, 84, 0, 251, 252, 131, 0, 0, ! 169, 0, 148, 129, 162, 84, 0, 149, 129, 163, ! 84, 0, 148, 129, 185, 0, 149, 129, 188, 0, ! 155, 84, 0, 290, 131, 0, 7, 0, 132, 7, ! 0, 133, 7, 0, 132, 170, 0, 134, 7, 0, ! 135, 7, 0, 170, 0, 134, 170, 0, 157, 0, ! 136, 7, 0, 137, 7, 0, 136, 159, 0, 137, ! 159, 0, 132, 157, 0, 133, 157, 0, 158, 0, ! 136, 170, 0, 136, 160, 0, 137, 160, 0, 132, ! 158, 0, 133, 158, 0, 138, 7, 0, 139, 7, ! 0, 138, 159, 0, 139, 159, 0, 134, 157, 0, ! 135, 157, 0, 138, 170, 0, 138, 160, 0, 139, ! 160, 0, 134, 158, 0, 135, 158, 0, 5, 0, ! 140, 7, 0, 141, 7, 0, 132, 5, 0, 133, ! 5, 0, 140, 5, 0, 141, 5, 0, 140, 170, ! 0, 142, 7, 0, 143, 7, 0, 134, 5, 0, ! 135, 5, 0, 142, 5, 0, 143, 5, 0, 142, ! 170, 0, 144, 7, 0, 145, 7, 0, 144, 159, ! 0, 145, 159, 0, 140, 157, 0, 141, 157, 0, ! 136, 5, 0, 137, 5, 0, 144, 5, 0, 145, ! 5, 0, 144, 170, 0, 144, 160, 0, 145, 160, ! 0, 140, 158, 0, 141, 158, 0, 146, 7, 0, ! 147, 7, 0, 146, 159, 0, 147, 159, 0, 142, ! 157, 0, 143, 157, 0, 138, 5, 0, 139, 5, ! 0, 146, 5, 0, 147, 5, 0, 146, 170, 0, ! 146, 160, 0, 147, 160, 0, 142, 158, 0, 143, ! 158, 0, 136, 0, 137, 0, 138, 0, 139, 0, ! 144, 0, 145, 0, 146, 0, 147, 0, 132, 0, ! 133, 0, 134, 0, 135, 0, 140, 0, 141, 0, ! 142, 0, 143, 0, 136, 0, 137, 0, 144, 0, ! 145, 0, 132, 0, 133, 0, 140, 0, 141, 0, ! 136, 0, 137, 0, 138, 0, 139, 0, 132, 0, ! 133, 0, 134, 0, 135, 0, 136, 0, 137, 0, ! 138, 0, 139, 0, 132, 0, 133, 0, 134, 0, ! 135, 0, 132, 0, 133, 0, 134, 0, 135, 0, ! 136, 0, 137, 0, 138, 0, 139, 0, 140, 0, ! 141, 0, 142, 0, 143, 0, 144, 0, 145, 0, ! 146, 0, 147, 0, 0, 153, 0, 159, 0, 161, ! 0, 160, 0, 6, 0, 205, 0, 200, 0, 4, ! 0, 75, 307, 0, 80, 307, 0, 308, 0, 28, ! 67, 107, 83, 0, 28, 67, 217, 83, 0, 165, ! 0, 162, 88, 130, 165, 0, 167, 0, 163, 88, ! 130, 167, 0, 0, 27, 67, 122, 83, 0, 0, ! 191, 164, 169, 44, 166, 175, 0, 191, 164, 169, ! 0, 0, 196, 164, 169, 44, 168, 175, 0, 196, ! 164, 169, 0, 0, 170, 0, 171, 0, 170, 171, ! 0, 30, 67, 67, 172, 83, 83, 0, 173, 0, ! 172, 88, 173, 0, 0, 174, 0, 174, 67, 3, ! 83, 0, 174, 67, 3, 88, 109, 83, 0, 174, ! 67, 108, 83, 0, 105, 0, 5, 0, 6, 0, ! 7, 0, 114, 0, 0, 89, 176, 177, 85, 0, ! 1, 0, 0, 178, 206, 0, 179, 0, 178, 88, ! 179, 0, 183, 44, 181, 0, 184, 181, 0, 0, ! 105, 46, 180, 181, 0, 181, 0, 0, 89, 182, ! 177, 85, 0, 114, 0, 1, 0, 184, 0, 183, ! 184, 0, 66, 105, 0, 0, 0, 191, 186, 124, ! 187, 251, 252, 245, 0, 0, 0, 196, 189, 124, ! 190, 251, 252, 245, 0, 192, 0, 196, 0, 67, ! 169, 192, 83, 0, 192, 67, 285, 0, 192, 225, ! 0, 58, 156, 192, 0, 4, 0, 80, 0, 194, ! 0, 195, 0, 194, 67, 285, 0, 194, 225, 0, ! 4, 0, 80, 0, 195, 67, 285, 0, 195, 225, ! 0, 58, 156, 194, 0, 58, 156, 195, 0, 67, ! 169, 195, 83, 0, 196, 67, 285, 0, 67, 169, ! 196, 83, 0, 58, 156, 196, 0, 196, 225, 0, ! 3, 0, 13, 0, 13, 170, 0, 14, 0, 14, ! 170, 0, 12, 0, 12, 170, 0, 0, 197, 105, ! 89, 201, 208, 85, 169, 0, 197, 89, 208, 85, ! 169, 0, 0, 198, 105, 89, 202, 208, 85, 169, ! 0, 198, 89, 208, 85, 169, 0, 0, 199, 105, ! 89, 203, 215, 207, 85, 169, 0, 0, 199, 89, ! 204, 215, 207, 85, 169, 0, 197, 105, 0, 198, ! 105, 0, 199, 105, 0, 0, 88, 0, 0, 88, ! 0, 209, 0, 209, 210, 0, 0, 209, 210, 84, ! 0, 209, 84, 0, 73, 67, 75, 83, 0, 152, ! 129, 211, 0, 152, 129, 251, 252, 0, 153, 129, ! 212, 0, 153, 0, 1, 0, 290, 210, 0, 213, ! 0, 211, 88, 130, 213, 0, 214, 0, 212, 88, ! 130, 214, 0, 251, 252, 191, 169, 0, 251, 252, ! 191, 46, 114, 169, 0, 251, 252, 46, 114, 169, ! 0, 251, 252, 196, 169, 0, 251, 252, 196, 46, ! 114, 169, 0, 251, 252, 46, 114, 169, 0, 216, ! 0, 215, 88, 216, 0, 1, 0, 105, 0, 105, ! 44, 114, 0, 0, 154, 218, 219, 0, 0, 221, ! 0, 0, 221, 0, 222, 170, 0, 223, 0, 222, ! 0, 224, 0, 58, 156, 222, 0, 58, 156, 0, ! 58, 156, 223, 0, 67, 169, 221, 83, 0, 224, ! 67, 275, 0, 224, 225, 0, 67, 275, 0, 225, ! 0, 68, 107, 90, 0, 68, 154, 107, 90, 0, ! 68, 90, 0, 68, 154, 90, 0, 68, 58, 90, ! 0, 68, 154, 58, 90, 0, 68, 5, 107, 90, ! 0, 68, 5, 154, 107, 90, 0, 68, 154, 5, ! 107, 90, 0, 227, 0, 228, 0, 229, 0, 230, ! 0, 255, 0, 227, 255, 0, 228, 255, 0, 229, ! 255, 0, 230, 255, 0, 128, 0, 227, 128, 0, ! 228, 128, 0, 230, 128, 0, 256, 0, 227, 256, ! 0, 228, 256, 0, 229, 256, 0, 230, 256, 0, ! 232, 0, 231, 232, 0, 227, 0, 228, 0, 229, ! 0, 230, 0, 1, 84, 0, 0, 0, 0, 0, ! 0, 238, 0, 239, 0, 238, 239, 0, 32, 289, ! 84, 0, 245, 0, 1, 245, 0, 89, 0, 85, ! 0, 233, 237, 243, 85, 234, 0, 226, 0, 1, ! 0, 67, 89, 0, 241, 242, 0, 247, 254, 0, ! 247, 1, 0, 0, 15, 248, 67, 107, 83, 0, ! 0, 18, 250, 254, 17, 0, 0, 0, 255, 0, ! 256, 253, 0, 235, 253, 236, 0, 251, 252, 267, ! 0, 251, 252, 268, 0, 0, 246, 16, 258, 254, ! 0, 246, 0, 246, 16, 1, 0, 0, 0, 17, ! 259, 67, 107, 83, 260, 254, 0, 249, 67, 107, ! 83, 84, 0, 249, 1, 0, 0, 0, 0, 0, ! 19, 261, 67, 266, 262, 270, 84, 263, 270, 83, ! 264, 254, 0, 0, 20, 67, 107, 83, 265, 254, ! 0, 270, 84, 0, 131, 0, 245, 0, 107, 84, ! 0, 235, 257, 236, 0, 23, 84, 0, 24, 84, ! 0, 25, 84, 0, 25, 107, 84, 0, 27, 269, ! 67, 107, 83, 84, 0, 27, 269, 67, 107, 46, ! 271, 83, 84, 0, 27, 269, 67, 107, 46, 271, ! 46, 271, 83, 84, 0, 27, 269, 67, 107, 46, ! 271, 46, 271, 46, 274, 83, 84, 0, 26, 105, ! 84, 0, 26, 58, 107, 84, 0, 84, 0, 21, ! 114, 46, 0, 21, 114, 10, 114, 46, 0, 22, ! 46, 0, 105, 251, 252, 46, 169, 0, 0, 7, ! 0, 0, 107, 0, 0, 272, 0, 273, 0, 272, ! 88, 273, 0, 9, 67, 107, 83, 0, 68, 105, ! 90, 9, 67, 107, 83, 0, 122, 0, 274, 88, ! 122, 0, 0, 169, 276, 277, 0, 280, 83, 0, ! 0, 0, 281, 84, 278, 169, 279, 277, 0, 1, ! 83, 0, 0, 10, 0, 281, 0, 281, 88, 10, ! 0, 283, 0, 281, 88, 282, 0, 148, 129, 193, ! 169, 0, 148, 129, 196, 169, 0, 148, 129, 220, ! 0, 149, 129, 196, 169, 0, 149, 129, 220, 0, ! 150, 284, 193, 169, 0, 150, 284, 196, 169, 0, ! 150, 284, 220, 0, 151, 284, 196, 169, 0, 151, ! 284, 220, 0, 129, 0, 0, 169, 286, 287, 0, ! 277, 0, 288, 83, 0, 3, 0, 288, 88, 3, ! 0, 105, 0, 289, 88, 105, 0, 31, 0, 295, ! 0, 293, 0, 294, 0, 305, 0, 316, 0, 71, ! 0, 105, 0, 292, 88, 105, 0, 81, 292, 84, ! 0, 82, 105, 105, 84, 0, 0, 0, 69, 105, ! 307, 89, 296, 309, 85, 297, 320, 71, 0, 0, ! 69, 105, 307, 298, 320, 71, 0, 0, 0, 69, ! 105, 46, 105, 307, 89, 299, 309, 85, 300, 320, ! 71, 0, 0, 69, 105, 46, 105, 307, 301, 320, ! 71, 0, 0, 70, 105, 89, 302, 309, 85, 0, ! 70, 105, 0, 0, 70, 105, 46, 105, 89, 303, ! 309, 85, 0, 70, 105, 46, 105, 0, 0, 69, ! 105, 67, 105, 83, 307, 304, 320, 71, 0, 70, ! 105, 67, 105, 83, 0, 0, 79, 105, 307, 306, ! 320, 71, 0, 79, 292, 84, 0, 0, 308, 0, ! 53, 292, 53, 0, 309, 310, 311, 0, 311, 0, ! 77, 0, 78, 0, 76, 0, 0, 311, 312, 84, ! 0, 311, 84, 0, 152, 129, 313, 0, 153, 129, ! 313, 0, 1, 0, 0, 314, 0, 313, 88, 130, ! 314, 0, 191, 0, 191, 46, 114, 0, 46, 114, ! 0, 56, 0, 57, 0, 0, 0, 0, 315, 317, ! 328, 318, 329, 319, 240, 0, 0, 0, 321, 322, ! 0, 325, 0, 97, 0, 322, 325, 0, 0, 322, ! 323, 97, 0, 84, 0, 1, 0, 0, 0, 315, ! 326, 328, 327, 324, 0, 67, 217, 83, 337, 0, ! 337, 0, 67, 217, 83, 338, 335, 0, 338, 335, ! 0, 0, 84, 330, 0, 0, 331, 0, 332, 0, ! 232, 0, 331, 332, 0, 332, 232, 0, 148, 129, ! 333, 84, 0, 148, 84, 0, 149, 84, 0, 334, ! 0, 333, 88, 334, 0, 193, 169, 0, 196, 169, ! 0, 220, 0, 0, 88, 10, 0, 0, 88, 336, ! 280, 0, 339, 0, 341, 0, 338, 341, 0, 3, ! 0, 4, 0, 75, 0, 80, 0, 340, 0, 12, ! 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, 11, 0, 28, 0, 29, 0, 6, 0, 7, ! 0, 339, 46, 67, 217, 83, 105, 0, 339, 46, ! 105, 0, 46, 67, 217, 83, 105, 0, 46, 105, ! 0, 339, 0, 343, 0, 345, 0, 343, 345, 0, ! 109, 0, 339, 46, 344, 0, 46, 344, 0, 107, ! 0, 75, 0, 0, 0, 68, 348, 346, 349, 342, ! 90, 0, 339, 0, 351, 0, 352, 0, 351, 352, ! 0, 339, 46, 0, 46, 0, 72, 67, 350, 83, ! 0, 79, 67, 105, 83, 0, 74, 67, 217, 83, ! 0 }; #endif #if YYDEBUG != 0 static const short yyrline[] = { 0, ! 308, 313, 327, 329, 329, 330, 332, 334, 335, 336, ! 344, 348, 356, 358, 360, 362, 363, 364, 369, 376, ! 377, 382, 384, 390, 391, 396, 398, 404, 405, 410, ! 414, 416, 417, 418, 421, 423, 425, 428, 430, 432, ! 434, 438, 442, 445, 448, 451, 455, 457, 460, 463, ! 467, 484, 490, 493, 496, 499, 501, 505, 509, 513, ! 515, 519, 521, 523, 525, 527, 529, 531, 533, 535, ! 537, 539, 541, 543, 545, 549, 551, 555, 557, 560, ! 564, 566, 573, 576, 583, 593, 600, 601, 603, 605, ! 609, 618, 623, 625, 641, 648, 650, 653, 663, 673, ! 675, 682, 691, 693, 695, 697, 699, 701, 703, 708, ! 710, 718, 721, 725, 727, 728, 738, 743, 745, 746, ! 747, 754, 757, 759, 762, 770, 779, 789, 794, 797, ! 799, 801, 803, 805, 861, 865, 868, 873, 879, 883, ! 888, 892, 897, 901, 904, 907, 910, 913, 916, 921, ! 925, 928, 931, 934, 937, 942, 946, 949, 952, 955, ! 958, 963, 967, 970, 973, 976, 981, 985, 988, 991, ! 997, 1003, 1009, 1017, 1023, 1027, 1030, 1036, 1042, 1048, ! 1056, 1062, 1066, 1069, 1072, 1075, 1078, 1081, 1087, 1093, ! 1099, 1107, 1111, 1114, 1117, 1120, 1125, 1129, 1132, 1135, ! 1138, 1141, 1144, 1150, 1156, 1162, 1170, 1174, 1177, 1180, ! 1183, 1189, 1191, 1192, 1193, 1194, 1195, 1196, 1197, 1200, ! 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1211, 1213, 1214, ! 1215, 1218, 1220, 1221, 1222, 1225, 1227, 1228, 1229, 1232, ! 1234, 1235, 1236, 1239, 1241, 1242, 1243, 1244, 1245, 1246, ! 1247, 1250, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1259, ! 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1270, 1273, 1298, ! 1300, 1303, 1307, 1310, 1313, 1317, 1322, 1324, 1329, 1331, ! 1333, 1339, 1341, 1344, 1346, 1349, 1352, 1358, 1365, 1367, ! 1374, 1381, 1383, 1390, 1393, 1397, 1400, 1404, 1409, 1412, ! 1416, 1419, 1421, 1423, 1425, 1432, 1434, 1435, 1436, 1441, ! 1443, 1445, 1447, 1452, 1456, 1459, 1461, 1466, 1470, 1473, ! 1478, 1478, 1481, 1484, 1486, 1488, 1491, 1493, 1496, 1504, ! 1518, 1525, 1534, 1548, 1555, 1567, 1569, 1574, 1577, 1582, ! 1584, 1586, 1587, 1594, 1596, 1599, 1605, 1607, 1608, 1611, ! 1617, 1619, 1621, 1623, 1630, 1636, 1638, 1640, 1642, 1645, ! 1648, 1652, 1655, 1659, 1662, 1672, 1677, 1679, 1683, 1685, ! 1687, 1691, 1693, 1696, 1698, 1703, 1706, 1708, 1716, 1718, ! 1721, 1723, 1728, 1731, 1736, 1738, 1740, 1744, 1759, 1763, ! 1773, 1776, 1781, 1783, 1788, 1790, 1794, 1796, 1800, 1804, ! 1808, 1813, 1817, 1821, 1831, 1833, 1838, 1843, 1846, 1850, ! 1855, 1858, 1861, 1864, 1869, 1873, 1879, 1881, 1884, 1886, ! 1890, 1893, 1897, 1900, 1902, 1904, 1906, 1912, 1915, 1917, ! 1919, 1921, 1923, 1925, 1929, 1933, 1945, 1947, 1948, 1952, ! 1955, 1957, 1958, 1959, 1960, 1963, 1965, 1968, 1969, 1972, ! 1974, 1975, 1976, 1977, 1980, 1982, 1985, 1987, 1988, 1989, ! 1992, 1995, 2004, 2009, 2027, 2042, 2044, 2049, 2051, 2054, ! 2068, 2071, 2074, 2078, 2080, 2087, 2089, 2092, 2110, 2117, ! 2123, 2126, 2137, 2148, 2160, 2168, 2174, 2180, 2182, 2186, ! 2192, 2206, 2215, 2220, 2224, 2236, 2246, 2249, 2255, 2256, ! 2259, 2261, 2265, 2268, 2271, 2274, 2275, 2279, 2282, 2285, ! 2290, 2293, 2296, 2300, 2303, 2306, 2309, 2312, 2316, 2320, ! 2325, 2329, 2341, 2347, 2355, 2358, 2361, 2364, 2379, 2383, ! 2387, 2390, 2395, 2397, 2400, 2402, 2406, 2409, 2413, 2416, ! 2425, 2431, 2436, 2438, 2447, 2450, 2451, 2457, 2459, 2469, ! 2471, 2475, 2478, 2484, 2490, 2495, 2498, 2504, 2511, 2517, ! 2522, 2525, 2531, 2536, 2545, 2551, 2556, 2558, 2575, 2578, ! 2583, 2586, 2590, 2600, 2602, 2603, 2604, 2605, 2606, 2620, ! 2623, 2627, 2633, 2639, 2646, 2651, 2657, 2664, 2670, 2676, ! 2681, 2687, 2694, 2700, 2706, 2712, 2720, 2726, 2732, 2740, ! 2747, 2753, 2762, 2769, 2778, 2784, 2789, 2792, 2802, 2804, ! 2807, 2809, 2810, 2813, 2818, 2819, 2836, 2840, 2843, 2847, ! 2850, 2851, 2854, 2862, 2868, 2877, 2880, 2884, 2892, 2901, ! 2905, 2914, 2916, 2917, 2919, 2921, 2922, 2923, 2924, 2926, ! 2928, 2931, 2938, 2947, 2949, 2955, 2960, 2965, 2974, 2976, ! 2982, 2984, 2987, 2989, 2990, 2991, 2994, 2997, 2999, 3003, ! 3006, 3013, 3018, 3022, 3026, 3031, 3036, 3041, 3048, 3052, ! 3055, 3061, 3063, 3064, 3065, 3066, 3069, 3070, 3070, 3070, ! 3070, 3070, 3070, 3070, 3071, 3071, 3071, 3071, 3071, 3071, ! 3072, 3072, 3072, 3072, 3072, 3073, 3073, 3076, 3082, 3087, ! 3092, 3098, 3100, 3103, 3105, 3112, 3124, 3129, 3135, 3137, ! 3143, 3147, 3148, 3154, 3156, 3159, 3161, 3167, 3172, 3178, ! 3185, 3194 }; #endif *************** static const char * const yytname[] = { *** 547,1758 **** "TYPENAME","SCSPEC","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","PTR_VALUE","PTR_BASE","PTR_EXTENT", ! "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","OBJC_STRING","')'","';'","'}'","'~'","'!'","','", ! "'{'","']'","program","extdefs","@1","@2","extdef","datadef","fndef","@3","@4", ! "@5","@6","@7","@8","identifier","unop","expr","exprlist","nonnull_exprlist", ! "unary_expr","sizeof","alignof","cast_expr","expr_no_commas","@9","@10","@11", ! "@12","@13","primary","@14","string","objc_string","old_style_parm_decls","lineno_datadecl", ! "datadecls","datadecl","lineno_decl","setspecs","setattrs","decl","typed_declspecs", ! "reserved_declspecs","typed_declspecs_no_prefix_attr","reserved_declspecs_no_prefix_attr", ! "declmods","declmods_no_prefix_attr","typed_typespecs","reserved_typespecquals", ! "typespec","typespecqual_reserved","initdecls","notype_initdecls","maybeasm", ! "initdcl","@15","notype_initdcl","@16","maybe_attribute","attributes","attribute", ! "attribute_list","attrib","any_word","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","notype_declarator","struct_head","union_head","enum_head", ! "structsp","@24","@25","@26","@27","maybecomma","maybecomma_warn","component_decl_list", ! "component_decl_list2","component_decl","components","component_declarator", ! "enumlist","enumerator","typename","@28","absdcl","nonempty_type_quals","type_quals", ! "absdcl1","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_filename", ! "save_lineno","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","label","maybe_type_qual","xexpr","asm_operands", ! "nonnull_asm_operands","asm_operand","asm_clobbers","parmlist","@39","parmlist_1", ! "@40","parmlist_2","parms","parm","parmlist_or_identifiers","@41","parmlist_or_identifiers_1", "identifiers","identifiers_or_typenames","extension","objcdef","identifier_list", ! "classdecl","aliasdecl","classdef","@42","@43","@44","@45","@46","@47","@48", ! "@49","@50","protocoldef","@51","protocolrefs","non_empty_protocolrefs","ivar_decl_list", ! "visibility_spec","ivar_decls","ivar_decl","ivars","ivar_declarator","methoddef", ! "@52","@53","@54","@55","@56","@57","methodprotolist","@58","methodprotolist2", ! "@59","semi_or_error","methodproto","@60","@61","@62","@63","methoddecl","optarglist", ! "myxdecls","mydecls","mydecl","myparms","myparm","optparmlist","@64","unaryselector", ! "keywordselector","selector","reservedwords","keyworddecl","messageargs","keywordarglist", ! "keywordexpr","keywordarg","receiver","objcmessageexpr","@65","@66","selectorarg", ! "keywordnamelist","keywordname","objcselectorexpr","objcprotocolexpr","objcencodeexpr", NULL }; #endif static const short yyr1[] = { 0, ! 88, 88, 90, 89, 91, 89, 92, 92, 92, 92, ! 92, 93, 93, 93, 93, 93, 93, 93, 93, 95, ! 96, 94, 94, 97, 98, 94, 94, 99, 100, 94, ! 94, 101, 101, 101, 101, 102, 102, 102, 102, 102, ! 102, 102, 103, 104, 104, 105, 105, 106, 106, 106, ! 106, 106, 106, 106, 106, 106, 106, 106, 107, 108, ! 109, 109, 110, 110, 110, 110, 110, 110, 110, 110, ! 110, 110, 110, 110, 110, 111, 110, 112, 110, 113, ! 114, 110, 115, 110, 110, 110, 116, 116, 116, 117, ! 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, ! 116, 116, 116, 116, 116, 116, 116, 118, 118, 119, ! 119, 120, 120, 120, 121, 122, 122, 122, 122, 123, ! 123, 123, 123, 124, 125, 126, 127, 127, 127, 127, ! 127, 127, 127, 128, 128, 129, 129, 129, 129, 130, ! 130, 131, 131, 131, 132, 132, 132, 132, 133, 133, ! 133, 133, 134, 134, 135, 135, 136, 136, 136, 136, ! 136, 136, 136, 136, 137, 137, 137, 138, 138, 139, ! 139, 140, 140, 142, 141, 141, 144, 143, 143, 145, ! 145, 146, 146, 147, 148, 148, 149, 149, 149, 149, ! 149, 150, 150, 150, 150, 151, 152, 151, 151, 153, ! 153, 154, 154, 155, 155, 156, 155, 155, 158, 157, ! 157, 157, 159, 159, 160, 162, 163, 161, 165, 166, ! 164, 167, 167, 168, 168, 168, 168, 168, 168, 168, ! 168, 169, 169, 169, 169, 169, 169, 170, 170, 170, ! 170, 170, 170, 170, 171, 171, 172, 172, 173, 173, ! 175, 174, 174, 174, 176, 174, 174, 174, 177, 174, ! 178, 174, 174, 179, 179, 180, 180, 181, 181, 182, ! 182, 182, 182, 183, 183, 183, 183, 183, 183, 184, ! 184, 185, 185, 185, 186, 186, 186, 187, 187, 189, ! 188, 188, 190, 190, 191, 191, 192, 192, 193, 193, ! 193, 193, 193, 193, 193, 193, 193, 193, 194, 194, ! 194, 194, 195, 195, 195, 195, 195, 196, 196, 196, ! 196, 197, 197, 197, 197, 197, 198, 198, 199, 199, ! 199, 199, 200, 201, 202, 203, 204, 205, 205, 206, ! 206, 207, 208, 208, 209, 210, 210, 211, 211, 212, ! 213, 214, 214, 216, 215, 218, 217, 219, 220, 221, ! 221, 222, 223, 224, 226, 225, 225, 225, 227, 228, ! 225, 225, 225, 229, 230, 231, 232, 225, 233, 225, ! 234, 234, 235, 235, 235, 235, 235, 235, 235, 235, ! 235, 235, 235, 235, 235, 235, 236, 236, 236, 236, ! 237, 237, 238, 238, 239, 239, 240, 240, 241, 242, ! 242, 244, 243, 245, 246, 245, 245, 247, 247, 247, ! 247, 248, 248, 249, 249, 249, 249, 249, 251, 250, ! 252, 252, 253, 253, 254, 254, 255, 256, 256, 256, ! 256, 256, 256, 257, 257, 258, 259, 261, 262, 260, ! 263, 260, 264, 265, 260, 266, 260, 267, 260, 260, ! 268, 260, 260, 269, 260, 260, 271, 270, 272, 272, ! 273, 274, 274, 275, 275, 275, 276, 276, 276, 277, ! 277, 277, 278, 278, 278, 279, 279, 279, 281, 282, ! 283, 280, 284, 285, 286, 280, 287, 288, 287, 289, ! 289, 289, 290, 289, 291, 291, 293, 294, 292, 295, ! 296, 292, 297, 297, 297, 297, 298, 298, 299, 299, ! 300, 300, 300, 300, 301, 301, 301, 302, 302, 303, ! 303, 303, 304, 304, 305, 304, 306, 307, 307, 308, ! 308, 308, 308, 309, 309, 309, 309, 309, 309, 309, ! 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, ! 309, 309, 309, 309, 310, 310, 310, 310, 311, 311, ! 312, 312, 313, 314, 314, 315, 315, 317, 318, 316, ! 319, 319, 320, 320, 321, 321, 322, 323, 324 }; static const short yyr2[] = { 0, 0, 1, 0, 2, 0, 3, 1, 1, 1, 5, ! 2, 3, 4, 4, 2, 2, 2, 2, 1, 0, ! 0, 9, 4, 0, 0, 9, 4, 0, 0, 8, ! 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, 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, 0, ! 7, 3, 3, 3, 3, 4, 6, 4, 3, 3, ! 2, 2, 1, 1, 1, 1, 1, 1, 2, 1, ! 2, 0, 1, 2, 3, 1, 1, 2, 2, 4, ! 4, 2, 2, 3, 0, 0, 4, 4, 3, 3, ! 2, 2, 2, 2, 3, 0, 2, 2, 2, 2, ! 3, 0, 2, 2, 1, 1, 2, 2, 1, 1, ! 2, 2, 2, 3, 0, 2, 1, 1, 1, 2, ! 2, 1, 4, 4, 1, 1, 1, 1, 3, 1, ! 3, 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, 0, 4, 1, 0, ! 2, 1, 3, 3, 2, 0, 4, 1, 0, 4, ! 1, 1, 1, 2, 2, 0, 0, 7, 0, 0, ! 7, 1, 1, 3, 3, 4, 3, 3, 3, 1, ! 1, 3, 4, 3, 3, 3, 1, 3, 3, 3, ! 4, 3, 3, 1, 1, 2, 1, 2, 1, 2, ! 0, 7, 5, 2, 0, 7, 5, 2, 0, 8, ! 0, 7, 2, 0, 1, 0, 1, 1, 2, 0, ! 3, 2, 4, 3, 5, 3, 1, 1, 2, 1, ! 3, 4, 6, 5, 1, 3, 1, 1, 3, 0, ! 3, 2, 0, 1, 1, 2, 0, 2, 3, 3, ! 2, 3, 4, 3, 2, 3, 2, 3, 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, 0, 1, ! 2, 3, 3, 3, 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, 5, 2, 5, ! 0, 1, 0, 1, 0, 1, 1, 3, 4, 1, ! 3, 0, 2, 2, 0, 4, 2, 0, 1, 1, ! 3, 1, 3, 4, 4, 4, 4, 4, 0, 2, ! 1, 2, 1, 3, 1, 3, 1, 1, 1, 1, ! 1, 1, 1, 1, 3, 3, 4, 0, 0, 10, ! 0, 6, 0, 0, 12, 0, 8, 0, 6, 2, ! 0, 8, 4, 0, 9, 5, 0, 6, 0, 1, ! 3, 3, 1, 1, 1, 1, 0, 3, 2, 3, ! 3, 1, 0, 1, 3, 1, 3, 2, 0, 0, ! 0, 7, 0, 0, 0, 7, 0, 0, 2, 1, ! 1, 2, 0, 3, 1, 1, 0, 0, 5, 0, ! 0, 5, 4, 1, 5, 2, 0, 2, 0, 1, ! 1, 1, 2, 2, 4, 2, 2, 1, 3, 2, ! 2, 2, 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, 6, 3, 5, 2, 1, 1, ! 1, 2, 1, 3, 2, 1, 1, 0, 0, 6, ! 1, 1, 1, 2, 2, 1, 4, 4, 4 }; static const short yydefact[] = { 3, ! 5, 0, 0, 0, 159, 150, 157, 149, 249, 245, ! 247, 0, 0, 0, 437, 0, 489, 493, 0, 0, ! 443, 469, 0, 469, 0, 0, 19, 4, 8, 7, ! 0, 125, 125, 145, 136, 146, 182, 0, 0, 0, ! 158, 0, 9, 439, 440, 438, 441, 162, 442, 6, ! 17, 18, 250, 246, 248, 0, 0, 0, 32, 33, ! 35, 34, 444, 0, 0, 0, 469, 460, 160, 470, ! 469, 161, 0, 0, 244, 297, 0, 0, 170, 126, ! 0, 16, 0, 15, 0, 147, 136, 148, 152, 151, ! 134, 183, 270, 254, 270, 258, 261, 263, 11, 87, ! 88, 108, 59, 60, 0, 0, 0, 0, 36, 38, ! 37, 0, 39, 40, 0, 578, 0, 0, 0, 110, ! 41, 42, 0, 0, 43, 61, 0, 0, 63, 46, ! 48, 89, 107, 0, 0, 103, 104, 105, 106, 295, ! 0, 290, 155, 0, 293, 187, 471, 0, 540, 541, ! 563, 564, 560, 544, 545, 546, 547, 548, 549, 550, ! 551, 552, 553, 554, 555, 556, 557, 558, 559, 561, ! 562, 0, 0, 542, 490, 514, 533, 537, 543, 538, ! 494, 0, 0, 451, 0, 0, 458, 467, 446, 0, ! 0, 0, 12, 0, 0, 31, 0, 429, 0, 0, ! 180, 230, 297, 0, 231, 0, 168, 126, 0, 222, ! 223, 0, 0, 135, 138, 165, 166, 137, 139, 167, ! 0, 0, 0, 251, 0, 255, 0, 259, 57, 58, ! 0, 52, 49, 0, 350, 0, 0, 0, 0, 0, ! 0, 51, 0, 0, 0, 53, 0, 55, 0, 0, ! 80, 78, 76, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 101, 102, 0, 0, 44, ! 0, 109, 111, 0, 346, 338, 0, 50, 163, 293, ! 153, 164, 296, 297, 412, 0, 155, 126, 292, 294, ! 193, 194, 195, 192, 0, 185, 188, 445, 0, 568, ! 0, 517, 535, 516, 0, 539, 0, 517, 469, 0, ! 448, 498, 463, 0, 477, 498, 447, 298, 240, 239, ! 171, 172, 243, 0, 238, 0, 242, 0, 0, 29, ! 0, 358, 117, 359, 179, 181, 0, 0, 14, 0, ! 0, 23, 0, 180, 429, 0, 13, 27, 0, 0, ! 180, 278, 272, 125, 269, 125, 0, 270, 180, 270, ! 287, 288, 266, 285, 0, 0, 93, 92, 0, 577, ! 576, 579, 586, 581, 0, 582, 583, 0, 0, 10, ! 47, 0, 0, 86, 85, 0, 0, 0, 0, 74, ! 75, 73, 72, 71, 69, 70, 64, 65, 66, 67, ! 68, 100, 99, 0, 45, 0, 95, 0, 0, 339, ! 340, 94, 291, 156, 301, 0, 305, 0, 307, 0, ! 154, 0, 412, 0, 0, 187, 44, 0, 0, 0, ! 491, 534, 418, 0, 566, 495, 456, 469, 477, 0, ! 0, 461, 466, 0, 0, 0, 0, 0, 433, 419, ! 125, 125, 431, 0, 420, 422, 430, 0, 241, 333, ! 358, 119, 114, 118, 0, 177, 228, 224, 169, 229, ! 21, 176, 225, 227, 0, 25, 0, 253, 358, 271, ! 358, 279, 0, 257, 0, 0, 267, 0, 266, 0, ! 90, 62, 0, 585, 587, 0, 584, 589, 588, 54, ! 56, 0, 0, 79, 77, 96, 98, 435, 0, 349, ! 318, 348, 358, 358, 358, 358, 0, 327, 0, 359, ! 313, 322, 341, 300, 299, 413, 306, 308, 302, 304, ! 0, 184, 186, 87, 0, 0, 513, 533, 125, 0, ! 522, 518, 520, 0, 0, 536, 420, 0, 0, 453, ! 498, 464, 0, 452, 507, 510, 501, 0, 125, 125, ! 503, 500, 477, 476, 474, 475, 459, 477, 482, 479, ! 125, 125, 0, 468, 173, 417, 293, 293, 414, 415, ! 0, 432, 0, 359, 115, 125, 125, 142, 0, 358, ! 174, 226, 358, 273, 274, 280, 359, 276, 359, 180, ! 180, 289, 286, 180, 0, 0, 0, 0, 569, 0, ! 570, 571, 81, 84, 342, 0, 319, 314, 323, 320, ! 315, 324, 359, 316, 325, 321, 317, 326, 328, 335, ! 336, 303, 189, 0, 191, 567, 515, 526, 293, 527, ! 523, 524, 0, 345, 492, 334, 343, 0, 496, 477, ! 0, 498, 449, 0, 0, 172, 0, 0, 0, 502, ! 0, 0, 483, 483, 478, 237, 297, 412, 126, 180, ! 180, 180, 297, 126, 180, 180, 0, 421, 423, 434, ! 0, 122, 0, 123, 0, 142, 140, 199, 197, 196, ! 178, 359, 0, 359, 358, 180, 0, 252, 256, 262, ! 180, 97, 212, 87, 0, 209, 0, 211, 0, 264, ! 202, 208, 0, 0, 573, 575, 0, 580, 0, 572, ! 0, 436, 336, 347, 159, 0, 0, 0, 0, 0, ! 0, 401, 469, 469, 396, 358, 0, 124, 125, 125, ! 0, 383, 363, 364, 0, 0, 180, 180, 180, 0, ! 528, 344, 351, 565, 0, 457, 0, 498, 508, 511, ! 504, 462, 0, 486, 480, 484, 481, 301, 0, 429, ! 0, 424, 425, 426, 301, 0, 427, 428, 416, 30, ! 0, 0, 141, 144, 143, 0, 0, 175, 0, 281, ! 0, 275, 126, 180, 260, 215, 0, 206, 91, 0, ! 201, 0, 214, 205, 574, 82, 0, 399, 386, 387, ! 388, 0, 0, 0, 402, 0, 359, 384, 131, 0, ! 132, 0, 354, 369, 356, 374, 0, 367, 0, 0, ! 337, 133, 190, 530, 531, 532, 525, 293, 454, 465, ! 0, 0, 0, 488, 0, 0, 235, 236, 232, 234, ! 0, 120, 121, 0, 22, 26, 180, 0, 282, 0, ! 0, 203, 204, 0, 397, 389, 0, 394, 0, 0, ! 0, 129, 216, 0, 130, 219, 0, 0, 336, 0, ! 0, 0, 353, 358, 352, 373, 0, 385, 529, 498, ! 450, 506, 505, 509, 512, 487, 485, 233, 198, 284, ! 180, 210, 207, 0, 395, 0, 180, 127, 0, 128, ! 0, 0, 0, 0, 403, 0, 368, 336, 337, 360, ! 358, 0, 0, 283, 398, 405, 0, 400, 217, 220, ! 0, 0, 357, 404, 382, 375, 0, 379, 366, 362, ! 361, 0, 455, 0, 0, 406, 407, 390, 358, 358, ! 355, 370, 403, 381, 336, 372, 0, 405, 0, 0, ! 359, 359, 336, 0, 380, 0, 0, 391, 408, 0, ! 0, 371, 376, 409, 0, 0, 218, 221, 403, 410, ! 0, 392, 0, 0, 0, 377, 393, 411, 336, 378, 0, 0, 0 }; ! static const short yydefgoto[] = { 991, ! 1, 2, 3, 28, 29, 30, 343, 590, 349, 593, ! 200, 461, 707, 123, 236, 404, 125, 126, 127, 128, ! 129, 130, 389, 388, 386, 721, 387, 131, 607, 132, ! 133, 330, 331, 332, 585, 511, 31, 341, 738, 451, ! 91, 586, 687, 452, 34, 142, 281, 35, 218, 206, ! 78, 201, 207, 693, 79, 589, 335, 336, 37, 295, ! 296, 297, 691, 786, 709, 710, 711, 861, 712, 797, ! 713, 714, 872, 909, 949, 875, 911, 950, 322, 210, ! 747, 211, 38, 39, 40, 41, 358, 360, 365, 227, ! 801, 488, 222, 223, 355, 595, 596, 363, 364, 144, ! 280, 749, 145, 191, 290, 512, 513, 514, 515, 516, ! 517, 333, 276, 724, 884, 888, 409, 410, 411, 645, ! 646, 277, 519, 134, 647, 828, 829, 877, 830, 879, ! 334, 465, 919, 885, 920, 921, 831, 918, 878, 963, ! 880, 953, 979, 989, 955, 936, 743, 744, 816, 937, ! 945, 946, 947, 981, 417, 418, 453, 677, 454, 455, ! 456, 325, 326, 457, 458, 509, 135, 43, 64, 44, ! 45, 46, 439, 758, 312, 650, 890, 551, 315, 563, ! 652, 47, 316, 69, 48, 444, 568, 445, 573, 765, ! 766, 49, 65, 302, 545, 66, 308, 549, 440, 441, ! 561, 659, 894, 562, 654, 842, 655, 843, 175, 431, ! 542, 543, 544, 750, 751, 304, 433, 176, 177, 178, ! 179, 180, 610, 611, 716, 612, 372, 136, 238, 493, ! 375, 376, 377, 137, 138, 139 }; ! static const short yypact[] = { 125, ! 133, 3136, 3136, 330,-32768,-32768,-32768,-32768, 119, 119, ! 119, 96, 124, 127,-32768, 283,-32768,-32768, 283, 283, ! -32768, 130, 283, 130, 283, 283,-32768,-32768,-32768,-32768, ! 395, 115, 777, 104,-32768, 119,-32768, 247, 272, 279, ! -32768, 3136,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768, 119, 119, 119, 2825, 2651, 135,-32768,-32768, ! -32768,-32768,-32768, 41, 3433, 3433, 58, 38,-32768,-32768, ! 130,-32768, 211, 283,-32768,-32768, 395, 235,-32768, 119, ! 1812,-32768, 616,-32768, 395, 104,-32768, 119,-32768,-32768, ! 900,-32768, 138, 140, 138, 143,-32768, 149,-32768,-32768, ! -32768,-32768,-32768,-32768, 2825, 2825, 175, 283,-32768,-32768, ! -32768, 2825,-32768,-32768, 1293,-32768, 178, 186, 194,-32768, ! -32768,-32768, 2825, 197, 204,-32768, 2883, 2941,-32768, 3776, ! 648, 265, 245, 934, 2825,-32768,-32768,-32768,-32768,-32768, ! 293,-32768,-32768, 314, 3565, 109,-32768, 283,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768, 275, 3664,-32768,-32768,-32768, 2529, 321,-32768,-32768, ! -32768, 283, 283, 327, 283, 283,-32768,-32768,-32768, 311, ! 92, 201,-32768, 616, 395,-32768, 337,-32768, 1981, 475, ! 119,-32768,-32768, 616,-32768, 357,-32768, 119, 766, 365, ! 520, 384, 1842, 900,-32768,-32768,-32768,-32768, 119,-32768, ! 360, 354, 1739,-32768, 366,-32768, 328,-32768,-32768,-32768, ! 2825,-32768,-32768, 359,-32768, 370, 387, 2709, 3465, 3664, ! 283,-32768, 383, 2825, 1293,-32768, 1293,-32768, 2825, 2825, ! 430,-32768,-32768, 2825, 2825, 2825, 2825, 2825, 2825, 2825, ! 2825, 2825, 2825, 2825, 2825,-32768,-32768, 283, 283, 2825, ! 2825,-32768,-32768, 398,-32768, 468, 404,-32768,-32768, 237, ! 630,-32768,-32768,-32768, 237, 2044,-32768, 119,-32768, 526, ! -32768,-32768,-32768,-32768, 226,-32768, 448,-32768, 3664,-32768, ! 434, 427, 509,-32768, 321,-32768, 306, 427, 130, 447, ! -32768, 458, 446, 459,-32768, 458,-32768,-32768, 520,-32768, ! -32768, 525, 520, 548,-32768, 3269,-32768, 460, 478,-32768, ! 1925, 83,-32768,-32768, 530, 119, 453, 264,-32768, 616, ! 616,-32768, 475, 119,-32768, 2107,-32768,-32768, 475, 505, ! 119,-32768,-32768,-32768, 504, 3110, 3367, 138, 119, 138, ! -32768, 562, 519,-32768, 328, 3711,-32768,-32768, 2445,-32768, ! -32768,-32768,-32768, 564, 529, 3465,-32768, 532, 554,-32768, ! 3776, 560, 567, 3776, 3776, 2825, 576, 2825, 2825, 1781, ! 1374, 1264, 840, 1195, 669, 669, 280, 280,-32768,-32768, ! -32768,-32768,-32768, 569, 204, 573,-32768, 283, 1024, 468, ! -32768,-32768,-32768,-32768, 312, 346,-32768, 3316,-32768, 575, ! 630, 237,-32768, 2170, 574, 109, 2999, 585, 3507, 1873, ! -32768,-32768, 3593, 3664,-32768,-32768, 570, 130,-32768, 599, ! 3215,-32768,-32768, 420, 3080, 604, 95, 593,-32768,-32768, ! -32768, 3604,-32768, 595, 389,-32768,-32768, 267,-32768,-32768, ! -32768,-32768,-32768,-32768, 3644,-32768, 365,-32768,-32768, 365, ! -32768, 647,-32768,-32768, 602,-32768, 614,-32768,-32768,-32768, ! -32768,-32768, 613,-32768, 617, 2825, 283, 620, 519, 3664, ! -32768,-32768, 3539,-32768,-32768, 564,-32768,-32768,-32768, 612, ! 612, 658, 2825, 1538, 1616,-32768,-32768,-32768, 405, 478, ! -32768,-32768, 72, 78, 86, 88, 712,-32768, 632,-32768, ! -32768,-32768,-32768, 526,-32768,-32768,-32768, 526,-32768,-32768, ! 649,-32768,-32768, 282, 639, 283,-32768, 2529, 656, 2580, ! -32768,-32768, 3604, 1950, 81,-32768, 653, 659, 81,-32768, ! 458,-32768, 424,-32768,-32768,-32768,-32768, 395, 115, 777, ! 368,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768, 3677, 661,-32768,-32768,-32768, 1061, 353,-32768,-32768, ! 3633,-32768, 743,-32768,-32768, 672, 3348,-32768, 1649,-32768, ! -32768,-32768,-32768,-32768, 665,-32768,-32768, 665,-32768, 119, ! 119, 3776,-32768, 119, 674, 678, 1402, 2825, 717, 667, ! 3539,-32768,-32768, 1455,-32768, 283,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! 2318,-32768,-32768, 2825,-32768,-32768,-32768,-32768, 1061,-32768, ! -32768,-32768, 677,-32768,-32768, 682,-32768, 283,-32768,-32768, ! 698, 458,-32768, 3433, 3433, 189, 616, 395, 3235,-32768, ! 449, 3097, 538, 538,-32768,-32768,-32768, 353, 119, 192, ! 240, 119,-32768, 119, 240, 119, 3316,-32768,-32768,-32768, ! 81,-32768, 616,-32768, 395,-32768, 1155,-32768,-32768, 3776, ! -32768,-32768, 1649,-32768,-32768, 758, 758,-32768,-32768,-32768, ! 119,-32768,-32768, 724, 283,-32768, 744, 3776, 703, 702, ! -32768,-32768, 36, 1570, 204,-32768, 2825,-32768, 717,-32768, ! 2825,-32768, 2387,-32768, 750, 2825, 753, 716, 718, 2767, ! 441, 791, 336, 382,-32768,-32768, 722,-32768, 730, 3329, ! 606,-32768,-32768,-32768, 2569, 304, 192, 240, 119, 428, ! -32768,-32768,-32768,-32768, 492,-32768, 747, 458,-32768,-32768, ! -32768,-32768, 2825, 774, 733,-32768, 733, 857, 1061,-32768, ! 2233,-32768,-32768,-32768, 342, 353,-32768,-32768,-32768,-32768, ! 445, 452, 1155,-32768,-32768, 1402, 81,-32768, 81,-32768, ! 2825,-32768, 191, 146,-32768,-32768, 1402,-32768,-32768, 1486, ! -32768, 1728,-32768,-32768,-32768, 1455, 1343,-32768,-32768,-32768, ! -32768, 738, 2825, 742,-32768, 761,-32768,-32768,-32768, 616, ! -32768, 395,-32768,-32768,-32768,-32768, 764, 814, 1119, 57, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768, 1061,-32768,-32768, ! 769, 59, 59, 3776, 2825, 538, 588, 588,-32768,-32768, ! 746,-32768,-32768, 757,-32768,-32768, 3738, 2825,-32768, 759, ! 1728,-32768,-32768, 2825,-32768,-32768, 763,-32768, 2825, 798, ! 463,-32768, 488, 486,-32768, 663, 782, 787,-32768, 800, ! 2825, 1209,-32768,-32768,-32768,-32768, 2825,-32768,-32768, 458, ! -32768,-32768,-32768,-32768,-32768, 3776,-32768,-32768,-32768,-32768, ! 3738,-32768,-32768, 3758,-32768, 39, 119,-32768, 475,-32768, ! 475, 2825, 2825, 837, 2569, 785,-32768,-32768,-32768,-32768, ! -32768, 786, 802,-32768,-32768, 861, 805,-32768,-32768,-32768, ! 822, 828,-32768,-32768,-32768,-32768, 829,-32768,-32768,-32768, ! -32768, 835,-32768, 846, 50, 833,-32768,-32768,-32768,-32768, ! -32768,-32768, 2825,-32768,-32768,-32768, 2825, 861, 841, 861, ! -32768,-32768,-32768, 845,-32768, 847, 54,-32768,-32768, 677, ! 677,-32768,-32768,-32768, 548, 850,-32768,-32768, 2825, 265, ! 323,-32768, 848, 851, 548,-32768,-32768, 265,-32768,-32768, ! 933, 936,-32768 }; static const short yypgoto[] = {-32768, ! -32768,-32768,-32768, 102, -388,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768, 112,-32768, -56, 507, -244, 422,-32768,-32768, ! -67, 618,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -299, ! -32768, -306, 638,-32768,-32768, 116, 145, -52, -690, 2, ! 863,-32768, 258, 10, -6, -201, 684, 148, -273, -621, ! -70, -193, -123,-32768,-32768,-32768, 228, 0, -19,-32768, ! 546,-32768, 281,-32768, -680,-32768, 173,-32768, -660,-32768, ! -32768, 266,-32768,-32768,-32768,-32768,-32768,-32768, -69, -118, ! -526, 33,-32768,-32768,-32768, -42,-32768,-32768,-32768,-32768, ! -32768, 491, -45,-32768, 625, 503, 290, 624, 508, -37, ! -32768, -115, -191, -182, -213,-32768,-32768,-32768,-32768,-32768, ! -32768, -256,-32768,-32768, -566, 71,-32768,-32768, 581, -475, ! -32768, 348,-32768,-32768, -584,-32768,-32768,-32768,-32768,-32768, ! -268, -426, 75, -771, -352, -282,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -856, ! 42,-32768, 43,-32768, 578,-32768, -370,-32768, 566, 579, ! 433, -316,-32768,-32768,-32768,-32768, 4,-32768, 983,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768, -1, -4, -351,-32768, 443,-32768, 355, ! 177,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -292,-32768, ! -32768,-32768, 181, 465,-32768,-32768,-32768,-32768, -47, 713, ! -32768,-32768, 497,-32768, 196, 518,-32768, 631, 633, -136, ! -32768, -137,-32768,-32768, 344, 455,-32768,-32768,-32768,-32768, ! -32768,-32768, 687,-32768,-32768,-32768 }; ! #define YYLAST 3832 ! static const short yytable[] = { 124, ! 141, 36, 36, 32, 32, 42, 42, 414, 53, 54, ! 55, 33, 33, 209, 212, 344, 92, 70, 181, 70, ! 337, 354, 72, 446, 447, 405, 86, 195, 473, 289, ! 80, 356, 88, 92, 92, 92, 471, 229, 230, 306, ! 305, 36, 476, 32, 233, 42, 742, 526, 220, 225, ! 670, 33, 557, 804, 832, 242, 521, 886, 752, 892, ! 92, 781, 70, 81, 741, 184, 70, 278, 92, 188, ! 321, 416, -329, 649, 462, 802, 80, 237, -330, 185, ! 926, 643, 208, -113, 80, 338, -331, 553, -332, 147, ! 219, 958, 463, 631, 75, 975, 964, 705, 318, 182, ! 186, 415, 374, 272, 50, 854, 16, 914, 89, 192, ! 90, 59, 60, 291, 292, 293, 860, 213, 927, 887, ! 183, 14, 983, 187, -1, 148, 522, 63, 344, 959, ! 67, 68, -2, 976, 71, 301, 63, 74, 742, 893, ! 520, 863, 328, 99, 288, 76, 939, 414, 14, 94, ! 96, 98, 518, -309, 77, 354, 741, 681, 56, -310, ! 618, 621, 624, 627, 413, 356, 644, -311, -113, -312, ! 696, 220, 697, 541, 575, 14, 83, 85, 16, 61, ! 87, 371, 405, 965, 62, 190, 57, 858, 92, 58, ! 80, 972, 584, 208, 80, 82, 723, 146, 871, 92, ! 903, 524, 378, 208, 143, 780, 221, 382, 528, 383, ! 597, 661, 599, 219, 406, 197, 469, 990, 467, 232, ! 14, 14, 470, 319, 935, 224, 357, 323, 226, 420, ! 619, 622, 625, 628, 228, 422, 192, 231, 220, 496, ! 239, 847, 848, 571, 520, 520, 623, 520, 240, 59, ! 60, 198, 199, 572, 770, 771, 241, 294, 651, 298, ! 629, 428, 143, 198, 199, 787, 14, 789, 92, 14, ! 761, -181, -181, 272, 59, 60, 243, 59, 60, 288, ! 320, 59, 60, 300, 288, 59, 60, 642, 244, 475, ! 284, 189, 287, 309, 310, 148, 313, 314, 755, 285, ! 286, 492, 198, 199, 70, 425, 779, 437, 59, 60, ! 426, 855, 483, 856, 485, 193, 92, 61, 318, 194, ! 143, 692, 62, 273, 694, 36, 345, 346, 361, 502, ! 59, 60, 93, 263, 264, 265, 208, 299, 362, 208, ! 208, 14, 61, 468, 75, 61, 582, 62, 318, 61, ! 62, 583, 379, 61, 62, 75, 609, 95, 62, 757, ! 357, 633, 307, 715, 97, 284, 634, 531, 434, 319, ! 143, 14, 279, 323, 285, 286, 61, -35, 220, 402, ! 403, 62, 14, 833, 16, 977, 978, 143, 244, 746, ! 870, 317, 143, 282, 143, 673, 548, 75, 61, 324, ! 306, 305, 984, 62, 668, 286, 673, 985, 423, 424, ! 51, 52, 311, 785, 288, 668, 286, 36, 435, 555, ! 556, 288, 350, -34, 14, 525, 599, 345, 346, 36, ! 16, 539, 36, 70, -499, 351, 552, 339, 367, 540, ! 36, 340, 559, 59, 60, 86, 143, 359, 76, 368, ! 560, 88, 606, 849, 416, 75, 202, 77, 587, 318, ! 571, 672, 676, 380, 347, 841, 369, 817, 194, 580, ! 572, -83, 715, 581, 719, 329, 362, 407, -358, -358, ! -358, -358, 14, 412, 768, 615, -358, -358, -358, 616, ! 775, 564, 565, 566, 813, 564, 565, 566, 479, 408, ! 481, 567, -358, 287, 143, 653, 203, 430, 837, 785, ! 427, 61, 838, 429, 197, 204, 62, -172, 432, 508, ! 564, 565, 566, -358, -497, 852, 438, -172, 205, 340, ! 762, 442, 853, 86, 970, 971, 194, 294, 443, 88, ! 75, 202, 36, 908, 539, -358, 459, 340, 246, 248, ! -358, 197, 540, 86, 524, 528, 102, 80, 460, 88, ! -112, 524, 528, 564, 565, 566, 910, 14, -172, 466, ! 194, 472, -172, 839, 737, 477, 669, 674, 478, 763, ! 36, 143, 198, 199, 480, 558, 484, 212, 423, 424, ! 656, 203, 143, 764, 764, 577, 578, 923, 362, 87, ! 204, 486, 929, 487, 930, 494, 759, 760, 495, 671, ! 675, 498, 588, 205, 782, 623, 769, 503, 75, 202, ! 823, 776, 824, 825, 826, 827, 794, 794, 617, 620, ! 36, 626, 739, 499, 745, 216, 217, 143, 669, 500, ! 740, 9, 10, 11, 220, 14, 501, 636, 506, 92, ! 770, 771, 623, 532, 92, 550, 208, 80, 36, 507, ! 559, 527, 208, 208, 536, 554, 737, 674, 560, 203, ! 574, 748, 576, 812, 579, 980, 36, 278, 204, 344, ! 961, 962, 208, 639, 80, 988, 591, 87, 592, 197, ! 656, 205, -172, 594, 600, 793, 208, 491, 601, 613, ! 192, 604, -172, 657, 658, 266, 267, 87, 268, 269, ! 270, 271, 329, 630, 851, 663, 664, 656, 635, 287, ! 261, 262, 263, 264, 265, 198, 199, 722, 70, 70, ! 683, 685, 72, 86, 686, 632, 638, 581, 648, 88, ! 220, 665, 736, -172, 36, 680, 739, -172, 745, 695, ! 873, 874, 682, 718, 740, 701, 867, 702, 717, 754, ! 75, 202, 644, 275, 756, -32, 342, 669, 669, -20, ! -20, -20, -20, 92, 674, 674, 764, -20, -20, -20, ! 5, 6, 7, 8, 799, 798, 800, 14, 9, 10, ! 11, -33, 197, -20, 808, -172, 809, 815, 810, 791, ! 319, 323, 818, 558, 13, -172, 14, 319, 323, 143, ! 819, 203, 906, 840, -20, 845, 796, 846, 866, 208, ! 204, 80, 868, 869, 916, 16, 881, 698, 699, 882, ! 922, 700, 898, 205, 736, 891, -20, 669, 899, 907, ! 902, -20, 814, 905, 912, 208, -172, 22, 366, 913, ! -172, -20, 24, 933, 876, 931, 932, 84, 934, 75, ! 666, 381, 915, 318, 938, 942, 384, 385, 943, 944, ! 748, 390, 391, 392, 393, 394, 395, 396, 397, 398, ! 399, 400, 401, 820, 822, 948, 14, 87, 258, 259, ! 260, 261, 262, 263, 264, 265, 934, 772, 773, 774, ! 966, 951, 777, 778, 215, 216, 217, 952, 957, 954, ! 667, 9, 10, 11, 36, 956, 739, 960, 745, 668, ! 286, 968, 934, 792, 740, 973, 974, 986, 795, 14, ! 982, 987, 992, 535, 274, 993, -334, -334, -334, -334, ! -334, -334, -334, 783, -334, -334, -334, -334, -334, 214, ! -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, ! -334, -334, -334, -334, -334, -334, -334, -334, -334, 464, ! 421, 533, 862, 788, 834, 835, 836, -334, 803, 605, ! -334, 482, -334, 598, 790, -334, -334, -334, 489, 940, ! 523, -334, -334, 753, 603, 941, -334, -334, 546, 967, ! 529, -334, 969, -334, -334, 504, 505, 73, -334, -334, ! 662, 547, -334, 679, -334, 275, -334, -334, 767, -334, ! 436, 859, 897, 895, 510, 660, -358, -358, -358, -358, ! -358, -358, -358, 889, -358, -358, -358, -358, -358, 641, ! -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, ! -358, -358, -358, -358, -358, 637, -358, -358, -358, 537, ! 805, 538, 497, 75, 666, 720, 0, -358, 0, 0, ! -358, 0, -358, 0, 0, -358, -358, -358, 0, 0, ! 0, -358, -358, 0, 900, 0, -358, -358, 0, 0, ! 14, -358, 0, -358, -358, 0, 0, 0, -358, -358, ! 0, 0, -358, 602, -358, 0, -358, -358, 0, -358, ! 0, 0, 0, 0, 667, 0, 0, 0, 0, 883, ! 614, -336, -336, 668, 286, 0, -336, -336, 924, -336, ! 0, 0, 0, -336, 928, -336, -336, -336, -336, -336, ! -336, -336, -336, -336, -336, -336, 0, -336, 0, -336, ! 0, -336, -336, -336, 0, 0, 0, 0, 0, 784, ! 216, 217, -336, 0, 0, -336, 9, 10, 11, 0, ! -336, -336, -336, 0, 0, 0, -336, -336, 0, 0, ! 0, -336, -336, 0, 0, 0, -336, 0, -336, -336, ! 0, 0, 0, -336, -336, 0, 0, -336, 0, -336, ! 0, -336, -336, 0, -336, 0, 690, 0, 0, 917, ! 0, -365, -365, 0, 0, 0, -365, -365, 0, -365, ! 0, 0, 0, -365, 708, -365, -365, -365, -365, -365, ! -365, -365, -365, -365, -365, -365, 0, -365, 0, -365, ! 0, -365, -365, -365, 259, 260, 261, 262, 263, 264, ! 265, 0, -365, 0, 0, -365, 0, 0, 0, 0, ! -365, -365, -365, 0, 0, 0, -365, -365, 0, 0, ! 0, -365, -365, 0, 0, 0, -365, 0, -365, -365, ! 0, 0, 0, -365, -365, 0, 0, -365, 0, -365, ! 0, -365, -365, 234, -365, 100, 5, 0, 7, 140, ! 101, 102, 0, 103, 9, 10, 11, 0, 0, 0, ! 690, 257, 258, 259, 260, 261, 262, 263, 264, 265, ! 13, 104, 0, 15, 0, 105, 106, 107, 0, 0, ! 0, 708, 0, 0, 0, 0, 108, 0, 806, 109, ! 0, 16, 0, 807, 110, 111, 112, 0, 0, 0, ! 113, 114, 864, 0, 0, 115, 116, 0, 0, 0, ! 117, 0, 118, 22, 0, 0, 0, 119, 24, 0, ! 0, 120, 0, 0, 0, 121, 122, 0, 235, 0, ! 844, 249, 250, 251, 865, 252, 253, 254, 255, 256, ! 257, 258, 259, 260, 261, 262, 263, 264, 265, 0, ! 0, 0, 703, 708, 704, 60, 0, 0, 857, 101, ! 102, 0, 103, 0, 708, 0, 0, 708, 0, 708, ! 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, ! 104, 0, 15, 0, 105, 106, 107, 0, 0, 0, ! 0, 0, 0, 0, 0, 108, 0, 0, 109, 0, ! 0, 0, 0, 110, 111, 112, 0, 0, 0, 113, ! 114, 0, 896, 705, 115, 116, 0, 0, 0, 117, ! 0, 118, 61, 0, 0, 901, 119, 62, 708, 0, ! 120, 904, 0, -200, 121, 122, 703, 706, 704, 60, ! 0, 0, 0, 101, 102, 251, 103, 252, 253, 254, ! 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, ! 265, 0, 0, 0, 104, 0, 15, 0, 105, 106, ! 107, 0, 0, 0, 0, 0, 0, 0, 0, 108, ! 0, 0, 109, 0, 0, 0, 0, 110, 111, 112, ! 0, 0, 0, 113, 114, 0, 0, 705, 115, 116, ! 0, 0, 0, 117, 0, 118, 61, 0, 0, 0, ! 119, 62, 0, 0, 120, 0, 0, -265, 121, 122, ! 703, 706, 100, 0, 0, 0, 0, 101, 102, 0, ! 103, 253, 254, 255, 256, 257, 258, 259, 260, 261, ! 262, 263, 264, 265, 0, 0, 0, 0, 104, 0, ! 15, 0, 105, 106, 107, 0, 0, 0, 0, -213, ! 0, 0, 0, 108, 0, 0, 109, 0, 0, 0, ! 0, 110, 111, 112, 0, 0, 0, 113, 114, 0, ! 0, -213, 115, 116, 0, 0, 0, 117, 0, 118, ! 0, 0, 0, 0, 119, 0, 0, 0, 120, 688, ! 0, 100, 121, 122, 0, 706, 101, 102, 0, 103, ! 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, ! 264, 265, 0, 0, 0, 0, 0, 104, 0, 15, ! 0, 105, 106, 107, 0, 0, 0, 0, 0, 0, ! 0, 0, 108, 0, 0, 109, 0, 0, 0, 0, ! 110, 111, 112, 0, 0, 0, 113, 114, 0, 0, ! 0, 115, 116, 0, 0, 0, 117, 0, 118, 0, ! 0, 0, 0, 119, 0, 0, 0, 120, 703, 0, ! 100, 121, 122, 0, 689, 101, 102, 0, 103, 352, ! 0, 0, 5, 0, 7, 140, 0, 0, 0, 0, ! 9, 10, 11, 0, 0, 0, 104, 0, 15, 0, ! 105, 106, 107, 0, 0, 0, 13, 0, 0, 15, ! 0, 108, 0, 0, 109, 0, 0, 0, 0, 110, ! 111, 112, 0, 0, 0, 113, 114, 16, 0, 0, ! 115, 116, 0, 0, 0, 117, 0, 118, 0, 0, ! 0, 0, 119, 0, 0, 0, 120, 0, 0, 22, ! 121, 122, 196, 706, 24, -28, -28, -28, -28, 353, ! -268, 0, 0, -28, -28, -28, 255, 256, 257, 258, ! 259, 260, 261, 262, 263, 264, 265, 0, 197, -28, ! 0, -172, 348, 0, 0, -24, -24, -24, -24, 0, ! 0, -172, 0, -24, -24, -24, 0, 0, 0, 0, ! -28, 0, 0, 0, 0, 0, 0, 0, 197, -24, ! 0, -172, 0, 329, 198, 199, 5, 6, 7, 8, ! 0, -172, -28, 0, 9, 10, 11, -28, 0, 0, ! -24, 0, -172, 0, 0, 0, -172, -28, 0, 0, ! 13, 0, 14, 0, 198, 199, 0, 0, 0, 0, ! 0, 0, -24, 0, 0, 0, 0, -24, 0, 0, ! 0, 16, -172, 0, 0, 329, -172, -24, -116, -116, ! -116, -116, 0, 0, -116, 0, -116, -116, -116, 0, ! 0, 0, 0, 22, 0, 0, 0, 0, 24, 0, ! 329, 0, -116, -521, -521, -521, -521, 0, -519, 0, ! 0, -521, -521, -521, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, -116, 0, 0, 0, -521, 0, -521, ! 0, 0, 0, 100, 0, 0, 0, 0, 101, 102, ! 0, 103, 0, 0, 0, -116, 0, 0, -521, 0, ! -116, 0, 0, 0, 0, 0, 0, 0, 0, 104, ! -116, 15, 0, 105, 106, 107, 0, 0, 0, 0, ! -521, 0, 0, 0, 108, -521, 0, 109, 0, 0, ! 0, 0, 110, 111, 112, -521, 0, 0, 113, 114, ! 0, 0, 0, 115, 116, 0, 100, 0, 117, 0, ! 118, 101, 102, 0, 103, 119, 0, 0, 0, 120, ! 0, 0, 0, 121, 122, 0, 0, 327, 0, 0, ! 0, 0, 104, 0, 15, 0, 105, 106, 107, 0, ! 0, 0, 0, 0, 0, 0, 0, 108, 0, 0, ! 109, 0, 0, 0, 0, 110, 111, 112, 0, 0, ! 0, 113, 114, 0, 0, 0, 115, 116, 0, 100, ! 0, 117, 0, 118, 101, 102, 0, 103, 119, 0, ! 0, 0, 120, 0, 0, 0, 121, 122, 0, 0, ! 419, 0, 0, 0, 0, 104, 0, 15, 0, 105, ! 106, 107, 0, 0, 0, 0, 0, 0, 0, 0, ! 108, 0, 0, 109, 0, 0, 0, 0, 110, 111, ! 112, 0, 0, 0, 113, 114, 0, 0, 0, 115, ! 116, 0, 100, 0, 117, 0, 118, 101, 102, 0, ! 103, 119, 0, 0, 0, 120, 0, 0, 0, 121, ! 122, 0, 0, 474, 0, 0, 0, 0, 104, 0, ! 15, 0, 105, 106, 107, 0, 0, 0, 0, 0, ! 0, 0, 0, 108, 0, 0, 109, 0, 0, 0, ! 0, 110, 111, 112, 0, 0, 0, 113, 114, 0, ! 0, 0, 115, 116, 0, 100, 0, 117, 0, 118, ! 101, 102, 0, 103, 119, 0, 0, 0, 120, 0, ! 0, 0, 121, 122, 0, 0, 530, 0, 0, 0, ! 0, 104, 0, 15, 0, 105, 106, 107, 0, 0, ! 0, 0, 0, 0, 0, 0, 108, 0, 0, 109, ! 0, 0, 0, 0, 110, 111, 112, 0, 0, 0, ! 113, 114, 0, 0, 0, 115, 116, 0, 0, 0, ! 117, 0, 118, 0, 0, 0, 0, 119, 0, 0, ! 0, 120, 0, 0, 0, 121, 122, 0, 0, 850, ! 704, 725, 6, 7, 8, 101, 102, 0, 103, 9, ! 10, 11, 0, 0, 0, 0, 0, 0, 726, 727, ! 728, 729, 730, 731, 732, 13, 104, 14, 15, 0, ! 105, 106, 107, 0, 0, 0, 0, 0, 0, 0, ! 0, 108, 0, 0, 109, 0, 16, 0, 0, 110, ! 111, 112, 0, 0, 0, 113, 114, 0, 0, 0, ! 115, 116, 0, 0, 0, 117, 0, 118, 733, 704, ! 60, 0, 119, 734, 101, 102, 120, 103, 735, 0, ! 121, 122, 0, 644, 0, 0, 0, 726, 727, 728, ! 729, 730, 731, 732, 0, 104, 0, 15, 0, 105, ! 106, 107, 0, 0, 0, 0, 0, 0, 0, 0, ! 108, 0, 0, 109, 0, 0, 0, 0, 110, 111, ! 112, 0, 0, 0, 113, 114, 0, 100, 0, 115, ! 116, 0, 101, 102, 117, 103, 118, 61, 0, 0, ! 0, 119, 62, 0, 0, 120, 0, 735, 0, 121, ! 122, 0, 644, 104, 0, 15, 0, 105, 106, 107, ! 0, 0, 0, 0, 0, 0, 0, 0, 108, 0, ! 0, 109, 0, 0, 0, 0, 110, 111, 112, 0, ! 0, 0, 113, 114, 0, 0, 0, 115, 116, 0, ! 0, 0, 117, 0, 118, 0, 0, 0, 0, 119, ! 0, 0, 0, 120, 0, 0, 0, 121, 122, 0, ! 491, 149, 150, 0, 151, 152, 0, 0, 0, 153, ! 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, ! 164, 165, 166, 167, 168, 169, 170, 171, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 172, 100, 5, 6, 7, 8, 101, 102, 0, 103, ! 9, 10, 11, 5, 6, 7, 8, 0, 0, 0, ! 0, 9, 10, 11, 0, 0, 13, 104, 14, 15, ! 0, 105, 106, 107, 174, 0, 0, 13, 0, 14, ! 0, 0, 108, 303, 0, 109, 0, 16, 0, 0, ! 110, 111, 112, 0, 0, 0, 113, 114, 16, 0, ! 0, 115, 116, 0, 0, 0, 117, 0, 118, 22, ! 0, 0, 0, 119, 24, 0, 0, 120, 0, 0, ! 22, 121, 122, 100, 5, 24, 7, 140, 101, 102, ! 640, 103, 9, 10, 11, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 13, 104, ! 0, 15, 0, 105, 106, 107, 0, 0, 0, 0, ! 0, 0, 0, 0, 108, 0, 0, 109, 0, 16, ! 0, 0, 110, 111, 112, 0, 0, 0, 113, 114, ! 0, 100, 0, 115, 116, 0, 101, 102, 117, 103, ! 118, 22, 0, 0, 0, 119, 24, 0, 0, 120, ! 0, 0, 0, 121, 122, 0, 0, 104, 0, 15, ! 0, 105, 106, 107, 0, 0, 0, 0, 0, 0, ! 0, 0, 108, 0, 0, 109, 0, 0, 0, 0, ! 110, 111, 112, 0, 0, 0, 113, 114, 0, 100, ! 0, 115, 116, 0, 101, 102, 117, 103, 118, 370, ! 0, 0, 0, 119, 0, 0, 0, 120, 0, 0, ! 0, 121, 122, 0, 0, 104, 0, 15, 0, 105, ! 106, 107, 0, 0, 0, 0, 0, 0, 0, 0, ! 108, 0, 0, 109, 0, 0, 0, 0, 110, 111, ! 112, 0, 0, 0, 113, 114, 0, 100, 0, 115, ! 116, 0, 101, 102, 117, 103, 118, 0, 0, 0, ! 0, 119, 0, 0, 0, 120, 0, 811, 0, 121, ! 122, 0, 0, 104, 0, 15, 0, 105, 106, 107, ! 0, 0, 0, 0, 0, 0, 0, 0, 108, 0, ! 0, 109, 0, 0, 0, 0, 110, 111, 112, 0, ! 0, 0, 113, 114, 0, 100, 0, 115, 116, 0, ! 101, 102, 117, 103, 118, 0, 0, 0, 0, 119, ! 0, 0, 0, 120, 0, 0, 0, 121, 122, 0, ! 0, 104, 0, 15, 0, 105, 106, 107, 0, 0, ! 0, 0, 0, 0, 0, 0, 108, 0, 0, 109, ! 0, 0, 0, 0, 110, 111, 112, 0, 0, 0, ! 113, 114, 0, 100, 0, 245, 116, 0, 101, 102, ! 117, 103, 118, 0, 0, 0, 0, 119, 0, 0, ! 0, 120, 0, 0, 0, 121, 122, 0, 0, 104, ! 0, 15, 0, 105, 106, 107, 0, 0, 0, 0, ! 0, 0, 0, 0, 108, 0, 0, 109, 0, 0, ! 0, 0, 110, 111, 112, 0, 0, 0, 113, 114, ! 0, 534, 0, 247, 116, 0, 101, 102, 117, 103, ! 118, 0, 0, 0, 0, 119, 0, 0, 0, 120, ! 0, 0, 0, 121, 122, 0, 0, 104, 0, 15, ! 0, 105, 106, 107, 0, 0, 0, 0, 0, 0, ! 0, 0, 108, 0, 0, 109, 0, 0, 0, 0, ! 110, 111, 112, 0, 0, 0, 113, 114, 0, 0, ! 0, 115, 116, 0, 0, 0, 117, 0, 118, 0, ! 0, 0, 0, 119, 0, 0, 0, 120, 0, 0, ! 569, 121, 122, 5, 0, 7, 140, 0, 0, 0, ! 0, 9, 10, 11, 0, 0, 0, 569, 0, 0, ! 5, 0, 7, 140, 0, 0, 0, 13, 9, 10, ! 11, 0, 0, 5, 0, 7, 283, 0, 0, 0, ! 0, 9, 10, 11, 13, 0, 0, 0, 16, 0, ! 0, 0, 0, 0, 0, 0, 4, 13, -125, 5, ! 6, 7, 8, 0, 0, 16, 0, 9, 10, 11, ! 22, -473, -473, -473, 0, 24, 0, 0, 16, 0, ! 570, -473, 12, 13, 0, 14, 15, 22, -472, -472, ! -472, 0, 24, 0, 0, 0, 0, 570, -472, 0, ! 22, 0, 0, 0, 16, 24, 0, 17, 18, -125, ! -277, -277, 0, 0, 0, 0, 0, 0, -125, 0, ! 19, 20, 21, 0, 0, 0, 22, 0, 0, 0, ! 23, 24, 25, 26, 0, 4, 27, -125, 5, 6, ! 7, 8, 0, 0, 0, 0, 9, 10, 11, 0, ! 0, 0, 0, 0, 0, 4, 0, -125, 5, 6, ! 7, 8, 13, 0, 14, 0, 9, 10, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 13, 16, 14, 0, 555, 556, -125, 448, ! 0, 449, 5, 6, 7, 8, 0, -125, 450, 0, ! 9, 10, 11, 16, 0, 22, 0, 0, -125, 0, ! 24, 0, 0, 0, 0, 27, 13, -125, 14, 0, ! 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, ! 24, 0, 0, 0, 0, 27, 448, 16, 0, 5, ! 6, 7, 8, 0, 0, 450, 0, 9, 10, 11, ! 0, 0, 5, 6, 7, 8, 0, 0, 0, 22, ! 9, 10, 11, 13, 24, 14, 0, 0, -418, 0, ! 0, 5, 89, 7, 90, 0, 13, 0, 14, 9, ! 10, 11, 0, 0, 16, 0, 0, 352, 0, 0, ! 5, 0, 7, 140, 0, 13, 0, 16, 9, 10, ! 11, 0, 0, 0, 0, 0, 22, 0, 0, 0, ! 0, 24, 0, 0, 13, -418, 16, 15, 0, 22, ! 0, 0, 0, 0, 24, 0, 0, 0, 0, 821, ! 0, 0, 0, 0, 0, 16, 0, 0, 22, 0, ! 0, 0, 0, 24, 0, 0, 0, 0, 684, 0, ! 0, 0, 0, 0, 0, 149, 150, 22, 151, 152, ! 0, 0, 24, 153, 154, 155, 156, 157, 158, 159, ! 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, ! 170, 171, 0, 0, 0, 0, 0, 149, 150, 0, ! 151, 152, 0, 0, 172, 153, 154, 155, 156, 157, ! 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, ! 168, 169, 170, 171, 0, 173, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 373, 0, 174, 149, ! 150, 0, 151, 152, 0, 0, 0, 153, 154, 155, ! 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, ! 166, 167, 168, 169, 170, 171, 0, 0, 0, 0, ! 174, 149, 150, 0, 151, 152, 0, 0, 172, 153, ! 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, ! 164, 165, 166, 167, 168, 169, 170, 171, 5, 0, ! 7, 283, 0, 0, 0, 0, 9, 10, 11, 0, ! 608, 0, 174, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 13, 0, 14, 0, 5, 6, 7, 8, ! 0, 0, 450, 0, 9, 10, 11, 5, 6, 7, ! 8, 0, 0, 16, 174, 9, 10, 11, 284, 0, ! 13, 0, 14, 0, 0, 0, 0, 285, 286, 0, ! 0, 13, 0, 14, 0, 22, 5, 6, 7, 8, ! 24, 16, 678, 0, 9, 10, 11, 5, 6, 7, ! 8, 0, 16, 0, 0, 9, 10, 11, 0, 0, ! 13, 0, 14, 22, 0, 0, 0, 5, 24, 7, ! 140, 13, 0, 0, 22, 9, 10, 11, 0, 24, ! 5, 16, 7, 283, 0, 0, 0, 0, 9, 10, ! 11, 13, 16, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 22, 13, 0, 0, 0, 24, 0, ! 0, 0, 16, 0, 22, 0, 0, 0, 0, 24, ! 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, ! 0, 0, 0, 0, 22, 0, 0, 0, 0, 24, ! 0, 0, 0, 0, 0, 0, 0, 22, 0, 249, ! 250, 251, 24, 252, 253, 254, 255, 256, 257, 258, ! 259, 260, 261, 262, 263, 264, 265, 14, 0, 0, ! 0, 0, 0, 0, 0, 0, 249, 250, 251, 0, ! 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, ! 262, 263, 264, 265, 0, 490, 249, 250, 251, 925, ! 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, ! 262, 263, 264, 265, 249, 250, 251, 0, 252, 253, ! 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, ! 264, 265 }; ! static const short yycheck[] = { 56, ! 57, 2, 3, 2, 3, 2, 3, 281, 9, 10, ! 11, 2, 3, 83, 85, 209, 36, 22, 66, 24, ! 203, 223, 24, 316, 324, 270, 33, 80, 345, 145, ! 31, 223, 33, 53, 54, 55, 343, 105, 106, 177, ! 177, 42, 349, 42, 112, 42, 631, 418, 91, 95, ! 577, 42, 441, 714, 745, 123, 409, 1, 643, 1, ! 80, 683, 67, 31, 631, 67, 71, 135, 88, 71, ! 194, 285, 1, 549, 331, 40, 77, 115, 1, 42, ! 42, 1, 83, 1, 85, 204, 1, 439, 1, 49, ! 91, 42, 10, 520, 3, 42, 953, 62, 7, 42, ! 63, 284, 239, 9, 3, 786, 49, 879, 5, 77, ! 7, 3, 4, 5, 6, 7, 797, 85, 80, 63, ! 63, 30, 979, 86, 0, 85, 409, 16, 322, 80, ! 19, 20, 0, 80, 23, 173, 25, 26, 723, 81, ! 409, 802, 199, 42, 145, 54, 918, 421, 30, 38, ! 39, 40, 409, 82, 63, 357, 723, 584, 63, 82, ! 513, 514, 515, 516, 280, 357, 86, 82, 86, 82, ! 597, 214, 599, 430, 80, 30, 32, 33, 49, 71, ! 33, 238, 427, 955, 76, 74, 63, 42, 208, 63, ! 191, 963, 461, 194, 195, 81, 623, 63, 820, 219, ! 861, 415, 240, 204, 57, 681, 69, 245, 422, 247, ! 479, 563, 481, 214, 271, 27, 340, 989, 337, 108, ! 30, 30, 341, 191, 915, 86, 223, 195, 86, 286, ! 513, 514, 515, 516, 86, 288, 204, 63, 281, 376, ! 63, 768, 769, 445, 513, 514, 515, 516, 63, 3, ! 4, 63, 64, 445, 63, 64, 63, 146, 551, 148, ! 517, 299, 115, 63, 64, 692, 30, 694, 288, 30, ! 659, 81, 82, 9, 3, 4, 80, 3, 4, 280, ! 80, 3, 4, 172, 285, 3, 4, 544, 85, 346, ! 54, 81, 145, 182, 183, 85, 185, 186, 650, 63, ! 64, 369, 63, 64, 309, 80, 677, 309, 3, 4, ! 85, 787, 358, 789, 360, 81, 336, 71, 7, 85, ! 173, 590, 76, 79, 593, 326, 63, 64, 1, 386, ! 3, 4, 86, 54, 55, 56, 337, 63, 227, 340, ! 341, 30, 71, 80, 3, 71, 80, 76, 7, 71, ! 76, 85, 241, 71, 76, 3, 493, 86, 76, 652, ! 357, 80, 42, 608, 86, 54, 85, 424, 63, 337, ! 223, 30, 80, 341, 63, 64, 71, 42, 421, 268, ! 269, 76, 30, 80, 49, 970, 971, 240, 85, 634, ! 817, 81, 245, 80, 247, 54, 434, 3, 71, 63, ! 538, 538, 80, 76, 63, 64, 54, 85, 63, 64, ! 81, 82, 86, 687, 415, 63, 64, 418, 307, 52, ! 53, 422, 63, 42, 30, 80, 695, 63, 64, 430, ! 49, 430, 433, 438, 67, 82, 438, 81, 80, 430, ! 441, 85, 441, 3, 4, 452, 299, 82, 54, 80, ! 441, 452, 490, 770, 668, 3, 4, 63, 465, 7, ! 662, 577, 578, 81, 81, 758, 80, 736, 85, 81, ! 662, 42, 717, 85, 611, 1, 365, 80, 4, 5, ! 6, 7, 30, 80, 667, 81, 12, 13, 14, 85, ! 673, 72, 73, 74, 54, 72, 73, 74, 354, 32, ! 356, 82, 28, 356, 357, 82, 54, 81, 81, 783, ! 63, 71, 85, 80, 27, 63, 76, 30, 10, 408, ! 72, 73, 74, 49, 67, 81, 80, 40, 76, 85, ! 82, 86, 81, 540, 961, 962, 85, 426, 80, 540, ! 3, 4, 543, 81, 543, 71, 87, 85, 127, 128, ! 76, 27, 543, 560, 768, 769, 9, 558, 81, 560, ! 86, 775, 776, 72, 73, 74, 81, 30, 81, 40, ! 85, 344, 85, 82, 631, 71, 577, 578, 351, 42, ! 581, 434, 63, 64, 81, 441, 359, 658, 63, 64, ! 558, 54, 445, 663, 664, 451, 452, 890, 487, 452, ! 63, 40, 909, 85, 911, 42, 654, 655, 80, 577, ! 578, 80, 465, 76, 685, 884, 669, 42, 3, 4, ! 15, 674, 17, 18, 19, 20, 696, 697, 513, 514, ! 631, 516, 631, 80, 631, 6, 7, 490, 639, 80, ! 631, 12, 13, 14, 687, 30, 80, 536, 80, 669, ! 63, 64, 921, 80, 674, 86, 657, 658, 659, 87, ! 659, 87, 663, 664, 80, 67, 723, 668, 659, 54, ! 67, 639, 80, 730, 80, 975, 677, 745, 63, 873, ! 949, 950, 683, 539, 685, 985, 40, 540, 87, 27, ! 658, 76, 30, 80, 82, 696, 697, 86, 82, 42, ! 668, 82, 40, 559, 560, 58, 59, 560, 61, 62, ! 63, 64, 1, 82, 771, 571, 572, 685, 80, 572, ! 52, 53, 54, 55, 56, 63, 64, 616, 733, 734, ! 586, 587, 734, 740, 587, 87, 81, 85, 80, 740, ! 783, 81, 631, 81, 745, 3, 745, 85, 745, 85, ! 820, 822, 81, 87, 745, 82, 813, 80, 42, 648, ! 3, 4, 86, 82, 67, 42, 1, 768, 769, 4, ! 5, 6, 7, 793, 775, 776, 846, 12, 13, 14, ! 4, 5, 6, 7, 82, 42, 85, 30, 12, 13, ! 14, 42, 27, 28, 42, 30, 81, 7, 81, 42, ! 768, 769, 81, 659, 28, 40, 30, 775, 776, 662, ! 81, 54, 869, 67, 49, 42, 705, 85, 81, 820, ! 63, 822, 81, 63, 881, 49, 63, 600, 601, 16, ! 887, 604, 87, 76, 723, 67, 71, 838, 82, 42, ! 82, 76, 731, 81, 63, 846, 81, 71, 231, 63, ! 85, 86, 76, 17, 822, 912, 913, 81, 915, 3, ! 4, 244, 63, 7, 80, 80, 249, 250, 67, 9, ! 838, 254, 255, 256, 257, 258, 259, 260, 261, 262, ! 263, 264, 265, 739, 740, 81, 30, 740, 49, 50, ! 51, 52, 53, 54, 55, 56, 953, 670, 671, 672, ! 957, 80, 675, 676, 5, 6, 7, 80, 63, 81, ! 54, 12, 13, 14, 915, 81, 915, 85, 915, 63, ! 64, 81, 979, 696, 915, 81, 80, 80, 701, 30, ! 81, 81, 0, 427, 1, 0, 3, 4, 5, 6, ! 7, 8, 9, 686, 11, 12, 13, 14, 15, 87, ! 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, ! 27, 28, 29, 30, 31, 32, 33, 34, 35, 332, ! 287, 426, 800, 693, 747, 748, 749, 44, 713, 489, ! 47, 357, 49, 481, 695, 52, 53, 54, 365, 919, ! 410, 58, 59, 646, 487, 921, 63, 64, 433, 958, ! 423, 68, 960, 70, 71, 388, 389, 25, 75, 76, ! 568, 433, 79, 581, 81, 82, 83, 84, 664, 86, ! 308, 794, 846, 843, 1, 561, 3, 4, 5, 6, ! 7, 8, 9, 838, 11, 12, 13, 14, 15, 543, ! 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, ! 27, 28, 29, 30, 31, 538, 33, 34, 35, 429, ! 717, 429, 376, 3, 4, 611, -1, 44, -1, -1, ! 47, -1, 49, -1, -1, 52, 53, 54, -1, -1, ! -1, 58, 59, -1, 857, -1, 63, 64, -1, -1, ! 30, 68, -1, 70, 71, -1, -1, -1, 75, 76, ! -1, -1, 79, 486, 81, -1, 83, 84, -1, 86, ! -1, -1, -1, -1, 54, -1, -1, -1, -1, 1, ! 503, 3, 4, 63, 64, -1, 8, 9, 901, 11, ! -1, -1, -1, 15, 907, 17, 18, 19, 20, 21, ! 22, 23, 24, 25, 26, 27, -1, 29, -1, 31, ! -1, 33, 34, 35, -1, -1, -1, -1, -1, 5, ! 6, 7, 44, -1, -1, 47, 12, 13, 14, -1, ! 52, 53, 54, -1, -1, -1, 58, 59, -1, -1, ! -1, 63, 64, -1, -1, -1, 68, -1, 70, 71, ! -1, -1, -1, 75, 76, -1, -1, 79, -1, 81, ! -1, 83, 84, -1, 86, -1, 589, -1, -1, 1, ! -1, 3, 4, -1, -1, -1, 8, 9, -1, 11, ! -1, -1, -1, 15, 607, 17, 18, 19, 20, 21, ! 22, 23, 24, 25, 26, 27, -1, 29, -1, 31, ! -1, 33, 34, 35, 50, 51, 52, 53, 54, 55, ! 56, -1, 44, -1, -1, 47, -1, -1, -1, -1, ! 52, 53, 54, -1, -1, -1, 58, 59, -1, -1, ! -1, 63, 64, -1, -1, -1, 68, -1, 70, 71, ! -1, -1, -1, 75, 76, -1, -1, 79, -1, 81, ! -1, 83, 84, 1, 86, 3, 4, -1, 6, 7, ! 8, 9, -1, 11, 12, 13, 14, -1, -1, -1, ! 693, 48, 49, 50, 51, 52, 53, 54, 55, 56, ! 28, 29, -1, 31, -1, 33, 34, 35, -1, -1, ! -1, 714, -1, -1, -1, -1, 44, -1, 721, 47, ! -1, 49, -1, 726, 52, 53, 54, -1, -1, -1, ! 58, 59, 10, -1, -1, 63, 64, -1, -1, -1, ! 68, -1, 70, 71, -1, -1, -1, 75, 76, -1, ! -1, 79, -1, -1, -1, 83, 84, -1, 86, -1, ! 763, 39, 40, 41, 42, 43, 44, 45, 46, 47, ! 48, 49, 50, 51, 52, 53, 54, 55, 56, -1, ! -1, -1, 1, 786, 3, 4, -1, -1, 791, 8, ! 9, -1, 11, -1, 797, -1, -1, 800, -1, 802, ! 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, ! 29, -1, 31, -1, 33, 34, 35, -1, -1, -1, ! -1, -1, -1, -1, -1, 44, -1, -1, 47, -1, ! -1, -1, -1, 52, 53, 54, -1, -1, -1, 58, ! 59, -1, 845, 62, 63, 64, -1, -1, -1, 68, ! -1, 70, 71, -1, -1, 858, 75, 76, 861, -1, ! 79, 864, -1, 82, 83, 84, 1, 86, 3, 4, ! -1, -1, -1, 8, 9, 41, 11, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, ! 56, -1, -1, -1, 29, -1, 31, -1, 33, 34, ! 35, -1, -1, -1, -1, -1, -1, -1, -1, 44, ! -1, -1, 47, -1, -1, -1, -1, 52, 53, 54, ! -1, -1, -1, 58, 59, -1, -1, 62, 63, 64, ! -1, -1, -1, 68, -1, 70, 71, -1, -1, -1, ! 75, 76, -1, -1, 79, -1, -1, 82, 83, 84, ! 1, 86, 3, -1, -1, -1, -1, 8, 9, -1, ! 11, 44, 45, 46, 47, 48, 49, 50, 51, 52, ! 53, 54, 55, 56, -1, -1, -1, -1, 29, -1, ! 31, -1, 33, 34, 35, -1, -1, -1, -1, 40, ! -1, -1, -1, 44, -1, -1, 47, -1, -1, -1, ! -1, 52, 53, 54, -1, -1, -1, 58, 59, -1, ! -1, 62, 63, 64, -1, -1, -1, 68, -1, 70, ! -1, -1, -1, -1, 75, -1, -1, -1, 79, 1, ! -1, 3, 83, 84, -1, 86, 8, 9, -1, 11, ! 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, ! 55, 56, -1, -1, -1, -1, -1, 29, -1, 31, ! -1, 33, 34, 35, -1, -1, -1, -1, -1, -1, ! -1, -1, 44, -1, -1, 47, -1, -1, -1, -1, ! 52, 53, 54, -1, -1, -1, 58, 59, -1, -1, ! -1, 63, 64, -1, -1, -1, 68, -1, 70, -1, ! -1, -1, -1, 75, -1, -1, -1, 79, 1, -1, ! 3, 83, 84, -1, 86, 8, 9, -1, 11, 1, ! -1, -1, 4, -1, 6, 7, -1, -1, -1, -1, ! 12, 13, 14, -1, -1, -1, 29, -1, 31, -1, ! 33, 34, 35, -1, -1, -1, 28, -1, -1, 31, ! -1, 44, -1, -1, 47, -1, -1, -1, -1, 52, ! 53, 54, -1, -1, -1, 58, 59, 49, -1, -1, ! 63, 64, -1, -1, -1, 68, -1, 70, -1, -1, ! -1, -1, 75, -1, -1, -1, 79, -1, -1, 71, ! 83, 84, 1, 86, 76, 4, 5, 6, 7, 81, ! 82, -1, -1, 12, 13, 14, 46, 47, 48, 49, ! 50, 51, 52, 53, 54, 55, 56, -1, 27, 28, ! -1, 30, 1, -1, -1, 4, 5, 6, 7, -1, ! -1, 40, -1, 12, 13, 14, -1, -1, -1, -1, ! 49, -1, -1, -1, -1, -1, -1, -1, 27, 28, ! -1, 30, -1, 1, 63, 64, 4, 5, 6, 7, ! -1, 40, 71, -1, 12, 13, 14, 76, -1, -1, ! 49, -1, 81, -1, -1, -1, 85, 86, -1, -1, ! 28, -1, 30, -1, 63, 64, -1, -1, -1, -1, ! -1, -1, 71, -1, -1, -1, -1, 76, -1, -1, ! -1, 49, 81, -1, -1, 1, 85, 86, 4, 5, ! 6, 7, -1, -1, 10, -1, 12, 13, 14, -1, ! -1, -1, -1, 71, -1, -1, -1, -1, 76, -1, ! 1, -1, 28, 4, 5, 6, 7, -1, 86, -1, ! -1, 12, 13, 14, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, 49, -1, -1, -1, 28, -1, 30, ! -1, -1, -1, 3, -1, -1, -1, -1, 8, 9, ! -1, 11, -1, -1, -1, 71, -1, -1, 49, -1, ! 76, -1, -1, -1, -1, -1, -1, -1, -1, 29, ! 86, 31, -1, 33, 34, 35, -1, -1, -1, -1, ! 71, -1, -1, -1, 44, 76, -1, 47, -1, -1, ! -1, -1, 52, 53, 54, 86, -1, -1, 58, 59, ! -1, -1, -1, 63, 64, -1, 3, -1, 68, -1, ! 70, 8, 9, -1, 11, 75, -1, -1, -1, 79, ! -1, -1, -1, 83, 84, -1, -1, 87, -1, -1, ! -1, -1, 29, -1, 31, -1, 33, 34, 35, -1, ! -1, -1, -1, -1, -1, -1, -1, 44, -1, -1, ! 47, -1, -1, -1, -1, 52, 53, 54, -1, -1, ! -1, 58, 59, -1, -1, -1, 63, 64, -1, 3, ! -1, 68, -1, 70, 8, 9, -1, 11, 75, -1, ! -1, -1, 79, -1, -1, -1, 83, 84, -1, -1, ! 87, -1, -1, -1, -1, 29, -1, 31, -1, 33, ! 34, 35, -1, -1, -1, -1, -1, -1, -1, -1, ! 44, -1, -1, 47, -1, -1, -1, -1, 52, 53, ! 54, -1, -1, -1, 58, 59, -1, -1, -1, 63, ! 64, -1, 3, -1, 68, -1, 70, 8, 9, -1, ! 11, 75, -1, -1, -1, 79, -1, -1, -1, 83, ! 84, -1, -1, 87, -1, -1, -1, -1, 29, -1, ! 31, -1, 33, 34, 35, -1, -1, -1, -1, -1, ! -1, -1, -1, 44, -1, -1, 47, -1, -1, -1, ! -1, 52, 53, 54, -1, -1, -1, 58, 59, -1, ! -1, -1, 63, 64, -1, 3, -1, 68, -1, 70, ! 8, 9, -1, 11, 75, -1, -1, -1, 79, -1, ! -1, -1, 83, 84, -1, -1, 87, -1, -1, -1, ! -1, 29, -1, 31, -1, 33, 34, 35, -1, -1, ! -1, -1, -1, -1, -1, -1, 44, -1, -1, 47, ! -1, -1, -1, -1, 52, 53, 54, -1, -1, -1, ! 58, 59, -1, -1, -1, 63, 64, -1, -1, -1, ! 68, -1, 70, -1, -1, -1, -1, 75, -1, -1, ! -1, 79, -1, -1, -1, 83, 84, -1, -1, 87, ! 3, 4, 5, 6, 7, 8, 9, -1, 11, 12, ! 13, 14, -1, -1, -1, -1, -1, -1, 21, 22, ! 23, 24, 25, 26, 27, 28, 29, 30, 31, -1, ! 33, 34, 35, -1, -1, -1, -1, -1, -1, -1, ! -1, 44, -1, -1, 47, -1, 49, -1, -1, 52, ! 53, 54, -1, -1, -1, 58, 59, -1, -1, -1, ! 63, 64, -1, -1, -1, 68, -1, 70, 71, 3, ! 4, -1, 75, 76, 8, 9, 79, 11, 81, -1, ! 83, 84, -1, 86, -1, -1, -1, 21, 22, 23, ! 24, 25, 26, 27, -1, 29, -1, 31, -1, 33, ! 34, 35, -1, -1, -1, -1, -1, -1, -1, -1, ! 44, -1, -1, 47, -1, -1, -1, -1, 52, 53, ! 54, -1, -1, -1, 58, 59, -1, 3, -1, 63, ! 64, -1, 8, 9, 68, 11, 70, 71, -1, -1, ! -1, 75, 76, -1, -1, 79, -1, 81, -1, 83, ! 84, -1, 86, 29, -1, 31, -1, 33, 34, 35, ! -1, -1, -1, -1, -1, -1, -1, -1, 44, -1, ! -1, 47, -1, -1, -1, -1, 52, 53, 54, -1, ! -1, -1, 58, 59, -1, -1, -1, 63, 64, -1, ! -1, -1, 68, -1, 70, -1, -1, -1, -1, 75, ! -1, -1, -1, 79, -1, -1, -1, 83, 84, -1, ! 86, 3, 4, -1, 6, 7, -1, -1, -1, 11, ! 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, ! 22, 23, 24, 25, 26, 27, 28, 29, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! 42, 3, 4, 5, 6, 7, 8, 9, -1, 11, ! 12, 13, 14, 4, 5, 6, 7, -1, -1, -1, ! -1, 12, 13, 14, -1, -1, 28, 29, 30, 31, ! -1, 33, 34, 35, 76, -1, -1, 28, -1, 30, ! -1, -1, 44, 85, -1, 47, -1, 49, -1, -1, ! 52, 53, 54, -1, -1, -1, 58, 59, 49, -1, ! -1, 63, 64, -1, -1, -1, 68, -1, 70, 71, ! -1, -1, -1, 75, 76, -1, -1, 79, -1, -1, ! 71, 83, 84, 3, 4, 76, 6, 7, 8, 9, ! 81, 11, 12, 13, 14, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, 28, 29, ! -1, 31, -1, 33, 34, 35, -1, -1, -1, -1, ! -1, -1, -1, -1, 44, -1, -1, 47, -1, 49, ! -1, -1, 52, 53, 54, -1, -1, -1, 58, 59, ! -1, 3, -1, 63, 64, -1, 8, 9, 68, 11, ! 70, 71, -1, -1, -1, 75, 76, -1, -1, 79, ! -1, -1, -1, 83, 84, -1, -1, 29, -1, 31, ! -1, 33, 34, 35, -1, -1, -1, -1, -1, -1, ! -1, -1, 44, -1, -1, 47, -1, -1, -1, -1, ! 52, 53, 54, -1, -1, -1, 58, 59, -1, 3, ! -1, 63, 64, -1, 8, 9, 68, 11, 70, 71, ! -1, -1, -1, 75, -1, -1, -1, 79, -1, -1, ! -1, 83, 84, -1, -1, 29, -1, 31, -1, 33, ! 34, 35, -1, -1, -1, -1, -1, -1, -1, -1, ! 44, -1, -1, 47, -1, -1, -1, -1, 52, 53, ! 54, -1, -1, -1, 58, 59, -1, 3, -1, 63, ! 64, -1, 8, 9, 68, 11, 70, -1, -1, -1, ! -1, 75, -1, -1, -1, 79, -1, 81, -1, 83, ! 84, -1, -1, 29, -1, 31, -1, 33, 34, 35, ! -1, -1, -1, -1, -1, -1, -1, -1, 44, -1, ! -1, 47, -1, -1, -1, -1, 52, 53, 54, -1, ! -1, -1, 58, 59, -1, 3, -1, 63, 64, -1, ! 8, 9, 68, 11, 70, -1, -1, -1, -1, 75, ! -1, -1, -1, 79, -1, -1, -1, 83, 84, -1, ! -1, 29, -1, 31, -1, 33, 34, 35, -1, -1, ! -1, -1, -1, -1, -1, -1, 44, -1, -1, 47, ! -1, -1, -1, -1, 52, 53, 54, -1, -1, -1, ! 58, 59, -1, 3, -1, 63, 64, -1, 8, 9, ! 68, 11, 70, -1, -1, -1, -1, 75, -1, -1, ! -1, 79, -1, -1, -1, 83, 84, -1, -1, 29, ! -1, 31, -1, 33, 34, 35, -1, -1, -1, -1, ! -1, -1, -1, -1, 44, -1, -1, 47, -1, -1, ! -1, -1, 52, 53, 54, -1, -1, -1, 58, 59, ! -1, 3, -1, 63, 64, -1, 8, 9, 68, 11, ! 70, -1, -1, -1, -1, 75, -1, -1, -1, 79, ! -1, -1, -1, 83, 84, -1, -1, 29, -1, 31, ! -1, 33, 34, 35, -1, -1, -1, -1, -1, -1, ! -1, -1, 44, -1, -1, 47, -1, -1, -1, -1, ! 52, 53, 54, -1, -1, -1, 58, 59, -1, -1, ! -1, 63, 64, -1, -1, -1, 68, -1, 70, -1, ! -1, -1, -1, 75, -1, -1, -1, 79, -1, -1, ! 1, 83, 84, 4, -1, 6, 7, -1, -1, -1, ! -1, 12, 13, 14, -1, -1, -1, 1, -1, -1, ! 4, -1, 6, 7, -1, -1, -1, 28, 12, 13, ! 14, -1, -1, 4, -1, 6, 7, -1, -1, -1, ! -1, 12, 13, 14, 28, -1, -1, -1, 49, -1, ! -1, -1, -1, -1, -1, -1, 1, 28, 3, 4, ! 5, 6, 7, -1, -1, 49, -1, 12, 13, 14, ! 71, 72, 73, 74, -1, 76, -1, -1, 49, -1, ! 81, 82, 27, 28, -1, 30, 31, 71, 72, 73, ! 74, -1, 76, -1, -1, -1, -1, 81, 82, -1, ! 71, -1, -1, -1, 49, 76, -1, 52, 53, 54, ! 81, 82, -1, -1, -1, -1, -1, -1, 63, -1, ! 65, 66, 67, -1, -1, -1, 71, -1, -1, -1, ! 75, 76, 77, 78, -1, 1, 81, 3, 4, 5, 6, 7, -1, -1, -1, -1, 12, 13, 14, -1, ! -1, -1, -1, -1, -1, 1, -1, 3, 4, 5, ! 6, 7, 28, -1, 30, -1, 12, 13, 14, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, 28, 49, 30, -1, 52, 53, 54, 1, ! -1, 3, 4, 5, 6, 7, -1, 63, 10, -1, ! 12, 13, 14, 49, -1, 71, -1, -1, 54, -1, ! 76, -1, -1, -1, -1, 81, 28, 63, 30, -1, ! -1, -1, -1, -1, -1, 71, -1, -1, -1, -1, ! 76, -1, -1, -1, -1, 81, 1, 49, -1, 4, ! 5, 6, 7, -1, -1, 10, -1, 12, 13, 14, ! -1, -1, 4, 5, 6, 7, -1, -1, -1, 71, ! 12, 13, 14, 28, 76, 30, -1, -1, 80, -1, ! -1, 4, 5, 6, 7, -1, 28, -1, 30, 12, ! 13, 14, -1, -1, 49, -1, -1, 1, -1, -1, ! 4, -1, 6, 7, -1, 28, -1, 49, 12, 13, ! 14, -1, -1, -1, -1, -1, 71, -1, -1, -1, ! -1, 76, -1, -1, 28, 80, 49, 31, -1, 71, ! -1, -1, -1, -1, 76, -1, -1, -1, -1, 81, ! -1, -1, -1, -1, -1, 49, -1, -1, 71, -1, ! -1, -1, -1, 76, -1, -1, -1, -1, 81, -1, ! -1, -1, -1, -1, -1, 3, 4, 71, 6, 7, ! -1, -1, 76, 11, 12, 13, 14, 15, 16, 17, ! 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, ! 28, 29, -1, -1, -1, -1, -1, 3, 4, -1, ! 6, 7, -1, -1, 42, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, ! 26, 27, 28, 29, -1, 63, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, 42, -1, 76, 3, ! 4, -1, 6, 7, -1, -1, -1, 11, 12, 13, ! 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, ! 24, 25, 26, 27, 28, 29, -1, -1, -1, -1, ! 76, 3, 4, -1, 6, 7, -1, -1, 42, 11, ! 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, ! 22, 23, 24, 25, 26, 27, 28, 29, 4, -1, 6, 7, -1, -1, -1, -1, 12, 13, 14, -1, ! 42, -1, 76, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, 28, -1, 30, -1, 4, 5, 6, 7, ! -1, -1, 10, -1, 12, 13, 14, 4, 5, 6, ! 7, -1, -1, 49, 76, 12, 13, 14, 54, -1, ! 28, -1, 30, -1, -1, -1, -1, 63, 64, -1, ! -1, 28, -1, 30, -1, 71, 4, 5, 6, 7, ! 76, 49, 10, -1, 12, 13, 14, 4, 5, 6, ! 7, -1, 49, -1, -1, 12, 13, 14, -1, -1, ! 28, -1, 30, 71, -1, -1, -1, 4, 76, 6, ! 7, 28, -1, -1, 71, 12, 13, 14, -1, 76, ! 4, 49, 6, 7, -1, -1, -1, -1, 12, 13, ! 14, 28, 49, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, 71, 28, -1, -1, -1, 76, -1, ! -1, -1, 49, -1, 71, -1, -1, -1, -1, 76, ! -1, -1, -1, -1, -1, 49, -1, -1, -1, -1, ! -1, -1, -1, -1, 71, -1, -1, -1, -1, 76, ! -1, -1, -1, -1, -1, -1, -1, 71, -1, 39, ! 40, 41, 76, 43, 44, 45, 46, 47, 48, 49, ! 50, 51, 52, 53, 54, 55, 56, 30, -1, -1, ! -1, -1, -1, -1, -1, -1, 39, 40, 41, -1, ! 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, ! 53, 54, 55, 56, -1, 85, 39, 40, 41, 42, ! 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, ! 53, 54, 55, 56, 39, 40, 41, -1, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, ! 55, 56 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ #line 3 "/usr/lib/bison.simple" --- 639,2126 ---- "TYPENAME","SCSPEC","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","STRING_FUNC_NAME","VAR_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","')'","';'","'}'","'~'","'!'","','","'{'","']'", ! "'@'","program","extdefs","@1","@2","extdef","datadef","fndef","@3","@4","@5", ! "@6","@7","@8","identifier","unop","expr","exprlist","nonnull_exprlist","unary_expr", ! "sizeof","alignof","cast_expr","expr_no_commas","@9","@10","@11","@12","@13", ! "primary","@14","string","objc_string","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","declspecs_sc_nots_nosa_noea","declspecs_sc_nots_nosa_ea", ! "declspecs_sc_nots_sa_noea","declspecs_sc_nots_sa_ea","declspecs_sc_ts_nosa_noea", ! "declspecs_sc_ts_nosa_ea","declspecs_sc_ts_sa_noea","declspecs_sc_ts_sa_ea", ! "declspecs_ts","declspecs_nots","declspecs_ts_nosa","declspecs_nots_nosa","declspecs_nosc_ts", ! "declspecs_nosc_nots","declspecs_nosc","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","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_filename","save_lineno","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","label", ! "maybe_type_qual","xexpr","asm_operands","nonnull_asm_operands","asm_operand", ! "asm_clobbers","parmlist","@39","parmlist_1","@40","@41","parmlist_2","parms", ! "parm","firstparm","setspecs_fp","parmlist_or_identifiers","@42","parmlist_or_identifiers_1", "identifiers","identifiers_or_typenames","extension","objcdef","identifier_list", ! "classdecl","aliasdecl","classdef","@43","@44","@45","@46","@47","@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","methodprotolist2","@57", ! "semi_or_error","methodproto","@58","@59","methoddecl","optarglist","myxdecls", ! "mydecls","mydecl","myparms","myparm","optparmlist","@60","unaryselector","keywordselector", ! "selector","reservedwords","keyworddecl","messageargs","keywordarglist","keywordexpr", ! "keywordarg","receiver","objcmessageexpr","@61","@62","selectorarg","keywordnamelist", ! "keywordname","objcselectorexpr","objcprotocolexpr","objcencodeexpr", NULL }; #endif static const short yyr1[] = { 0, ! 92, 92, 94, 93, 95, 93, 96, 96, 96, 96, ! 96, 97, 97, 97, 97, 97, 97, 97, 99, 100, ! 98, 98, 101, 102, 98, 98, 103, 104, 98, 98, ! 105, 105, 105, 105, 106, 106, 106, 106, 106, 106, ! 106, 107, 108, 108, 109, 109, 110, 110, 110, 110, ! 110, 110, 110, 110, 110, 110, 110, 111, 112, 113, ! 113, 114, 114, 114, 114, 114, 114, 114, 114, 114, ! 114, 114, 114, 114, 115, 114, 116, 114, 117, 118, ! 114, 119, 114, 114, 114, 120, 120, 120, 120, 121, ! 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, ! 120, 120, 120, 120, 120, 120, 120, 120, 120, 122, ! 122, 123, 123, 124, 124, 124, 125, 126, 126, 126, ! 126, 127, 127, 127, 127, 128, 129, 130, 131, 131, ! 131, 131, 131, 131, 132, 132, 132, 133, 134, 134, ! 135, 135, 136, 136, 136, 136, 136, 136, 136, 137, ! 137, 137, 137, 137, 137, 138, 138, 138, 138, 138, ! 138, 139, 139, 139, 139, 139, 140, 140, 140, 140, ! 140, 140, 140, 141, 142, 142, 142, 142, 142, 142, ! 143, 144, 144, 144, 144, 144, 144, 144, 144, 144, ! 144, 145, 145, 145, 145, 145, 146, 146, 146, 146, ! 146, 146, 146, 146, 146, 146, 147, 147, 147, 147, ! 147, 148, 148, 148, 148, 148, 148, 148, 148, 149, ! 149, 149, 149, 149, 149, 149, 149, 150, 150, 150, ! 150, 151, 151, 151, 151, 152, 152, 152, 152, 153, ! 153, 153, 153, 154, 154, 154, 154, 154, 154, 154, ! 154, 155, 155, 155, 155, 155, 155, 155, 155, 155, ! 155, 155, 155, 155, 155, 155, 155, 156, 156, 157, ! 157, 158, 159, 159, 160, 161, 161, 161, 161, 161, ! 161, 162, 162, 163, 163, 164, 164, 166, 165, 165, ! 168, 167, 167, 169, 169, 170, 170, 171, 172, 172, ! 173, 173, 173, 173, 173, 174, 174, 174, 174, 175, ! 176, 175, 175, 177, 177, 178, 178, 179, 179, 180, ! 179, 179, 182, 181, 181, 181, 183, 183, 184, 186, ! 187, 185, 189, 190, 188, 191, 191, 192, 192, 192, ! 192, 192, 192, 193, 193, 194, 194, 194, 194, 195, ! 195, 195, 195, 195, 196, 196, 196, 196, 196, 197, ! 197, 198, 198, 199, 199, 201, 200, 200, 202, 200, ! 200, 203, 200, 204, 200, 205, 205, 205, 206, 206, ! 207, 207, 208, 208, 209, 209, 209, 209, 210, 210, ! 210, 210, 210, 210, 211, 211, 212, 212, 213, 213, ! 213, 214, 214, 214, 215, 215, 215, 216, 216, 218, ! 217, 219, 219, 220, 220, 220, 221, 221, 222, 222, ! 223, 223, 224, 224, 224, 224, 224, 225, 225, 225, ! 225, 225, 225, 225, 225, 225, 226, 226, 226, 226, ! 227, 227, 227, 227, 227, 228, 228, 228, 228, 229, ! 229, 229, 229, 229, 230, 230, 231, 231, 231, 231, ! 232, 233, 234, 235, 236, 237, 237, 238, 238, 239, ! 240, 240, 241, 242, 242, 243, 243, 244, 245, 246, ! 246, 248, 247, 250, 249, 251, 252, 253, 253, 254, ! 255, 256, 258, 257, 257, 257, 259, 260, 257, 257, ! 257, 261, 262, 263, 264, 257, 265, 257, 266, 266, ! 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, ! 267, 267, 267, 267, 268, 268, 268, 268, 269, 269, ! 270, 270, 271, 271, 272, 272, 273, 273, 274, 274, ! 276, 275, 277, 278, 279, 277, 277, 280, 280, 280, ! 280, 281, 281, 282, 282, 282, 282, 282, 283, 283, ! 283, 283, 283, 284, 286, 285, 287, 287, 288, 288, ! 289, 289, 290, 291, 291, 291, 291, 291, 291, 292, ! 292, 293, 294, 296, 297, 295, 298, 295, 299, 300, ! 295, 301, 295, 302, 295, 295, 303, 295, 295, 304, ! 295, 295, 306, 305, 305, 307, 307, 308, 309, 309, ! 310, 310, 310, 311, 311, 311, 312, 312, 312, 313, ! 313, 313, 314, 314, 314, 315, 315, 317, 318, 319, ! 316, 320, 321, 320, 322, 322, 322, 323, 322, 324, ! 324, 326, 327, 325, 328, 328, 328, 328, 329, 329, ! 330, 330, 331, 331, 331, 331, 332, 332, 332, 333, ! 333, 334, 334, 334, 335, 335, 336, 335, 337, 338, ! 338, 339, 339, 339, 339, 339, 340, 340, 340, 340, ! 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, ! 340, 340, 340, 340, 340, 340, 340, 341, 341, 341, ! 341, 342, 342, 343, 343, 344, 345, 345, 346, 346, ! 348, 349, 347, 350, 350, 351, 351, 352, 352, 353, ! 354, 355 }; static const short yyr2[] = { 0, 0, 1, 0, 2, 0, 3, 1, 1, 1, 5, ! 2, 3, 4, 4, 2, 2, 2, 1, 0, 0, ! 9, 4, 0, 0, 9, 4, 0, 0, 8, 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, + 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, + 2, 2, 3, 0, 1, 2, 3, 1, 1, 2, + 2, 4, 4, 2, 2, 3, 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, ! 0, 4, 1, 0, 2, 1, 3, 3, 2, 0, ! 4, 1, 0, 4, 1, 1, 1, 2, 2, 0, ! 0, 7, 0, 0, 7, 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, 4, ! 3, 1, 1, 2, 1, 4, 1, 4, 4, 6, ! 5, 4, 6, 5, 1, 3, 1, 1, 3, 0, ! 3, 0, 1, 0, 1, 2, 1, 1, 1, 3, ! 2, 3, 4, 3, 2, 2, 1, 3, 4, 2, ! 3, 3, 4, 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, 0, 1, 2, 3, ! 3, 3, 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, 5, 2, 5, 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, 0, 0, 10, 0, 6, 0, 0, ! 12, 0, 8, 0, 6, 2, 0, 8, 4, 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, 0, 2, 1, 1, 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, ! 0, 0, 6, 1, 1, 1, 2, 2, 1, 4, ! 4, 4 }; static const short yydefact[] = { 3, ! 5, 0, 0, 0, 276, 167, 273, 135, 364, 360, ! 362, 0, 0, 0, 573, 0, 626, 627, 0, 0, ! 579, 606, 0, 606, 0, 0, 18, 4, 8, 7, ! 0, 220, 221, 222, 223, 212, 213, 214, 215, 224, ! 225, 226, 227, 216, 217, 218, 219, 127, 127, 0, ! 143, 150, 270, 272, 271, 141, 296, 0, 0, 0, ! 275, 274, 0, 9, 575, 576, 574, 577, 279, 628, ! 578, 6, 16, 17, 365, 361, 363, 0, 0, 0, ! 31, 32, 34, 33, 580, 0, 606, 596, 277, 607, ! 606, 0, 278, 0, 0, 359, 268, 294, 0, 284, ! 0, 170, 136, 148, 154, 138, 171, 137, 149, 155, ! 177, 139, 160, 165, 142, 178, 140, 161, 166, 188, ! 144, 146, 152, 151, 189, 145, 147, 153, 203, 156, ! 158, 163, 162, 204, 157, 159, 164, 172, 168, 186, ! 195, 174, 173, 169, 187, 196, 179, 175, 201, 210, ! 181, 180, 176, 202, 211, 190, 182, 184, 193, 192, ! 191, 183, 185, 194, 205, 197, 199, 208, 207, 206, ! 198, 200, 209, 0, 0, 15, 297, 385, 376, 385, ! 377, 374, 378, 11, 0, 86, 87, 110, 58, 59, ! 0, 0, 0, 0, 0, 89, 0, 35, 37, 36, ! 0, 38, 39, 0, 711, 0, 0, 0, 40, 41, ! 0, 0, 0, 42, 60, 0, 0, 62, 45, 47, ! 88, 109, 0, 0, 105, 106, 107, 108, 0, 248, ! 249, 250, 251, 244, 245, 246, 247, 410, 0, 301, ! 608, 0, 0, 0, 587, 0, 0, 594, 603, 605, ! 582, 0, 240, 241, 242, 243, 269, 0, 0, 295, ! 12, 294, 30, 0, 294, 0, 0, 294, 358, 342, ! 268, 294, 343, 0, 282, 0, 336, 337, 0, 0, ! 0, 0, 0, 366, 0, 369, 0, 372, 672, 673, ! 696, 697, 693, 677, 678, 679, 680, 681, 682, 683, ! 684, 685, 686, 687, 688, 689, 690, 691, 692, 694, ! 695, 0, 0, 674, 675, 629, 646, 665, 669, 676, ! 670, 56, 57, 0, 0, 0, 51, 48, 0, 478, ! 0, 0, 0, 0, 0, 0, 112, 50, 0, 0, ! 0, 52, 0, 54, 0, 0, 79, 77, 75, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 103, 104, 0, 0, 43, 0, 111, 0, 0, ! 474, 466, 0, 49, 280, 412, 281, 307, 308, 309, ! 306, 0, 299, 302, 581, 606, 0, 584, 633, 599, ! 0, 614, 633, 583, 357, 0, 0, 128, 0, 565, ! 355, 0, 0, 430, 0, 0, 0, 28, 0, 486, ! 119, 487, 293, 0, 0, 14, 294, 22, 0, 294, ! 294, 340, 13, 26, 0, 0, 294, 393, 387, 240, ! 241, 242, 243, 236, 237, 238, 239, 127, 127, 384, ! 0, 385, 294, 385, 407, 408, 381, 405, 0, 0, ! 701, 0, 649, 667, 648, 0, 671, 0, 0, 0, ! 0, 93, 92, 0, 710, 709, 712, 719, 714, 0, ! 715, 716, 0, 0, 10, 46, 0, 0, 85, 84, ! 0, 0, 0, 0, 73, 74, 72, 71, 70, 68, ! 69, 63, 64, 65, 66, 67, 102, 101, 0, 44, ! 0, 113, 95, 0, 0, 467, 468, 94, 268, 294, ! 411, 413, 418, 417, 419, 427, 0, 301, 43, 592, ! 606, 614, 0, 0, 597, 602, 0, 0, 0, 356, ! 285, 286, 0, 0, 0, 0, 432, 428, 0, 0, ! 431, 0, 461, 486, 121, 116, 120, 0, 291, 341, ! 0, 0, 20, 290, 339, 24, 0, 368, 486, 486, ! 386, 394, 0, 371, 0, 0, 382, 0, 381, 0, ! 0, 0, 630, 666, 548, 0, 699, 0, 0, 0, ! 90, 61, 0, 718, 720, 0, 717, 722, 721, 53, ! 55, 0, 0, 78, 76, 96, 100, 571, 0, 477, ! 446, 476, 486, 486, 486, 486, 0, 455, 0, 487, ! 441, 450, 469, 421, 541, 426, 294, 425, 298, 300, ! 86, 0, 589, 633, 600, 0, 588, 636, 0, 127, ! 127, 642, 638, 635, 614, 613, 611, 612, 595, 614, ! 619, 616, 127, 127, 0, 604, 287, 0, 569, 549, ! 232, 233, 228, 229, 234, 235, 230, 231, 127, 127, ! 567, 0, 550, 552, 566, 0, 434, 0, 0, 433, ! 429, 487, 117, 127, 127, 0, 338, 283, 286, 486, ! 288, 486, 388, 389, 395, 487, 391, 397, 487, 294, ! 294, 409, 406, 294, 0, 0, 645, 665, 220, 221, ! 222, 223, 212, 213, 214, 215, 224, 225, 226, 227, ! 216, 217, 218, 219, 127, 0, 654, 650, 652, 0, ! 0, 668, 550, 0, 0, 0, 0, 0, 0, 702, ! 0, 703, 704, 80, 83, 470, 0, 447, 442, 451, ! 448, 443, 452, 487, 444, 453, 449, 445, 454, 456, ! 463, 464, 420, 422, 0, 0, 541, 424, 303, 0, ! 305, 614, 0, 633, 585, 0, 0, 0, 0, 637, ! 0, 0, 620, 620, 615, 547, 564, 414, 414, 543, ! 544, 0, 568, 0, 435, 436, 0, 124, 0, 125, ! 0, 313, 311, 310, 292, 487, 0, 487, 294, 390, ! 294, 0, 367, 370, 375, 294, 700, 647, 658, 414, ! 659, 655, 656, 0, 473, 631, 462, 471, 0, 97, ! 0, 99, 326, 86, 0, 323, 0, 325, 0, 379, ! 316, 322, 0, 0, 706, 708, 0, 713, 0, 705, ! 0, 572, 464, 475, 276, 0, 0, 0, 0, 0, ! 0, 529, 606, 606, 524, 486, 0, 126, 127, 127, ! 0, 0, 511, 491, 492, 0, 423, 542, 0, 0, ! 593, 0, 633, 643, 639, 598, 0, 623, 617, 621, ! 618, 348, 268, 294, 349, 294, 344, 345, 294, 561, ! 415, 418, 268, 294, 294, 563, 294, 551, 127, 127, ! 553, 570, 29, 0, 0, 0, 0, 289, 0, 486, ! 0, 294, 486, 0, 294, 373, 294, 294, 664, 0, ! 660, 472, 479, 698, 0, 329, 0, 320, 91, 0, ! 315, 0, 328, 319, 707, 81, 0, 527, 514, 515, ! 516, 0, 0, 0, 530, 0, 487, 512, 0, 0, ! 133, 482, 497, 484, 502, 0, 495, 0, 0, 465, ! 134, 304, 590, 601, 0, 0, 625, 0, 294, 421, ! 541, 559, 294, 347, 294, 351, 560, 416, 421, 541, ! 562, 545, 414, 414, 122, 123, 0, 21, 25, 396, ! 487, 294, 0, 399, 398, 294, 0, 402, 662, 663, ! 657, 414, 98, 0, 0, 317, 318, 0, 525, 517, ! 0, 522, 0, 0, 0, 131, 330, 0, 132, 333, ! 0, 0, 464, 0, 0, 0, 481, 486, 480, 501, ! 0, 513, 633, 586, 641, 640, 644, 624, 0, 352, ! 353, 0, 346, 350, 0, 294, 294, 556, 294, 558, ! 312, 0, 401, 294, 404, 294, 661, 324, 321, 0, ! 523, 0, 294, 129, 0, 130, 0, 0, 0, 0, ! 531, 0, 496, 464, 465, 488, 486, 0, 0, 622, ! 354, 546, 554, 555, 557, 400, 403, 526, 533, 0, ! 528, 331, 334, 0, 0, 485, 532, 510, 503, 0, ! 507, 494, 490, 489, 0, 591, 0, 0, 0, 534, ! 535, 518, 486, 486, 483, 498, 531, 509, 464, 500, ! 0, 0, 533, 0, 0, 487, 487, 464, 0, 508, ! 0, 0, 0, 519, 536, 0, 0, 499, 504, 537, ! 0, 0, 0, 332, 335, 531, 0, 539, 0, 520, ! 0, 0, 0, 0, 505, 538, 521, 540, 464, 506, 0, 0, 0 }; ! static const short yydefgoto[] = { 1161, ! 1, 2, 3, 28, 29, 30, 419, 680, 425, 682, ! 267, 544, 827, 212, 331, 499, 214, 215, 216, 217, ! 218, 219, 484, 483, 481, 841, 482, 220, 728, 221, ! 222, 408, 409, 410, 673, 601, 31, 397, 858, 230, ! 231, 232, 233, 234, 235, 236, 237, 40, 41, 42, ! 43, 44, 45, 46, 47, 48, 49, 659, 660, 438, ! 257, 238, 50, 258, 51, 52, 53, 54, 55, 274, ! 99, 268, 275, 797, 100, 676, 398, 260, 57, 382, ! 383, 384, 795, 906, 829, 830, 831, 1005, 832, 927, ! 833, 834, 1016, 1065, 1113, 1019, 1067, 1114, 679, 277, ! 917, 887, 888, 278, 58, 59, 60, 61, 442, 444, ! 449, 287, 62, 931, 568, 282, 283, 440, 684, 687, ! 685, 688, 447, 448, 239, 376, 511, 919, 891, 892, ! 514, 515, 269, 602, 603, 604, 605, 606, 607, 411, ! 372, 844, 1028, 1032, 505, 506, 507, 816, 817, 373, ! 609, 223, 818, 957, 958, 1021, 959, 1023, 412, 548, ! 1075, 1029, 1076, 1077, 960, 1074, 1022, 1128, 1024, 1117, ! 1146, 1159, 1119, 1099, 864, 865, 946, 1100, 1109, 1110, ! 1111, 1149, 616, 756, 661, 897, 1045, 662, 663, 901, ! 664, 778, 401, 534, 665, 666, 599, 224, 64, 86, ! 65, 66, 67, 522, 873, 389, 762, 1033, 624, 392, ! 635, 764, 68, 393, 89, 69, 527, 640, 528, 645, ! 879, 880, 70, 71, 185, 453, 721, 523, 524, 633, ! 769, 1037, 634, 768, 966, 316, 573, 718, 719, 720, ! 920, 921, 455, 575, 317, 318, 319, 320, 321, 731, ! 732, 836, 733, 467, 225, 333, 583, 470, 471, 472, ! 226, 227, 228 }; ! static const short yypact[] = { 119, ! 144, 3958, 3958, 252,-32768,-32768,-32768,-32768, 120, 120, ! 120, 101, 139, 173,-32768, 378,-32768,-32768, 378, 378, ! -32768, 201, 378, 201, 378, 378,-32768,-32768,-32768,-32768, ! 226, 1004, 4135, 1258, 4163, 479, 953, 685, 1209, 1596, ! 4189, 2962, 4200, 812, 1226, 1060, 1270,-32768,-32768, 204, ! -32768,-32768,-32768,-32768,-32768, 120,-32768, 125, 304, 433, ! -32768,-32768, 3958,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768, 120, 120, 120, 3430, 2949, 218, ! -32768,-32768,-32768,-32768,-32768, 271, 430, 294,-32768,-32768, ! 281, 74,-32768, 323, 378,-32768, 191, 120, 340,-32768, ! 1323,-32768,-32768,-32768,-32768, 120,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768, 120,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768, 120,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768, 120,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768, 120,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! 120,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 120, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 120,-32768, ! -32768,-32768,-32768, 374, 226,-32768,-32768, 245, 241, 245, ! 265,-32768, 327,-32768, 4291,-32768,-32768,-32768,-32768,-32768, ! 3430, 3430, 303, 359, 368,-32768, 378,-32768,-32768,-32768, ! 3430,-32768,-32768, 2203,-32768, 385, 394, 411,-32768,-32768, ! 487, 3430, 397, 399,-32768, 3497, 3564,-32768, 4764, 1074, ! 505, 434, 1481, 3430,-32768,-32768,-32768,-32768, 445, 3175, ! 4594, 3700, 4648, 634, 787, 911, 1230,-32768, 464, 466, ! -32768, 378, 378, 378, 467, 378, 378,-32768,-32768,-32768, ! -32768, 499, 337, 592, 350, 597,-32768, 226, 226, 120, ! -32768, 120,-32768, 544, 120, 2701, 967, 120,-32768,-32768, ! 191, 120,-32768, 423,-32768, 1585, 330, 422, 471, 1818, ! 553, 537, 3907,-32768, 542,-32768, 137,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768, 239, 4519,-32768,-32768,-32768,-32768, 3835, 591,-32768, ! -32768,-32768,-32768, 3430, 3430, 4519,-32768,-32768, 559,-32768, ! 567, 572, 3089, 4327, 4519, 378,-32768,-32768, 574, 3430, ! 2203,-32768, 2203,-32768, 3430, 3430, 615,-32768,-32768, 3430, ! 3430, 3430, 3430, 3430, 3430, 3430, 3430, 3430, 3430, 3430, ! 3430,-32768,-32768, 378, 378, 3430, 3430,-32768, 660, 588, ! -32768, 645, 601,-32768,-32768, 376,-32768,-32768,-32768,-32768, ! -32768, 114,-32768, 622,-32768, 201, 613,-32768, 630, 617, ! 625,-32768, 630,-32768, 422, 372, 226,-32768, 708,-32768, ! -32768, 2949, 3162,-32768, 629, 3022, 639,-32768, 3719, 83, ! -32768,-32768, 681, 374, 374,-32768, 120,-32768, 967, 120, ! 120,-32768,-32768,-32768, 967, 652, 120,-32768,-32768, 3175, ! 4594, 3700, 4648, 634, 787, 911, 1230,-32768, 453, 647, ! 4248, 245, 120, 245,-32768, 691, 655,-32768, 137, 4519, ! -32768, 663, 684, 738,-32768, 591,-32768, 328, 4639, 4659, ! 677,-32768,-32768, 3229,-32768,-32768,-32768,-32768, 733, 703, ! 4327,-32768, 705, 713,-32768, 4764, 723, 730, 4764, 4764, ! 3430, 775, 3430, 3430, 2828, 1739, 2419, 1383, 1069, 1113, ! 1113, 717, 717,-32768,-32768,-32768,-32768,-32768, 749, 399, ! 748,-32768,-32768, 378, 1936, 645,-32768,-32768, 191, 120, ! -32768,-32768,-32768,-32768, 577,-32768, 756, 466, 3631, 751, ! 201,-32768, 774, 3992,-32768,-32768, 664, 3791, 777,-32768, ! -32768, 210, 72, 4078, 760, 3430,-32768,-32768, 3430, 3296, ! -32768, 761,-32768,-32768,-32768,-32768,-32768, 3927,-32768, 330, ! 481, 374,-32768, 811,-32768,-32768, 778,-32768,-32768,-32768, ! -32768,-32768, 779,-32768, 780, 3430, 378, 783, 655, 786, ! 4371, 3736,-32768,-32768, 1829, 4519,-32768, 4519, 3430, 4519, ! -32768,-32768, 4407,-32768,-32768, 733,-32768,-32768,-32768, 773, ! 773, 824, 3430, 2170, 2342,-32768,-32768,-32768, 488, 639, ! -32768,-32768, 97, 109, 135, 138, 871,-32768, 789,-32768, ! -32768,-32768,-32768, 376, 376,-32768, 120,-32768,-32768,-32768, ! 283, 795,-32768, 630,-32768, 835,-32768,-32768, 226,-32768, ! -32768,-32768, 673,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768, 800,-32768,-32768, 796,-32768,-32768, ! 4435, 4550, 1545, 1300, 4455, 4563, 1676, 1382,-32768,-32768, ! -32768, 802, 491,-32768,-32768, 317,-32768, 797, 798,-32768, ! -32768,-32768,-32768, 805, 810, 2451,-32768,-32768, 864,-32768, ! -32768,-32768,-32768, 809,-32768,-32768, 817,-32768,-32768, 120, ! 120, 4764,-32768, 120, 821, 378,-32768, 3835, 4435, 4550, ! 4466, 4576, 1545, 1300, 1686, 1403, 4455, 4563, 4486, 4605, ! 1676, 1382, 1757, 1514, 826, 843,-32768,-32768, 4499, 3756, ! 90,-32768, 845, 848, 851, 4686, 854, 1693, 3430, 849, ! 850, 4407,-32768,-32768, 2257,-32768, 378,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768, 2612,-32768,-32768, 855, 4109,-32768,-32768,-32768, 3430, ! -32768,-32768, 872, 630,-32768, 374, 226, 4291, 4050,-32768, ! 976, 3873, 460, 460,-32768,-32768,-32768, 627, 463,-32768, ! -32768, 2714,-32768, 939,-32768,-32768, 90,-32768, 374,-32768, ! 226,-32768,-32768, 4764,-32768,-32768, 2451,-32768, 120, 918, ! 120, 146,-32768,-32768,-32768, 120,-32768,-32768,-32768, 627, ! -32768,-32768,-32768, 861,-32768,-32768, 859,-32768, 378,-32768, ! 3430,-32768,-32768, 907, 378,-32768, 910, 4764, 876, 874, ! -32768,-32768, 298, 2379, 399,-32768, 3430,-32768, 849,-32768, ! 3430,-32768, 2774,-32768, 917, 3430, 923, 891, 894, 3363, ! 478, 975, 99, 211,-32768,-32768, 902,-32768,-32768,-32768, ! 903, 1076,-32768,-32768,-32768, 2863,-32768,-32768, 446, 1036, ! -32768, 919, 630,-32768,-32768,-32768, 3430, 942, 912,-32768, ! 912,-32768, 191, 120,-32768, 120, 692, 695, 285,-32768, ! -32768, 120, 191, 120, 285,-32768, 120,-32768,-32768,-32768, ! -32768,-32768,-32768, 512, 528, 1693, 90,-32768, 90,-32768, ! 3430, 214,-32768, 3430, 539,-32768, 120, 285,-32768, 541, ! -32768,-32768,-32768,-32768, 4705,-32768, 1693,-32768,-32768, 2292, ! -32768, 2523,-32768,-32768,-32768, 2257, 1375,-32768,-32768,-32768, ! -32768, 915, 3430, 920,-32768, 934,-32768,-32768, 374, 226, ! -32768,-32768,-32768,-32768,-32768, 940, 998, 2025, 116,-32768, ! -32768,-32768,-32768,-32768, 944, 81, 4764, 3430, 120, 627, ! 465,-32768, 120,-32768, 120,-32768,-32768, 120, 463, 463, ! -32768,-32768, 627, 463,-32768,-32768, 936,-32768,-32768,-32768, ! -32768, 1418, 3430,-32768,-32768, 1418, 3430,-32768,-32768,-32768, ! -32768, 627,-32768, 937, 2523,-32768,-32768, 3430,-32768,-32768, ! 935,-32768, 3430, 979, 579,-32768, 905, 594,-32768, 1272, ! 959, 962,-32768, 964, 3430, 2114,-32768,-32768,-32768,-32768, ! 3430,-32768, 630,-32768,-32768,-32768,-32768, 4764, 460, 692, ! 695, 535,-32768,-32768, 4109, 120, 285,-32768, 285,-32768, ! -32768, 918,-32768, 1418,-32768, 1418,-32768,-32768,-32768, 4746, ! -32768, 51, 120,-32768, 967,-32768, 967, 3430, 3430, 1016, ! 2863, 952,-32768,-32768,-32768,-32768,-32768, 955, 965,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 122, 957, ! -32768,-32768,-32768, 956, 960,-32768,-32768,-32768,-32768, 961, ! -32768,-32768,-32768,-32768, 971,-32768, 981, 378, 142, 958, ! -32768,-32768,-32768,-32768,-32768,-32768, 3430,-32768,-32768,-32768, ! 3430, 968, 122, 978, 122,-32768,-32768,-32768, 991,-32768, ! 966, 1067, 163,-32768,-32768, 861, 861,-32768,-32768,-32768, ! 1010, 708, 997,-32768,-32768, 3430, 3430, 505, 506,-32768, ! 1000, 1002, 1003, 708,-32768,-32768,-32768, 505,-32768,-32768, ! 1089, 1098,-32768 }; static const short yypgoto[] = {-32768, ! -32768,-32768,-32768, 113, -486,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768, -16,-32768, -77, 580, -333, 521,-32768,-32768, ! -92, 807,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -384, ! -32768, -411, 698,-32768,-32768, 150, 353, -387, -808, 26, ! 33, 62, 64, 85, 104, 38, 111, -480, -364, -520, ! -516, -357, -281, -503, -487, -409, -406, 557, 562, -483, ! -256, -195, -720, -240, 670, 1151, 1210, 1222,-32768, -727, ! -170, -270, 565,-32768, 714,-32768, 312, 15, 27,-32768, ! 616,-32768, 346,-32768, -780,-32768, 215,-32768, -757,-32768, ! -32768, 313,-32768,-32768,-32768,-32768,-32768,-32768, -100, 357, ! -708, 178, -159, 80,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768, 581, -143,-32768, 710,-32768,-32768, ! 244, 242, 725, 612, -61,-32768,-32768, -657, -354, -356, ! -564,-32768, 136,-32768,-32768,-32768,-32768,-32768,-32768, -334, ! -32768,-32768, -689, 106,-32768,-32768, 682, -714,-32768, 370, ! -32768,-32768, -706,-32768,-32768,-32768,-32768,-32768, 675, -298, ! 112, -918, -370, -183,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768, -993, 67,-32768, ! 70,-32768, 582,-32768, -722,-32768,-32768, 628, 633,-32768, ! -32768, 540, -405,-32768,-32768,-32768,-32768, 9,-32768, 280, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768, -11, -1, -462,-32768, 564,-32768, ! 428, 158, -476,-32768,-32768,-32768,-32768, -374,-32768,-32768, ! -32768,-32768, 578,-32768,-32768, 437,-32768,-32768,-32768, 498, ! -32768, 208, 520,-32768, 649, 654, -154,-32768, -279,-32768, ! -32768, 389, 496,-32768,-32768,-32768,-32768,-32768,-32768, 770, ! -32768,-32768,-32768 }; ! #define YYLAST 4824 ! static const short yytable[] = { 85, ! 213, 229, 87, 88, 279, 420, 91, 553, 85, 95, ! 63, 63, 93, 556, 533, 555, 56, 56, 529, 513, ! 90, 512, 90, 75, 76, 77, 439, 32, 32, 552, ! 414, 861, 500, 868, 33, 33, 285, 628, 457, 38, ! 38, 179, 181, 183, 643, 863, 106, 632, 115, 754, ! 124, 709, 133, 655, 142, 710, 151, 961, 160, 626, ! 169, 904, 862, 34, 34, 35, 35, 655, 713, 886, ! 406, 63, 903, 276, 545, 245, 934, 56, 252, 249, ! 368, 1035, 177, -115, 714, 90, 36, 36, 32, 90, ! 814, 707, 546, 56, 655, 33, 1089, -457, 322, 323, ! 38, 177, 177, 177, 1070, 37, 37, 922, 328, -458, ! 101, 56, 39, 39, 630, 72, 1030, 631, -1, 338, ! 890, 896, 253, 1129, 34, 987, 35, 81, 82, 254, ! 1107, 374, 177, 1090, 611, -459, 863, 445, -460, 81, ! 82, 177, 332, -2, -34, 861, 1004, 36, 96, 14, ! 177, 16, 1151, 862, 647, 1102, 632, 250, 255, 177, ! 256, 242, 715, 456, 1036, 716, 37, 78, 177, 656, ! 608, -115, 771, 39, 1007, 184, 657, 177, 815, 469, ! 327, -437, 1031, 656, 439, 500, 177, 1123, 405, 1108, ! 657, 914, 988, -438, 989, 177, 517, 8, 709, 83, ! 1130, 518, 710, 97, 84, 79, 536, 708, 1142, 1138, ! 656, 83, 98, 178, 711, 713, 84, 657, 56, -439, ! 14, 1015, -440, 381, 1124, 385, 386, 387, 96, 390, ! 391, 714, 739, 742, 745, 748, 264, 717, 707, 80, ! 1160, 81, 82, 14, 106, 1143, 115, 1059, 124, 763, ! 133, 452, 658, 16, 280, 466, -33, 753, 513, 993, ! 755, 709, 1098, 16, 461, 710, 658, 106, 614, 115, ! 446, 644, 750, 473, 1046, 655, 265, 266, 713, 477, ! 56, 478, 875, 97, 240, 56, 177, 176, 643, 501, ! 712, 441, 98, 658, 714, 451, 253, 56, 563, 870, ! 565, 707, 92, 254, 94, 450, 81, 82, 430, 715, ! 328, 752, 716, 83, 14, 431, 586, 281, 84, 474, ! 436, 612, 1082, 241, 535, 1048, 1050, 56, 542, 284, ! 81, 82, 255, 16, 256, 73, 74, 395, 396, 246, ! 56, 932, 859, 103, 432, 860, 433, 497, 498, 56, ! 861, 265, 266, 286, 708, 56, 112, 56, 242, 630, ! 247, 711, 631, 825, -580, 759, 14, 434, -580, 324, ! 760, 582, 899, 787, 520, 900, 96, 270, 83, 14, ! 81, 82, 248, 84, 90, 813, 435, 800, 570, 872, ! 802, 656, 180, 437, 576, 835, 421, 266, 657, 783, ! 174, 175, 83, 592, 784, 754, 251, 84, 420, 259, ! 242, 910, 422, 913, 754, 288, 56, 708, 457, 740, ! 743, 746, 749, 261, 711, 325, 869, 262, 730, 1144, ! 1145, 271, 446, 509, 326, 81, 82, 712, 265, 266, ! 272, 577, 510, 266, 106, 843, 115, 328, 124, 441, ! 133, 334, 83, 273, 530, 56, 859, 84, 668, 860, ! 335, 669, 96, 270, 56, 96, 430, 96, 81, 82, ! 378, 379, 380, 431, 658, 243, 532, 336, 436, 339, ! 81, 82, 16, 120, 7, 121, 340, 598, 265, 266, ! 9, 10, 11, 395, 396, 337, 244, 907, 965, 909, ! 712, 381, 432, 835, 433, 877, 416, 83, 14, 625, ! 417, 516, 84, 368, 724, 644, 725, 271, 727, 90, ! 893, 182, 883, 56, 369, 434, 272, 375, 962, 894, ! 266, 884, 266, 340, 253, 943, -392, -392, 56, 273, ! 83, 254, 56, 456, 435, 84, 377, 421, 266, 32, ! 446, 437, 83, 430, 423, 388, 33, 84, 262, 651, ! 431, 38, -256, 677, 655, 436, 652, 1043, 14, 1044, ! 255, 736, 256, 651, 781, 737, 400, 839, 782, 413, ! 652, 1039, 394, 415, 997, 34, 56, 35, 1153, 432, ! 56, 433, 56, 1154, 56, 985, 279, 699, 108, 417, ! 651, 975, 266, 117, 700, 265, 266, 652, 36, 705, ! 399, 986, 434, 753, 513, 262, 755, 1081, 653, 426, ! 905, 427, 753, 513, 1001, 755, 443, 37, 1002, 96, ! 882, 435, 653, 701, 39, 702, 458, 654, 437, 7, ! 121, 462, 970, 617, 266, 9, 10, 11, 1014, 463, ! 618, 654, 979, 1092, 464, 1093, 703, 475, 1079, 653, ! -82, 859, 1064, 14, 860, 106, 417, 124, 502, 142, ! 503, 160, 878, 878, 857, 704, 504, 1066, 654, 807, ! 656, 262, 706, 508, 883, 422, 422, 657, 519, 129, ! 7, 130, 1052, 884, 266, 521, 9, 10, 11, 912, ! -632, 104, 109, 113, 118, 525, 885, 526, 532, 140, ! 145, 149, 154, 106, 14, 115, 188, 124, 538, 133, ! 842, 142, 543, 151, 549, 160, 557, 169, 17, 18, ! 561, 554, 400, 56, 566, 856, 342, 344, 558, 636, ! 637, 638, 567, -634, 699, 571, 420, 574, 639, 516, ! 516, 700, 738, 741, 564, 747, 705, 1148, 973, 266, ! 866, 975, 266, 658, 580, 857, 56, 572, -258, 1158, ! 550, 551, 942, 374, 359, 360, 361, 32, 584, 1018, ! 701, 651, 702, 56, 33, 585, 56, 588, 652, 38, ! 559, 560, 7, 126, 32, 589, 56, 430, 9, 10, ! 11, 33, 924, 703, 431, 590, 38, 699, 926, 436, ! 1041, 1042, 591, 34, 700, 35, 156, 7, 157, 705, ! 593, 615, 704, 9, 10, 11, 856, 1136, 1137, 706, ! 34, 596, 35, 432, 944, 433, 36, 597, 619, 623, ! 653, 14, 93, 701, 627, 702, 532, 646, 1017, 667, ! 671, 90, 90, 36, 681, 37, 434, 889, 895, 654, ! 683, 581, 39, 690, 691, 1011, 703, 694, 696, 734, ! 532, 407, 37, 751, 866, 435, 629, 761, 776, 39, ! 56, 915, 437, 775, 780, 704, 785, 786, 788, 918, ! 264, 32, 706, 790, 837, -264, 799, 56, 33, 104, ! 109, 113, 118, 38, 801, 806, 978, 56, 253, 809, ! 636, 637, 638, 516, 516, 254, 7, 130, 253, 765, ! 96, 270, 9, 10, 11, 254, 811, 34, 757, 35, ! 819, 264, 782, 820, -286, 1062, 822, 867, 878, 838, ! 14, 902, 871, 371, 255, 516, 256, 1072, -286, 815, ! 36, 912, -31, 1078, 255, 928, 256, 125, 7, 126, ! 929, 930, -32, 911, 9, 10, 11, 407, 938, 37, ! -486, -486, -486, -486, 939, 271, 39, 940, -486, -486, ! -486, 945, 766, 767, 272, 948, 951, 968, -286, 964, ! 1094, 1095, -286, 1097, -486, 773, 774, 273, 1010, 969, ! 1013, 803, 804, 1012, 177, 805, 1025, 5, 102, 7, ! 103, 777, 777, 1026, 1034, 9, 10, 11, 1061, -486, ! 1051, 1058, 974, 976, 1063, 1068, 789, 791, 1069, 1020, ! 1071, 13, 1096, 14, 1101, 1106, -257, 1105, 1115, 1097, ! 1112, -486, 1116, 1131, 1118, 1125, -486, 1121, 1140, 395, ! 396, 636, 637, 638, 1120, -114, 16, 1132, 395, 396, ! 876, 1134, 1047, 1049, 165, 7, 166, 810, 1097, 1152, ! 651, 9, 10, 11, 1139, 1141, 1147, 652, 22, 866, ! 1150, 918, 1155, 24, 1156, 56, 1157, -252, 1162, 14, ! 952, 1122, 953, 954, 955, 956, 32, 1163, 622, 104, ! 109, 113, 118, 33, 674, 516, 516, 547, 38, 675, ! 531, 636, 637, 638, 516, 516, 678, 916, 516, 516, ! 963, 629, 355, 356, 357, 358, 359, 360, 361, 653, ! 459, 460, 34, 620, 35, 362, 363, 516, 364, 365, ! 366, 367, 908, -266, 1006, 933, 476, 1040, 654, 695, ! 562, 479, 480, 990, 995, 36, 485, 486, 487, 488, ! 489, 490, 491, 492, 493, 494, 495, 496, 357, 358, ! 359, 360, 361, 569, 37, 974, 976, 976, 693, 610, ! 1103, 39, 105, 110, 114, 119, 923, 613, 1104, 1133, ! 141, 146, 150, 155, 1135, 971, 1080, 972, 758, 779, ! 977, 881, 722, 772, 874, 980, 981, 723, 982, 1057, ! 770, 949, 950, 134, 7, 135, 812, 808, 672, 697, ! 9, 10, 11, 994, 698, 935, 998, 840, 999, 1000, ! 161, 7, 162, 686, 689, 7, 135, 9, 10, 11, ! 587, 9, 10, 11, 0, 122, 127, 131, 136, 0, ! 0, 983, 984, 158, 163, 167, 172, 123, 128, 132, ! 137, 5, 111, 7, 112, 159, 164, 168, 173, 9, ! 10, 11, 0, 0, 170, 7, 171, 610, 610, 744, ! 610, 9, 10, 11, 400, 13, 400, 14, 0, 594, ! 595, 0, -259, 0, 0, 0, 0, 0, 264, 0, ! 0, -286, 0, 1053, 125, 7, 126, 1055, 0, -265, ! 16, 9, 10, 11, 0, -286, 0, 0, 0, 0, ! 104, 109, 0, 263, 140, 145, -27, -27, -27, -27, ! 0, 0, 22, 0, -27, -27, -27, 24, 265, 266, ! 0, -254, 0, 0, 0, 0, 0, 0, 0, 264, ! -27, 0, -286, -267, 796, -286, 798, 1083, 1084, -286, ! 1085, 0, 0, 0, 0, 1086, -286, 1087, 104, 109, ! 113, 118, 692, 0, 1091, -27, 140, 145, 149, 154, ! 105, 110, 114, 119, 1008, 726, 161, 7, 162, 265, ! 266, 0, 0, 9, 10, 11, 0, -27, 0, 735, ! 0, 0, -27, 0, 0, 0, -286, 134, 7, 135, ! -286, -27, 0, 0, 9, 10, 11, 345, 346, 347, ! 1009, 348, 349, 350, 351, 352, 353, 354, 355, 356, ! 357, 358, 359, 360, 361, 354, 355, 356, 357, 358, ! 359, 360, 361, 122, 127, 131, 136, 14, 0, 0, ! 0, 0, 0, 0, 0, 123, 128, 132, 137, 0, ! 345, 346, 347, 0, 348, 349, 350, 351, 352, 353, ! 354, 355, 356, 357, 358, 359, 360, 361, 0, 0, ! 0, 370, 794, -462, -462, -462, -462, -462, -462, -462, ! 0, -462, -462, -462, -462, -462, 0, -462, -462, -462, ! -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, ! -462, -462, -462, -462, -462, -462, -462, -462, 170, 7, ! 171, 0, -462, 0, 0, 9, 10, 11, -462, 0, ! 947, -462, 0, -462, 828, 0, -462, -462, -462, 0, ! 0, 0, -462, -462, 0, 0, 0, -462, -462, 120, ! 7, 121, -462, 0, -462, -462, 9, 10, 11, -462, ! -462, 0, 0, 0, -462, 371, -462, -462, 0, -462, ! 0, -462, 0, 0, 14, 0, 0, 0, 0, 0, ! 105, 110, 114, 119, 991, 418, 0, 689, -19, -19, ! -19, -19, 0, 0, 0, 0, -19, -19, -19, 5, ! 138, 7, 139, 794, 0, 0, 0, 9, 10, 11, ! 0, 264, -19, 0, -286, 0, 0, 0, 0, 0, ! 0, 0, 0, 13, 0, 14, 0, 925, -286, 0, ! 0, 0, 0, 0, 0, 0, 0, -19, 0, 0, ! 828, 0, 0, 122, 127, 131, 136, 936, 16, 0, ! 0, 0, 937, 0, 0, 123, 128, 132, 137, -19, ! 0, 0, 0, 0, -19, 0, 0, 0, -286, 0, ! 22, 0, -286, -19, 0, 24, 0, 0, 0, -260, ! 156, 7, 157, 967, 0, 0, 0, 9, 10, 11, ! 129, 7, 130, 823, 0, 824, 82, 9, 10, 11, ! 187, 188, 744, 189, 0, 14, 0, 0, 0, 0, ! 0, 0, 828, 0, 0, 14, 0, 992, 0, 0, ! 996, 190, 0, 15, 0, 191, 192, 193, 194, 195, ! 0, 0, 0, 828, 196, 0, 828, 0, 828, 0, ! 197, 0, 0, 198, 0, 0, 0, 0, 199, 200, ! 201, 744, 0, 0, 202, 203, 0, 0, 825, 204, ! 205, 165, 7, 166, 206, 0, 207, 83, 9, 10, ! 11, 208, 84, 0, 1038, 0, 0, -314, 209, 210, ! 0, 826, 0, 211, 0, 0, 14, 1126, 1127, 352, ! 353, 354, 355, 356, 357, 358, 359, 360, 361, 1054, ! 0, 105, 110, 1056, 0, 141, 146, 0, 0, 0, ! 0, 828, 0, 0, 1060, 0, 0, 0, 424, 0, ! 0, -23, -23, -23, -23, 0, 0, 0, 0, -23, ! -23, -23, 5, 6, 7, 8, 0, 0, 650, 0, ! 9, 10, 11, 0, 264, -23, 0, -286, 0, 105, ! 110, 114, 119, 0, 0, 0, 13, 141, 146, 150, ! 155, -286, 122, 127, 0, 0, 158, 163, 0, 0, ! -23, 0, 0, 0, 123, 128, 0, 0, 159, 164, ! 0, 16, 0, 0, 265, 266, 0, 0, 0, 0, ! 0, 0, -23, 0, 0, 0, 0, -23, 0, 0, ! 0, -286, 0, 22, 0, -286, -23, 0, 24, 0, ! 0, 0, 122, 127, 131, 136, 0, 0, 0, 0, ! 158, 163, 167, 172, 123, 128, 132, 137, 0, 0, ! 0, 0, 159, 164, 168, 173, 600, 0, -486, -486, ! -486, -486, -486, -486, -486, 0, -486, -486, -486, -486, ! -486, 0, -486, -486, -486, -486, -486, -486, -486, -486, ! -486, -486, -486, -486, -486, -486, -486, 0, -486, -486, ! -486, -486, -486, 0, 0, 0, 0, -486, 0, 0, ! 0, 0, 0, -486, 0, 0, -486, 0, -486, 0, ! 0, -486, -486, -486, 0, 0, 0, -486, -486, 0, ! 0, 0, -486, -486, 0, 0, 0, -486, 0, -486, ! -486, 0, 0, 0, -486, -486, 0, 0, 0, -486, ! 0, -486, -486, 0, -486, 1027, -486, -464, -464, 0, ! 0, 0, -464, -464, 0, -464, 0, 0, 0, -464, ! 0, -464, -464, -464, -464, -464, -464, -464, -464, -464, ! -464, -464, 0, -464, 0, -464, 0, -464, -464, -464, ! -464, -464, 0, 0, 0, 0, -464, 0, 0, 0, ! 0, 0, -464, 0, 0, -464, 0, 0, 0, 0, ! -464, -464, -464, 0, 0, 0, -464, -464, 0, 0, ! 0, -464, -464, 0, 0, 0, -464, 0, -464, -464, ! 0, 0, 0, -464, -464, 0, 0, 0, -464, 0, ! -464, -464, 0, -464, 1073, -464, -493, -493, 0, 0, ! 0, -493, -493, 0, -493, 0, 0, 0, -493, 0, ! -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, ! -493, 0, -493, 0, -493, 0, -493, -493, -493, -493, ! -493, 0, 0, 0, 0, -493, 0, 0, 0, 0, ! 0, -493, 0, 0, -493, 0, 0, 0, 0, -493, ! -493, -493, 0, 0, 0, -493, -493, 0, 0, 0, ! -493, -493, 0, 0, 0, -493, 0, -493, -493, 0, ! 0, 0, -493, -493, 0, 0, 0, -493, 0, -493, ! -493, 0, -493, 329, -493, 186, 5, 0, 7, 8, ! 187, 188, 0, 189, 9, 10, 11, 349, 350, 351, ! 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, ! 13, 190, 14, 15, 0, 191, 192, 193, 194, 195, ! 0, 0, 0, 0, 196, 0, 0, 0, 0, 0, ! 197, 0, 0, 198, 0, 16, 0, 0, 199, 200, ! 201, 0, 0, 0, 202, 203, 0, 0, 0, 204, ! 205, 0, 0, 0, 206, 0, 207, 22, 0, 0, ! 0, 208, 24, 0, 0, 0, 0, 0, 209, 210, ! 0, 330, 823, 211, 824, 82, 0, 0, 0, 187, ! 188, 347, 189, 348, 349, 350, 351, 352, 353, 354, ! 355, 356, 357, 358, 359, 360, 361, 0, 0, 0, ! 190, 0, 15, 0, 191, 192, 193, 194, 195, 0, ! 0, 0, 0, 196, 0, 0, 0, 0, 0, 197, ! 0, 0, 198, 0, 0, 0, 0, 199, 200, 201, ! 0, 0, 0, 202, 203, 0, 0, 825, 204, 205, ! 0, 0, 0, 206, 0, 207, 83, 0, 0, 0, ! 208, 84, 0, 0, 0, 0, -380, 209, 210, 823, ! 826, 186, 211, 0, 0, 0, 187, 188, 0, 189, ! 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, ! 360, 361, 0, 0, 0, 0, 0, 190, 0, 15, ! 0, 191, 192, 193, 194, 195, 0, 0, 0, 0, ! 196, 0, -327, 0, 0, 0, 197, 0, 0, 198, ! 0, 0, 0, 0, 199, 200, 201, 0, 0, 0, ! 202, 203, 0, 0, -327, 204, 205, 0, 0, 0, ! 206, 792, 207, 186, 0, 0, 0, 208, 187, 188, ! 0, 189, 0, 0, 209, 210, 0, 826, 0, 211, ! 353, 354, 355, 356, 357, 358, 359, 360, 361, 190, ! 0, 15, 0, 191, 192, 193, 194, 195, 0, 0, ! 0, 0, 196, 0, 0, 0, 0, 0, 197, 0, ! 0, 198, 0, 0, 0, 0, 199, 200, 201, 0, ! 0, 0, 202, 203, 0, 0, 0, 204, 205, 0, ! 0, 0, 206, 823, 207, 186, 0, 0, 0, 208, ! 187, 188, 0, 189, 0, 0, 209, 210, 0, 793, ! 0, 211, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 190, 0, 15, 0, 191, 192, 193, 194, 195, ! 0, 0, 0, 0, 196, 0, 0, 0, 0, 0, ! 197, 0, 0, 198, 0, 0, 0, 0, 199, 200, ! 201, 0, 0, 0, 202, 203, 0, 0, 0, 204, ! 205, 0, 0, 0, 206, 0, 207, 0, 0, 0, ! 0, 208, 0, 0, 0, 0, 0, 0, 209, 210, ! 0, 826, 0, 211, 824, 845, 6, 7, 8, 187, ! 188, 0, 189, 9, 10, 11, 0, 0, 0, 0, ! 0, 0, 846, 847, 848, 849, 850, 851, 852, 13, ! 190, 14, 15, 0, 191, 192, 193, 194, 195, 0, ! 0, 0, 0, 196, 0, 0, 0, 0, 0, 197, ! 0, 0, 198, 0, 16, 0, 0, 199, 200, 201, ! 0, 0, 0, 202, 203, 0, 0, 0, 204, 205, ! 0, 0, 0, 206, 0, 207, 853, 0, 0, 0, ! 208, 854, 0, 0, 0, 855, 0, 209, 210, 0, ! 815, 0, 211, 186, 5, 402, 7, 8, 187, 188, ! 0, 189, 9, 10, 11, 0, 0, 5, 6, 7, ! 8, 0, 0, 898, 0, 9, 10, 11, 13, 190, ! 14, 15, 0, 191, 192, 193, 194, 195, 0, 0, ! 0, 13, 196, 14, 0, 0, 0, 0, 197, 0, ! 0, 198, 0, 16, 0, 0, 199, 200, 403, 0, ! 0, 0, 202, 203, 0, 0, 16, 204, 205, 0, ! 0, 0, 206, 0, 207, 22, 824, 82, 0, 208, ! 24, 187, 188, 0, 189, 0, 209, 210, 22, 0, ! 404, 211, 0, 24, 846, 847, 848, 849, 850, 851, ! 852, 0, 190, 0, 15, 0, 191, 192, 193, 194, ! 195, 0, 0, 0, 0, 196, 0, 0, 0, 0, ! 0, 197, 0, 0, 198, 0, 0, 0, 0, 199, ! 200, 201, 0, 0, 0, 202, 203, 0, 0, 0, ! 204, 205, 0, 0, 0, 206, 0, 207, 83, 0, ! 0, 0, 208, 84, 0, 0, 0, 855, 0, 209, ! 210, 0, 815, 0, 211, 186, 5, 6, 7, 8, ! 187, 188, 0, 189, 9, 10, 11, 351, 352, 353, ! 354, 355, 356, 357, 358, 359, 360, 361, 0, 0, ! 13, 190, 14, 15, 0, 191, 192, 193, 194, 195, ! 0, 0, 0, 0, 196, 0, 0, 0, 0, 0, ! 197, 0, 0, 198, 0, 16, 0, 0, 199, 200, ! 201, 0, 0, 0, 202, 203, 0, 0, 0, 204, ! 205, 0, 0, 0, 206, 0, 207, 22, 0, 0, ! 0, 208, 24, 0, 0, 0, 0, 0, 209, 210, ! 0, 186, 5, 211, 7, 8, 187, 188, 0, 189, ! 9, 10, 11, 0, 0, 5, 147, 7, 148, 0, ! 0, 0, 0, 9, 10, 11, 13, 190, 14, 15, ! 0, 191, 192, 193, 194, 195, 0, 0, 0, 13, ! 196, 14, 0, 0, 0, 0, 197, 0, 0, 198, ! 0, 16, 0, 0, 199, 200, 201, 0, 0, 0, ! 202, 203, 0, 0, 16, 204, 205, 0, 0, 0, ! 206, 0, 207, 22, 186, 0, 539, 208, 24, 187, ! 188, 0, 189, 0, 209, 210, 22, 0, 0, 211, ! 0, 24, 0, 0, 0, -262, 0, 0, 0, 0, ! 190, 0, 15, 0, 191, 192, 193, 194, 195, 0, ! 0, 0, 0, 196, 0, 0, 0, 0, 0, 197, ! 0, 0, 198, 0, 0, 0, 0, 199, 200, 540, ! 0, 0, 0, 202, 203, 0, 0, 0, 204, 205, ! 0, 186, 0, 206, 0, 207, 187, 188, 0, 189, ! 208, 0, 0, 0, 0, 0, 0, 209, 210, 0, ! 0, 541, 211, 0, 0, 0, 0, 190, 0, 15, ! 0, 191, 192, 193, 194, 195, 0, 0, 0, 0, ! 196, 0, 0, 0, 0, 0, 197, 0, 0, 198, ! 0, 0, 0, 0, 199, 200, 201, 0, 0, 0, ! 202, 203, 0, 0, 0, 204, 205, 0, 0, 0, ! 206, 0, 207, 465, 186, 0, 0, 208, 0, 187, ! 188, 0, 189, 0, 209, 210, 0, 0, 5, 211, ! 7, 103, 0, 0, 0, 0, 9, 10, 11, 0, ! 190, 0, 15, 0, 191, 192, 193, 194, 195, 0, ! 0, 0, 13, 196, 14, 0, 0, 0, 0, 197, ! 0, 0, 198, 0, 0, 0, 0, 199, 200, 201, ! 0, 0, 0, 202, 203, 0, 0, 16, 204, 205, ! 0, 186, 0, 206, 0, 207, 187, 188, 0, 189, ! 208, 0, 0, 0, 0, 0, 0, 209, 210, 22, ! 0, 537, 211, 0, 24, 0, 0, 190, 0, 15, ! 0, 191, 192, 193, 194, 195, 0, 0, 0, 0, ! 196, 0, 0, 0, 0, 0, 197, 0, 0, 198, ! 0, 0, 0, 0, 199, 200, 201, 0, 0, 0, ! 202, 203, 0, 0, 0, 204, 205, 0, 186, 0, ! 206, 0, 207, 187, 188, 0, 189, 208, 0, 0, ! 0, 0, 0, 0, 209, 210, 0, 581, 0, 211, ! 0, 0, 0, 0, 190, 0, 15, 0, 191, 192, ! 193, 194, 195, 0, 0, 0, 0, 196, 0, 0, ! 0, 0, 0, 197, 0, 0, 198, 0, 0, 0, ! 0, 199, 200, 201, 0, 0, 0, 202, 203, 0, ! 0, 0, 204, 205, 0, 186, 0, 206, 0, 207, ! 187, 188, 0, 189, 208, 0, 0, 0, 0, 0, ! 0, 209, 210, 0, 0, 670, 211, 0, 0, 0, ! 0, 190, 0, 15, 0, 191, 192, 193, 194, 195, ! 0, 0, 0, 0, 196, 0, 0, 0, 0, 0, ! 197, 0, 0, 198, 0, 0, 0, 0, 199, 200, ! 201, 0, 0, 0, 202, 203, 0, 0, 0, 204, ! 205, 0, 186, 0, 206, 0, 207, 187, 188, 0, ! 189, 208, 0, 0, 0, 0, 941, 0, 209, 210, ! 0, 0, 0, 211, 0, 0, 0, 0, 190, 0, ! 15, 0, 191, 192, 193, 194, 195, 0, 0, 0, ! 0, 196, 0, 0, 0, 0, 0, 197, 0, 0, ! 198, 0, 0, 0, 0, 199, 200, 201, 0, 0, ! 0, 202, 203, 0, 0, 0, 204, 205, 0, 186, ! 0, 206, 0, 207, 187, 188, 0, 189, 208, 0, ! 0, 0, 0, 0, 0, 209, 210, 0, 0, 0, ! 211, 0, 0, 0, 0, 190, 0, 15, 0, 191, ! 192, 193, 194, 195, 0, 0, 0, 0, 196, 0, ! 0, 0, 0, 0, 197, 0, 0, 198, 0, 0, ! 0, 0, 199, 200, 201, 0, 0, 0, 202, 203, ! 0, 0, 0, 341, 205, 0, 186, 0, 206, 0, ! 207, 187, 188, 0, 189, 208, 0, 0, 0, 0, ! 0, 0, 209, 210, 0, 0, 0, 211, 0, 0, ! 0, 0, 190, 0, 15, 0, 191, 192, 193, 194, ! 195, 0, 0, 0, 0, 196, 0, 0, 0, 0, ! 0, 197, 0, 0, 198, 0, 0, 0, 0, 199, ! 200, 201, 0, 0, 0, 202, 203, 0, 0, 0, ! 343, 205, 0, 621, 0, 206, 0, 207, 187, 188, ! 0, 189, 208, 0, 0, 0, 0, 0, 0, 209, ! 210, 0, 0, 0, 211, 0, 0, 0, 0, 190, ! 0, 15, 0, 191, 192, 193, 194, 195, 0, 0, ! 0, 0, 196, 0, 0, 0, 0, 0, 197, 0, ! 0, 198, 0, 0, 0, 0, 199, 200, 201, 0, ! 0, 0, 202, 203, 0, 0, 0, 204, 205, 0, ! 0, 0, 206, 5, 207, 7, 112, 0, 0, 208, ! 0, 9, 10, 11, 0, 0, 209, 210, 0, 407, ! 0, 211, -118, -118, -118, -118, 0, 13, -118, 14, ! -118, -118, -118, 0, 0, 0, 407, 0, 0, 5, ! 6, 7, 8, 0, 0, 0, -118, 9, 10, 11, ! 0, 0, 16, 0, 0, 0, 407, 0, 0, -653, ! -653, -653, -653, 13, 0, 14, 0, -653, -653, -653, ! 0, -118, 0, 0, 22, 0, 0, 0, 0, 24, ! 0, 0, 0, -653, 0, -653, 0, 0, 16, 0, ! 0, 641, 0, -118, 5, 0, 7, 8, -118, 0, ! 0, 0, 9, 10, 11, 0, 0, -118, -653, 0, ! 22, 0, 0, 0, 0, 24, 0, 0, 13, 0, ! 14, 0, 0, 0, -651, 0, 0, 0, 0, 0, ! -653, 0, 0, 0, 0, -653, 0, 289, 290, 0, ! 291, 292, 0, 16, -653, 293, 294, 295, 296, 297, ! 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, ! 308, 309, 310, 311, 0, 22, -610, -610, -610, 0, ! 24, 0, 0, 641, 642, -610, 5, 0, 7, 8, ! 312, 0, 0, 0, 9, 10, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 13, 0, 14, 0, 0, 0, 0, 428, 0, 314, ! 5, 0, 7, 8, 315, 0, 0, 0, 9, 10, ! 11, 0, 454, 0, 0, 16, 0, 0, 0, 0, ! 5, 6, 7, 8, 13, 0, 14, 15, 9, 10, ! 11, 0, 0, 0, 0, 0, 0, 22, -609, -609, ! -609, 0, 24, 0, 13, 0, 642, -609, 4, 16, ! -127, 5, 6, 7, 8, 0, 0, 0, 0, 9, ! 10, 11, 0, 0, 0, 0, 0, 0, 0, 16, ! 0, 22, 0, 0, 12, 13, 24, 14, 15, 0, ! 429, -383, 4, 0, -127, 5, 6, 7, 8, 0, ! 0, 22, 0, 9, 10, 11, 24, 0, 0, 0, ! 16, 0, 0, 17, 18, -127, 0, 0, 0, 13, ! 0, 14, 0, 0, -127, 0, 19, 20, 21, 0, ! 0, 0, 22, 0, 0, 0, 23, 24, 25, 26, ! 0, 27, 0, 0, 16, 0, 0, 17, 18, -127, ! 4, 0, -127, 5, 6, 7, 8, 0, -127, 0, ! 0, 9, 10, 11, 0, 0, 22, 0, 0, 0, ! 0, 24, 0, 0, 0, 27, 0, 13, 648, 14, ! 649, 5, 6, 7, 8, 0, 0, 650, 0, 9, ! 10, 11, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 16, 0, 0, 13, 0, -127, 0, 648, ! 0, 0, 5, 6, 7, 8, -127, 0, 650, 0, ! 9, 10, 11, 0, 22, 0, 0, 0, 0, 24, ! 16, 0, 0, 27, 0, 0, 13, 0, 5, 107, ! 7, 108, 0, 0, 0, 0, 9, 10, 11, 0, ! 0, 0, 22, 0, 0, 0, 0, 24, 0, 0, ! -548, 16, 13, 0, 0, 0, 5, 116, 7, 117, ! 0, 0, 0, 0, 9, 10, 11, 0, 0, 0, ! 0, 0, 0, 22, 0, 0, 0, 16, 24, 0, ! 13, -548, 5, 143, 7, 144, 0, 0, 0, 0, ! 9, 10, 11, 5, 152, 7, 153, 0, 0, 22, ! 0, 9, 10, 11, 24, 16, 13, 0, -253, 0, ! 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, ! 0, 16, 24, 0, 0, 0, -255, 0, 428, 0, ! 0, 5, 16, 7, 8, 0, 0, 0, 0, 9, ! 10, 11, 0, 22, 0, 0, 0, 0, 24, 0, ! 0, 0, -261, 0, 22, 13, 0, 14, 15, 24, ! 0, 0, 0, -263, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 289, 290, 0, 291, 292, 0, 0, ! 16, 293, 294, 295, 296, 297, 298, 299, 300, 301, ! 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, ! 0, 0, 22, 0, 0, 0, 0, 24, 0, 289, ! 290, 0, 291, 292, 0, 0, 312, 293, 294, 295, ! 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, ! 306, 307, 308, 309, 310, 311, 0, 313, 0, 0, ! 0, 0, 0, 0, 0, 314, 0, 0, 0, 0, ! 315, 0, 468, 289, 290, 0, 291, 292, 0, 0, ! 0, 293, 294, 295, 296, 297, 298, 299, 300, 301, ! 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, ! 0, 314, 0, 0, 0, 0, 315, 0, 0, 289, ! 290, 0, 291, 292, 0, 0, 312, 293, 294, 295, ! 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, ! 306, 307, 308, 309, 310, 311, 0, 0, 5, 102, ! 7, 103, 0, 0, 0, 314, 9, 10, 11, 0, ! 315, 0, 729, 0, 0, 0, 0, 0, 5, 138, ! 7, 139, 13, 0, 14, 0, 9, 10, 11, 5, ! 111, 7, 112, 0, 0, 0, 0, 9, 10, 11, ! 0, 314, 13, 0, 14, 0, 315, 16, 0, 5, ! 147, 7, 148, 13, 0, 14, 0, 9, 10, 11, ! 0, 0, 5, 6, 7, 8, 0, 16, 0, 22, ! 9, 10, 11, 13, 24, 14, 0, 0, 16, 0, ! 0, 0, 5, 0, 7, 8, 13, 0, 14, 22, ! 9, 10, 11, 0, 24, 0, 0, 0, 16, 0, ! 22, 0, 0, 0, 0, 24, 13, 0, 14, 0, ! 0, 16, 0, 5, 107, 7, 108, 0, 0, 0, ! 22, 9, 10, 11, 0, 24, 5, 143, 7, 144, ! 0, 16, 0, 22, 9, 10, 11, 13, 24, 5, ! 116, 7, 117, 0, 0, 0, 0, 9, 10, 11, ! 13, 0, 0, 22, 0, 0, 0, 5, 24, 7, ! 108, 0, 16, 13, 0, 9, 10, 11, 5, 152, ! 7, 153, 0, 0, 0, 16, 9, 10, 11, 0, ! 0, 13, 0, 0, 22, 0, 0, 0, 16, 24, ! 0, 0, 13, 0, 0, 0, 0, 22, 0, 0, ! 0, 0, 24, 0, 0, 0, 16, 0, 0, 0, ! 22, 5, 0, 7, 117, 24, 0, 16, 0, 9, ! 10, 11, 0, 0, 0, 0, 0, 0, 22, 0, ! 0, 0, 0, 24, 0, 13, 0, 0, 0, 22, ! 0, 345, 346, 347, 24, 348, 349, 350, 351, 352, ! 353, 354, 355, 356, 357, 358, 359, 360, 361, 0, ! 16, 345, 346, 347, 0, 348, 349, 350, 351, 352, ! 353, 354, 355, 356, 357, 358, 359, 360, 361, 0, ! 0, 0, 22, 0, 0, 0, 578, 24, 345, 346, ! 347, 0, 348, 349, 350, 351, 352, 353, 354, 355, ! 356, 357, 358, 359, 360, 361, 579, 345, 346, 347, ! 0, 348, 349, 350, 351, 352, 353, 354, 355, 356, ! 357, 358, 359, 360, 361, 0, 0, 0, 0, 0, ! 0, 0, 0, 821, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 1003, 345, 346, ! 347, 1088, 348, 349, 350, 351, 352, 353, 354, 355, ! 356, 357, 358, 359, 360, 361, 345, 346, 347, 0, ! 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, ! 358, 359, 360, 361 }; ! static const short yycheck[] = { 16, ! 78, 79, 19, 20, 175, 276, 23, 419, 25, 26, ! 2, 3, 24, 425, 399, 421, 2, 3, 393, 376, ! 22, 376, 24, 9, 10, 11, 283, 2, 3, 417, ! 271, 752, 366, 756, 2, 3, 180, 524, 318, 2, ! 3, 58, 59, 60, 528, 752, 32, 524, 34, 614, ! 36, 572, 38, 534, 40, 572, 42, 866, 44, 522, ! 46, 789, 752, 2, 3, 2, 3, 548, 572, 778, ! 266, 63, 787, 174, 409, 87, 834, 63, 95, 91, ! 9, 1, 56, 1, 572, 87, 2, 3, 63, 91, ! 1, 572, 10, 79, 575, 63, 46, 1, 191, 192, ! 63, 75, 76, 77, 1023, 2, 3, 814, 201, 1, ! 31, 97, 2, 3, 524, 3, 1, 524, 0, 212, ! 778, 779, 97, 1117, 63, 906, 63, 3, 4, 97, ! 9, 224, 106, 83, 505, 1, 843, 1, 1, 3, ! 4, 115, 204, 0, 46, 866, 927, 63, 3, 30, ! 124, 53, 1146, 843, 83, 1074, 633, 84, 97, 133, ! 97, 88, 572, 318, 84, 572, 63, 67, 142, 534, ! 505, 89, 635, 63, 932, 63, 534, 151, 89, 334, ! 197, 85, 67, 548, 441, 519, 160, 46, 266, 68, ! 548, 46, 907, 85, 909, 169, 83, 7, 719, 75, ! 1119, 88, 719, 58, 80, 67, 402, 572, 46, 1128, ! 575, 75, 67, 89, 572, 719, 80, 575, 204, 85, ! 30, 949, 85, 240, 83, 242, 243, 244, 3, 246, ! 247, 719, 603, 604, 605, 606, 27, 572, 719, 67, ! 1159, 3, 4, 30, 230, 83, 232, 1005, 234, 624, ! 236, 313, 534, 53, 175, 333, 46, 614, 615, 46, ! 615, 782, 1071, 53, 326, 782, 548, 253, 509, 255, ! 287, 528, 607, 335, 983, 756, 67, 68, 782, 341, ! 266, 343, 769, 58, 67, 271, 260, 84, 772, 367, ! 572, 283, 67, 575, 782, 312, 271, 283, 442, 762, ! 444, 782, 23, 271, 25, 67, 3, 4, 283, 719, ! 403, 610, 719, 75, 30, 283, 471, 73, 80, 336, ! 283, 505, 1045, 53, 402, 983, 984, 313, 406, 89, ! 3, 4, 271, 53, 271, 84, 85, 258, 259, 46, ! 326, 44, 752, 7, 283, 752, 283, 364, 365, 335, ! 1071, 67, 68, 89, 719, 341, 7, 343, 88, 769, ! 67, 719, 769, 66, 84, 83, 30, 283, 88, 67, ! 88, 464, 782, 672, 386, 782, 3, 4, 75, 30, ! 3, 4, 89, 80, 386, 720, 283, 686, 450, 764, ! 689, 756, 89, 283, 67, 729, 67, 68, 756, 83, ! 48, 49, 75, 481, 88, 970, 84, 80, 679, 98, ! 88, 799, 277, 801, 979, 89, 402, 782, 698, 603, ! 604, 605, 606, 84, 782, 67, 760, 88, 583, 1136, ! 1137, 58, 449, 58, 67, 3, 4, 719, 67, 68, ! 67, 458, 67, 68, 430, 744, 432, 540, 434, 441, ! 436, 67, 75, 80, 83, 441, 866, 80, 536, 866, ! 67, 539, 3, 4, 450, 3, 441, 3, 3, 4, ! 5, 6, 7, 441, 756, 46, 397, 67, 441, 83, ! 3, 4, 53, 5, 6, 7, 88, 504, 67, 68, ! 12, 13, 14, 414, 415, 9, 67, 796, 873, 798, ! 782, 518, 441, 837, 441, 46, 84, 75, 30, 521, ! 88, 376, 80, 9, 576, 772, 578, 58, 580, 521, ! 58, 89, 58, 509, 91, 441, 67, 83, 83, 67, ! 68, 67, 68, 88, 509, 58, 84, 85, 524, 80, ! 75, 509, 528, 698, 441, 80, 83, 67, 68, 524, ! 567, 441, 75, 528, 84, 89, 524, 80, 88, 534, ! 528, 524, 84, 83, 1045, 528, 534, 973, 30, 975, ! 509, 84, 509, 548, 84, 88, 265, 732, 88, 268, ! 548, 969, 84, 272, 46, 524, 572, 524, 83, 528, ! 576, 528, 578, 88, 580, 84, 767, 572, 7, 88, ! 575, 67, 68, 7, 572, 67, 68, 575, 524, 572, ! 67, 84, 528, 970, 971, 88, 971, 83, 534, 67, ! 791, 85, 979, 980, 84, 980, 85, 524, 88, 3, ! 4, 528, 548, 572, 524, 572, 46, 534, 528, 6, ! 7, 83, 883, 67, 68, 12, 13, 14, 947, 83, ! 515, 548, 893, 1065, 83, 1067, 572, 84, 1033, 575, ! 46, 1071, 84, 30, 1071, 651, 88, 653, 9, 655, ! 83, 657, 773, 774, 752, 572, 32, 84, 575, 696, ! 1045, 88, 572, 83, 58, 550, 551, 1045, 67, 5, ! 6, 7, 991, 67, 68, 83, 12, 13, 14, 800, ! 71, 32, 33, 34, 35, 89, 80, 83, 629, 40, ! 41, 42, 43, 699, 30, 701, 9, 703, 90, 705, ! 737, 707, 84, 709, 44, 711, 75, 713, 56, 57, ! 84, 420, 421, 719, 44, 752, 216, 217, 427, 76, ! 77, 78, 88, 71, 719, 83, 1017, 10, 85, 614, ! 615, 719, 603, 604, 443, 606, 719, 1142, 67, 68, ! 752, 67, 68, 1045, 88, 843, 752, 84, 84, 1154, ! 414, 415, 850, 866, 58, 59, 60, 752, 46, 950, ! 719, 756, 719, 769, 752, 83, 772, 83, 756, 752, ! 438, 439, 6, 7, 769, 83, 782, 772, 12, 13, ! 14, 769, 819, 719, 772, 83, 769, 782, 825, 772, ! 970, 971, 83, 752, 782, 752, 5, 6, 7, 782, ! 46, 510, 719, 12, 13, 14, 843, 1126, 1127, 719, ! 769, 83, 769, 772, 851, 772, 752, 90, 83, 89, ! 756, 30, 854, 782, 71, 782, 767, 71, 949, 90, ! 90, 853, 854, 769, 44, 752, 772, 778, 779, 756, ! 83, 89, 752, 85, 85, 943, 782, 85, 83, 46, ! 791, 1, 769, 85, 866, 772, 524, 83, 83, 769, ! 866, 802, 772, 84, 83, 782, 90, 90, 84, 810, ! 27, 866, 782, 84, 46, 84, 88, 883, 866, 230, ! 231, 232, 233, 866, 88, 85, 892, 893, 883, 84, ! 76, 77, 78, 778, 779, 883, 6, 7, 893, 85, ! 3, 4, 12, 13, 14, 893, 84, 866, 617, 866, ! 83, 27, 88, 83, 30, 1013, 83, 83, 1039, 90, ! 30, 3, 71, 85, 883, 810, 883, 1025, 44, 89, ! 866, 1052, 46, 1031, 893, 46, 893, 5, 6, 7, ! 85, 88, 46, 46, 12, 13, 14, 1, 46, 866, ! 4, 5, 6, 7, 84, 58, 866, 84, 12, 13, ! 14, 7, 630, 631, 67, 84, 84, 46, 84, 71, ! 1068, 1069, 88, 1071, 28, 643, 644, 80, 84, 88, ! 67, 690, 691, 84, 978, 694, 67, 4, 5, 6, ! 7, 659, 660, 16, 71, 12, 13, 14, 84, 53, ! 85, 85, 887, 888, 46, 67, 674, 675, 67, 950, ! 67, 28, 17, 30, 83, 71, 84, 83, 83, 1117, ! 84, 75, 83, 1121, 84, 88, 80, 67, 83, 970, ! 971, 76, 77, 78, 84, 89, 53, 90, 979, 980, ! 85, 84, 983, 984, 5, 6, 7, 715, 1146, 1147, ! 1045, 12, 13, 14, 84, 9, 67, 1045, 75, 1071, ! 84, 1002, 83, 80, 83, 1071, 84, 84, 0, 30, ! 15, 1108, 17, 18, 19, 20, 1071, 0, 519, 430, ! 431, 432, 433, 1071, 548, 970, 971, 410, 1071, 548, ! 397, 76, 77, 78, 979, 980, 552, 806, 983, 984, ! 85, 769, 54, 55, 56, 57, 58, 59, 60, 1045, ! 324, 325, 1071, 518, 1071, 62, 63, 1002, 65, 66, ! 67, 68, 797, 84, 930, 833, 340, 970, 1045, 569, ! 441, 345, 346, 910, 913, 1071, 350, 351, 352, 353, ! 354, 355, 356, 357, 358, 359, 360, 361, 56, 57, ! 58, 59, 60, 449, 1071, 1040, 1041, 1042, 567, 505, ! 1075, 1071, 32, 33, 34, 35, 817, 506, 1077, 1123, ! 40, 41, 42, 43, 1125, 884, 1039, 886, 617, 660, ! 889, 774, 575, 640, 768, 894, 895, 575, 897, 1002, ! 633, 859, 860, 5, 6, 7, 719, 698, 544, 571, ! 12, 13, 14, 912, 571, 837, 915, 732, 917, 918, ! 5, 6, 7, 559, 560, 6, 7, 12, 13, 14, ! 471, 12, 13, 14, -1, 36, 37, 38, 39, -1, ! -1, 899, 900, 44, 45, 46, 47, 36, 37, 38, ! 39, 4, 5, 6, 7, 44, 45, 46, 47, 12, ! 13, 14, -1, -1, 5, 6, 7, 603, 604, 605, ! 606, 12, 13, 14, 973, 28, 975, 30, -1, 483, ! 484, -1, 84, -1, -1, -1, -1, -1, 27, -1, ! -1, 30, -1, 992, 5, 6, 7, 996, -1, 84, ! 53, 12, 13, 14, -1, 44, -1, -1, -1, -1, ! 651, 652, -1, 1, 655, 656, 4, 5, 6, 7, ! -1, -1, 75, -1, 12, 13, 14, 80, 67, 68, ! -1, 84, -1, -1, -1, -1, -1, -1, -1, 27, ! 28, -1, 30, 84, 680, 84, 682, 1046, 1047, 88, ! 1049, -1, -1, -1, -1, 1054, 44, 1056, 699, 700, ! 701, 702, 566, -1, 1063, 53, 707, 708, 709, 710, ! 230, 231, 232, 233, 10, 579, 5, 6, 7, 67, ! 68, -1, -1, 12, 13, 14, -1, 75, -1, 593, ! -1, -1, 80, -1, -1, -1, 84, 5, 6, 7, ! 88, 89, -1, -1, 12, 13, 14, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, ! 56, 57, 58, 59, 60, 53, 54, 55, 56, 57, ! 58, 59, 60, 234, 235, 236, 237, 30, -1, -1, ! -1, -1, -1, -1, -1, 234, 235, 236, 237, -1, ! 43, 44, 45, -1, 47, 48, 49, 50, 51, 52, ! 53, 54, 55, 56, 57, 58, 59, 60, -1, -1, ! -1, 1, 676, 3, 4, 5, 6, 7, 8, 9, ! -1, 11, 12, 13, 14, 15, -1, 17, 18, 19, ! 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, ! 30, 31, 32, 33, 34, 35, 36, 37, 5, 6, ! 7, -1, 42, -1, -1, 12, 13, 14, 48, -1, ! 856, 51, -1, 53, 728, -1, 56, 57, 58, -1, ! -1, -1, 62, 63, -1, -1, -1, 67, 68, 5, ! 6, 7, 72, -1, 74, 75, 12, 13, 14, 79, ! 80, -1, -1, -1, 84, 85, 86, 87, -1, 89, ! -1, 91, -1, -1, 30, -1, -1, -1, -1, -1, ! 430, 431, 432, 433, 910, 1, -1, 913, 4, 5, ! 6, 7, -1, -1, -1, -1, 12, 13, 14, 4, ! 5, 6, 7, 797, -1, -1, -1, 12, 13, 14, ! -1, 27, 28, -1, 30, -1, -1, -1, -1, -1, ! -1, -1, -1, 28, -1, 30, -1, 821, 44, -1, ! -1, -1, -1, -1, -1, -1, -1, 53, -1, -1, ! 834, -1, -1, 434, 435, 436, 437, 841, 53, -1, ! -1, -1, 846, -1, -1, 434, 435, 436, 437, 75, ! -1, -1, -1, -1, 80, -1, -1, -1, 84, -1, ! 75, -1, 88, 89, -1, 80, -1, -1, -1, 84, ! 5, 6, 7, 877, -1, -1, -1, 12, 13, 14, ! 5, 6, 7, 1, -1, 3, 4, 12, 13, 14, ! 8, 9, 1028, 11, -1, 30, -1, -1, -1, -1, ! -1, -1, 906, -1, -1, 30, -1, 911, -1, -1, ! 914, 29, -1, 31, -1, 33, 34, 35, 36, 37, ! -1, -1, -1, 927, 42, -1, 930, -1, 932, -1, ! 48, -1, -1, 51, -1, -1, -1, -1, 56, 57, ! 58, 1077, -1, -1, 62, 63, -1, -1, 66, 67, ! 68, 5, 6, 7, 72, -1, 74, 75, 12, 13, ! 14, 79, 80, -1, 968, -1, -1, 85, 86, 87, ! -1, 89, -1, 91, -1, -1, 30, 1113, 1114, 51, ! 52, 53, 54, 55, 56, 57, 58, 59, 60, 993, ! -1, 651, 652, 997, -1, 655, 656, -1, -1, -1, ! -1, 1005, -1, -1, 1008, -1, -1, -1, 1, -1, ! -1, 4, 5, 6, 7, -1, -1, -1, -1, 12, ! 13, 14, 4, 5, 6, 7, -1, -1, 10, -1, ! 12, 13, 14, -1, 27, 28, -1, 30, -1, 699, ! 700, 701, 702, -1, -1, -1, 28, 707, 708, 709, ! 710, 44, 653, 654, -1, -1, 657, 658, -1, -1, ! 53, -1, -1, -1, 653, 654, -1, -1, 657, 658, ! -1, 53, -1, -1, 67, 68, -1, -1, -1, -1, ! -1, -1, 75, -1, -1, -1, -1, 80, -1, -1, ! -1, 84, -1, 75, -1, 88, 89, -1, 80, -1, ! -1, -1, 703, 704, 705, 706, -1, -1, -1, -1, ! 711, 712, 713, 714, 703, 704, 705, 706, -1, -1, ! -1, -1, 711, 712, 713, 714, 1, -1, 3, 4, ! 5, 6, 7, 8, 9, -1, 11, 12, 13, 14, ! 15, -1, 17, 18, 19, 20, 21, 22, 23, 24, ! 25, 26, 27, 28, 29, 30, 31, -1, 33, 34, ! 35, 36, 37, -1, -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, 84, ! -1, 86, 87, -1, 89, 1, 91, 3, 4, -1, ! -1, -1, 8, 9, -1, 11, -1, -1, -1, 15, ! -1, 17, 18, 19, 20, 21, 22, 23, 24, 25, ! 26, 27, -1, 29, -1, 31, -1, 33, 34, 35, ! 36, 37, -1, -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, -1, 84, -1, ! 86, 87, -1, 89, 1, 91, 3, 4, -1, -1, ! -1, 8, 9, -1, 11, -1, -1, -1, 15, -1, ! 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, ! 27, -1, 29, -1, 31, -1, 33, 34, 35, 36, ! 37, -1, -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, -1, 84, -1, 86, ! 87, -1, 89, 1, 91, 3, 4, -1, 6, 7, ! 8, 9, -1, 11, 12, 13, 14, 48, 49, 50, ! 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, ! 28, 29, 30, 31, -1, 33, 34, 35, 36, 37, ! -1, -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, 86, 87, ! -1, 89, 1, 91, 3, 4, -1, -1, -1, 8, ! 9, 45, 11, 47, 48, 49, 50, 51, 52, 53, ! 54, 55, 56, 57, 58, 59, 60, -1, -1, -1, ! 29, -1, 31, -1, 33, 34, 35, 36, 37, -1, ! -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, 85, 86, 87, 1, ! 89, 3, 91, -1, -1, -1, 8, 9, -1, 11, ! 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, ! 59, 60, -1, -1, -1, -1, -1, 29, -1, 31, ! -1, 33, 34, 35, 36, 37, -1, -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, -1, ! 72, 1, 74, 3, -1, -1, -1, 79, 8, 9, ! -1, 11, -1, -1, 86, 87, -1, 89, -1, 91, ! 52, 53, 54, 55, 56, 57, 58, 59, 60, 29, ! -1, 31, -1, 33, 34, 35, 36, 37, -1, -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, 3, -1, -1, -1, 79, ! 8, 9, -1, 11, -1, -1, 86, 87, -1, 89, ! -1, 91, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, 29, -1, 31, -1, 33, 34, 35, 36, 37, ! -1, -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, 86, 87, ! -1, 89, -1, 91, 3, 4, 5, 6, 7, 8, ! 9, -1, 11, 12, 13, 14, -1, -1, -1, -1, ! -1, -1, 21, 22, 23, 24, 25, 26, 27, 28, ! 29, 30, 31, -1, 33, 34, 35, 36, 37, -1, ! -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, 84, -1, 86, 87, -1, ! 89, -1, 91, 3, 4, 5, 6, 7, 8, 9, ! -1, 11, 12, 13, 14, -1, -1, 4, 5, 6, ! 7, -1, -1, 10, -1, 12, 13, 14, 28, 29, ! 30, 31, -1, 33, 34, 35, 36, 37, -1, -1, ! -1, 28, 42, 30, -1, -1, -1, -1, 48, -1, ! -1, 51, -1, 53, -1, -1, 56, 57, 58, -1, ! -1, -1, 62, 63, -1, -1, 53, 67, 68, -1, ! -1, -1, 72, -1, 74, 75, 3, 4, -1, 79, ! 80, 8, 9, -1, 11, -1, 86, 87, 75, -1, ! 90, 91, -1, 80, 21, 22, 23, 24, 25, 26, ! 27, -1, 29, -1, 31, -1, 33, 34, 35, 36, ! 37, -1, -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, -1, 84, -1, 86, ! 87, -1, 89, -1, 91, 3, 4, 5, 6, 7, ! 8, 9, -1, 11, 12, 13, 14, 50, 51, 52, ! 53, 54, 55, 56, 57, 58, 59, 60, -1, -1, ! 28, 29, 30, 31, -1, 33, 34, 35, 36, 37, ! -1, -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, 86, 87, ! -1, 3, 4, 91, 6, 7, 8, 9, -1, 11, ! 12, 13, 14, -1, -1, 4, 5, 6, 7, -1, ! -1, -1, -1, 12, 13, 14, 28, 29, 30, 31, ! -1, 33, 34, 35, 36, 37, -1, -1, -1, 28, ! 42, 30, -1, -1, -1, -1, 48, -1, -1, 51, ! -1, 53, -1, -1, 56, 57, 58, -1, -1, -1, ! 62, 63, -1, -1, 53, 67, 68, -1, -1, -1, ! 72, -1, 74, 75, 3, -1, 5, 79, 80, 8, ! 9, -1, 11, -1, 86, 87, 75, -1, -1, 91, ! -1, 80, -1, -1, -1, 84, -1, -1, -1, -1, ! 29, -1, 31, -1, 33, 34, 35, 36, 37, -1, ! -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, 3, -1, 72, -1, 74, 8, 9, -1, 11, ! 79, -1, -1, -1, -1, -1, -1, 86, 87, -1, ! -1, 90, 91, -1, -1, -1, -1, 29, -1, 31, ! -1, 33, 34, 35, 36, 37, -1, -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, 3, -1, -1, 79, -1, 8, ! 9, -1, 11, -1, 86, 87, -1, -1, 4, 91, 6, 7, -1, -1, -1, -1, 12, 13, 14, -1, ! 29, -1, 31, -1, 33, 34, 35, 36, 37, -1, ! -1, -1, 28, 42, 30, -1, -1, -1, -1, 48, ! -1, -1, 51, -1, -1, -1, -1, 56, 57, 58, ! -1, -1, -1, 62, 63, -1, -1, 53, 67, 68, ! -1, 3, -1, 72, -1, 74, 8, 9, -1, 11, ! 79, -1, -1, -1, -1, -1, -1, 86, 87, 75, ! -1, 90, 91, -1, 80, -1, -1, 29, -1, 31, ! -1, 33, 34, 35, 36, 37, -1, -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, 3, -1, ! 72, -1, 74, 8, 9, -1, 11, 79, -1, -1, ! -1, -1, -1, -1, 86, 87, -1, 89, -1, 91, ! -1, -1, -1, -1, 29, -1, 31, -1, 33, 34, ! 35, 36, 37, -1, -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, 3, -1, 72, -1, 74, ! 8, 9, -1, 11, 79, -1, -1, -1, -1, -1, ! -1, 86, 87, -1, -1, 90, 91, -1, -1, -1, ! -1, 29, -1, 31, -1, 33, 34, 35, 36, 37, ! -1, -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, 3, -1, 72, -1, 74, 8, 9, -1, ! 11, 79, -1, -1, -1, -1, 84, -1, 86, 87, ! -1, -1, -1, 91, -1, -1, -1, -1, 29, -1, ! 31, -1, 33, 34, 35, 36, 37, -1, -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, 3, ! -1, 72, -1, 74, 8, 9, -1, 11, 79, -1, ! -1, -1, -1, -1, -1, 86, 87, -1, -1, -1, ! 91, -1, -1, -1, -1, 29, -1, 31, -1, 33, ! 34, 35, 36, 37, -1, -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, 3, -1, 72, -1, ! 74, 8, 9, -1, 11, 79, -1, -1, -1, -1, ! -1, -1, 86, 87, -1, -1, -1, 91, -1, -1, ! -1, -1, 29, -1, 31, -1, 33, 34, 35, 36, ! 37, -1, -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, 3, -1, 72, -1, 74, 8, 9, ! -1, 11, 79, -1, -1, -1, -1, -1, -1, 86, ! 87, -1, -1, -1, 91, -1, -1, -1, -1, 29, ! -1, 31, -1, 33, 34, 35, 36, 37, -1, -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, 4, 74, 6, 7, -1, -1, 79, ! -1, 12, 13, 14, -1, -1, 86, 87, -1, 1, ! -1, 91, 4, 5, 6, 7, -1, 28, 10, 30, ! 12, 13, 14, -1, -1, -1, 1, -1, -1, 4, ! 5, 6, 7, -1, -1, -1, 28, 12, 13, 14, ! -1, -1, 53, -1, -1, -1, 1, -1, -1, 4, ! 5, 6, 7, 28, -1, 30, -1, 12, 13, 14, ! -1, 53, -1, -1, 75, -1, -1, -1, -1, 80, ! -1, -1, -1, 28, -1, 30, -1, -1, 53, -1, ! -1, 1, -1, 75, 4, -1, 6, 7, 80, -1, ! -1, -1, 12, 13, 14, -1, -1, 89, 53, -1, ! 75, -1, -1, -1, -1, 80, -1, -1, 28, -1, ! 30, -1, -1, -1, 89, -1, -1, -1, -1, -1, ! 75, -1, -1, -1, -1, 80, -1, 3, 4, -1, ! 6, 7, -1, 53, 89, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, ! 26, 27, 28, 29, -1, 75, 76, 77, 78, -1, ! 80, -1, -1, 1, 84, 85, 4, -1, 6, 7, ! 46, -1, -1, -1, 12, 13, 14, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! 28, -1, 30, -1, -1, -1, -1, 1, -1, 75, ! 4, -1, 6, 7, 80, -1, -1, -1, 12, 13, ! 14, -1, 88, -1, -1, 53, -1, -1, -1, -1, ! 4, 5, 6, 7, 28, -1, 30, 31, 12, 13, ! 14, -1, -1, -1, -1, -1, -1, 75, 76, 77, ! 78, -1, 80, -1, 28, -1, 84, 85, 1, 53, ! 3, 4, 5, 6, 7, -1, -1, -1, -1, 12, ! 13, 14, -1, -1, -1, -1, -1, -1, -1, 53, ! -1, 75, -1, -1, 27, 28, 80, 30, 31, -1, ! 84, 85, 1, -1, 3, 4, 5, 6, 7, -1, ! -1, 75, -1, 12, 13, 14, 80, -1, -1, -1, ! 53, -1, -1, 56, 57, 58, -1, -1, -1, 28, ! -1, 30, -1, -1, 67, -1, 69, 70, 71, -1, ! -1, -1, 75, -1, -1, -1, 79, 80, 81, 82, ! -1, 84, -1, -1, 53, -1, -1, 56, 57, 58, ! 1, -1, 3, 4, 5, 6, 7, -1, 67, -1, ! -1, 12, 13, 14, -1, -1, 75, -1, -1, -1, ! -1, 80, -1, -1, -1, 84, -1, 28, 1, 30, ! 3, 4, 5, 6, 7, -1, -1, 10, -1, 12, ! 13, 14, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, 53, -1, -1, 28, -1, 58, -1, 1, ! -1, -1, 4, 5, 6, 7, 67, -1, 10, -1, ! 12, 13, 14, -1, 75, -1, -1, -1, -1, 80, ! 53, -1, -1, 84, -1, -1, 28, -1, 4, 5, 6, 7, -1, -1, -1, -1, 12, 13, 14, -1, ! -1, -1, 75, -1, -1, -1, -1, 80, -1, -1, ! 83, 53, 28, -1, -1, -1, 4, 5, 6, 7, ! -1, -1, -1, -1, 12, 13, 14, -1, -1, -1, ! -1, -1, -1, 75, -1, -1, -1, 53, 80, -1, ! 28, 83, 4, 5, 6, 7, -1, -1, -1, -1, ! 12, 13, 14, 4, 5, 6, 7, -1, -1, 75, ! -1, 12, 13, 14, 80, 53, 28, -1, 84, -1, ! -1, -1, -1, -1, -1, -1, -1, 28, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, 75, -1, -1, ! -1, 53, 80, -1, -1, -1, 84, -1, 1, -1, ! -1, 4, 53, 6, 7, -1, -1, -1, -1, 12, ! 13, 14, -1, 75, -1, -1, -1, -1, 80, -1, ! -1, -1, 84, -1, 75, 28, -1, 30, 31, 80, ! -1, -1, -1, 84, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, 3, 4, -1, 6, 7, -1, -1, ! 53, 11, 12, 13, 14, 15, 16, 17, 18, 19, ! 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, ! -1, -1, 75, -1, -1, -1, -1, 80, -1, 3, ! 4, -1, 6, 7, -1, -1, 46, 11, 12, 13, ! 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, ! 24, 25, 26, 27, 28, 29, -1, 67, -1, -1, ! -1, -1, -1, -1, -1, 75, -1, -1, -1, -1, ! 80, -1, 46, 3, 4, -1, 6, 7, -1, -1, ! -1, 11, 12, 13, 14, 15, 16, 17, 18, 19, ! 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, ! -1, 75, -1, -1, -1, -1, 80, -1, -1, 3, ! 4, -1, 6, 7, -1, -1, 46, 11, 12, 13, ! 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, ! 24, 25, 26, 27, 28, 29, -1, -1, 4, 5, ! 6, 7, -1, -1, -1, 75, 12, 13, 14, -1, ! 80, -1, 46, -1, -1, -1, -1, -1, 4, 5, ! 6, 7, 28, -1, 30, -1, 12, 13, 14, 4, ! 5, 6, 7, -1, -1, -1, -1, 12, 13, 14, ! -1, 75, 28, -1, 30, -1, 80, 53, -1, 4, ! 5, 6, 7, 28, -1, 30, -1, 12, 13, 14, ! -1, -1, 4, 5, 6, 7, -1, 53, -1, 75, ! 12, 13, 14, 28, 80, 30, -1, -1, 53, -1, ! -1, -1, 4, -1, 6, 7, 28, -1, 30, 75, ! 12, 13, 14, -1, 80, -1, -1, -1, 53, -1, ! 75, -1, -1, -1, -1, 80, 28, -1, 30, -1, ! -1, 53, -1, 4, 5, 6, 7, -1, -1, -1, ! 75, 12, 13, 14, -1, 80, 4, 5, 6, 7, ! -1, 53, -1, 75, 12, 13, 14, 28, 80, 4, ! 5, 6, 7, -1, -1, -1, -1, 12, 13, 14, ! 28, -1, -1, 75, -1, -1, -1, 4, 80, 6, ! 7, -1, 53, 28, -1, 12, 13, 14, 4, 5, ! 6, 7, -1, -1, -1, 53, 12, 13, 14, -1, ! -1, 28, -1, -1, 75, -1, -1, -1, 53, 80, ! -1, -1, 28, -1, -1, -1, -1, 75, -1, -1, ! -1, -1, 80, -1, -1, -1, 53, -1, -1, -1, ! 75, 4, -1, 6, 7, 80, -1, 53, -1, 12, ! 13, 14, -1, -1, -1, -1, -1, -1, 75, -1, ! -1, -1, -1, 80, -1, 28, -1, -1, -1, 75, ! -1, 43, 44, 45, 80, 47, 48, 49, 50, 51, ! 52, 53, 54, 55, 56, 57, 58, 59, 60, -1, ! 53, 43, 44, 45, -1, 47, 48, 49, 50, 51, ! 52, 53, 54, 55, 56, 57, 58, 59, 60, -1, ! -1, -1, 75, -1, -1, -1, 88, 80, 43, 44, ! 45, -1, 47, 48, 49, 50, 51, 52, 53, 54, ! 55, 56, 57, 58, 59, 60, 88, 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, 88, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, 83, 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/lib/bison.simple" *************** yyreduce: *** 2298,2329 **** switch (yyn) { case 1: ! #line 274 "objc-parse.y" { if (pedantic) pedwarn ("ISO C forbids an empty source file"); finish_file (); ; break;} case 2: ! #line 279 "objc-parse.y" { /* In case there were missing closebraces, get us back to the global binding level. */ while (! global_bindings_p ()) poplevel (0, 0, 0); ! finish_file (); ; break;} case 3: ! #line 293 "objc-parse.y" {yyval.ttype = NULL_TREE; ; break;} case 5: ! #line 294 "objc-parse.y" {yyval.ttype = NULL_TREE; ggc_collect(); ; break;} case 10: ! #line 302 "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) --- 2666,2697 ---- switch (yyn) { case 1: ! #line 309 "objc-parse.y" { if (pedantic) pedwarn ("ISO C forbids an empty source file"); finish_file (); ; break;} case 2: ! #line 314 "objc-parse.y" { /* In case there were missing closebraces, get us back to the global binding level. */ while (! global_bindings_p ()) poplevel (0, 0, 0); ! finish_file (); ; break;} case 3: ! #line 328 "objc-parse.y" {yyval.ttype = NULL_TREE; ; break;} case 5: ! #line 329 "objc-parse.y" {yyval.ttype = NULL_TREE; ggc_collect(); ; break;} case 10: ! #line 337 "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) *************** case 10: *** 2333,2665 **** error ("argument of `asm' is not a constant string"); ; break;} case 11: ! #line 310 "objc-parse.y" { RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ; break;} case 12: ! #line 315 "objc-parse.y" { if (pedantic) error ("ISO C forbids data definition with no type or storage class"); else if (!flag_traditional) warning ("data definition has no type or storage class"); ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 13: ! #line 324 "objc-parse.y" ! { current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 14: ! #line 328 "objc-parse.y" ! { current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 15: ! #line 332 "objc-parse.y" ! { pedwarn ("empty declaration"); ; ! break;} ! case 16: ! #line 334 "objc-parse.y" { shadow_tag (yyvsp[-1].ttype); ; break;} ! case 19: ! #line 338 "objc-parse.y" { if (pedantic) pedwarn ("ISO C does not allow extra `;' outside of a function"); ; break;} ! case 20: ! #line 344 "objc-parse.y" { if (! start_function (current_declspecs, yyvsp[0].ttype, ! prefix_attributes, NULL_TREE)) YYERROR1; ; break;} ! case 21: ! #line 349 "objc-parse.y" { store_parm_decls (); ; break;} ! case 22: ! #line 351 "objc-parse.y" { DECL_SOURCE_FILE (current_function_decl) = yyvsp[-2].filename; DECL_SOURCE_LINE (current_function_decl) = yyvsp[-1].lineno; ! finish_function (0); ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ; break;} ! case 23: ! #line 358 "objc-parse.y" ! { current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ; break;} ! case 24: ! #line 362 "objc-parse.y" { if (! start_function (current_declspecs, yyvsp[0].ttype, ! prefix_attributes, NULL_TREE)) YYERROR1; ; break;} ! case 25: ! #line 367 "objc-parse.y" { store_parm_decls (); ; break;} ! case 26: ! #line 369 "objc-parse.y" { DECL_SOURCE_FILE (current_function_decl) = yyvsp[-2].filename; DECL_SOURCE_LINE (current_function_decl) = yyvsp[-1].lineno; ! finish_function (0); ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ; break;} ! case 27: ! #line 376 "objc-parse.y" ! { current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ; break;} ! case 28: ! #line 380 "objc-parse.y" { if (! start_function (NULL_TREE, yyvsp[0].ttype, ! prefix_attributes, NULL_TREE)) YYERROR1; ; break;} ! case 29: ! #line 385 "objc-parse.y" { store_parm_decls (); ; break;} ! case 30: ! #line 387 "objc-parse.y" { DECL_SOURCE_FILE (current_function_decl) = yyvsp[-2].filename; DECL_SOURCE_LINE (current_function_decl) = yyvsp[-1].lineno; ! finish_function (0); ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ; break;} ! case 31: ! #line 394 "objc-parse.y" ! { current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ; break;} ! case 36: ! #line 407 "objc-parse.y" { yyval.code = ADDR_EXPR; ; break;} ! case 37: ! #line 409 "objc-parse.y" { yyval.code = NEGATE_EXPR; ; break;} ! case 38: ! #line 411 "objc-parse.y" { yyval.code = CONVERT_EXPR; ; break;} ! case 39: ! #line 414 "objc-parse.y" { yyval.code = PREINCREMENT_EXPR; ; break;} ! case 40: ! #line 416 "objc-parse.y" { yyval.code = PREDECREMENT_EXPR; ; break;} ! case 41: ! #line 418 "objc-parse.y" { yyval.code = BIT_NOT_EXPR; ; break;} ! case 42: ! #line 420 "objc-parse.y" { yyval.code = TRUTH_NOT_EXPR; ; break;} ! case 43: ! #line 424 "objc-parse.y" { yyval.ttype = build_compound_expr (yyvsp[0].ttype); ; break;} ! case 44: ! #line 429 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 46: ! #line 435 "objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 47: ! #line 437 "objc-parse.y" { chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} ! case 49: ! #line 443 "objc-parse.y" { yyval.ttype = build_indirect_ref (yyvsp[0].ttype, "unary *"); ; break;} ! case 50: ! #line 446 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ; break;} ! case 51: ! #line 449 "objc-parse.y" { yyval.ttype = build_unary_op (yyvsp[-1].code, yyvsp[0].ttype, 0); overflow_warning (yyval.ttype); ; break;} ! case 52: ! #line 453 "objc-parse.y" ! { tree label = lookup_label (yyvsp[0].ttype); ! if (pedantic) ! pedwarn ("ISO C forbids `&&'"); ! if (label == 0) ! yyval.ttype = null_pointer_node; ! else ! { ! TREE_USED (label) = 1; ! yyval.ttype = build1 (ADDR_EXPR, ptr_type_node, label); ! TREE_CONSTANT (yyval.ttype) = 1; ! } ! ; break;} ! case 53: ! #line 481 "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 487 "objc-parse.y" { skip_evaluation--; yyval.ttype = c_sizeof (groktypename (yyvsp[-1].ttype)); ; break;} ! case 55: ! #line 490 "objc-parse.y" { skip_evaluation--; yyval.ttype = c_alignof_expr (yyvsp[0].ttype); ; break;} ! case 56: ! #line 493 "objc-parse.y" { skip_evaluation--; yyval.ttype = c_alignof (groktypename (yyvsp[-1].ttype)); ; break;} ! case 57: ! #line 496 "objc-parse.y" { yyval.ttype = build_unary_op (REALPART_EXPR, yyvsp[0].ttype, 0); ; break;} ! case 58: ! #line 498 "objc-parse.y" { yyval.ttype = build_unary_op (IMAGPART_EXPR, yyvsp[0].ttype, 0); ; break;} ! case 59: ! #line 502 "objc-parse.y" { skip_evaluation++; ; break;} ! case 60: ! #line 506 "objc-parse.y" { skip_evaluation++; ; break;} ! case 62: ! #line 512 "objc-parse.y" ! { tree type; ! int SAVED_warn_strict_prototypes = warn_strict_prototypes; ! /* This avoids warnings about unprototyped casts on ! integers. E.g. "#define SIG_DFL (void(*)())0". */ ! if (TREE_CODE (yyvsp[0].ttype) == INTEGER_CST) ! warn_strict_prototypes = 0; ! type = groktypename (yyvsp[-2].ttype); ! warn_strict_prototypes = SAVED_warn_strict_prototypes; ! yyval.ttype = build_c_cast (type, yyvsp[0].ttype); ; break;} case 64: ! #line 526 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 65: ! #line 528 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 66: ! #line 530 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 67: ! #line 532 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 68: ! #line 534 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 69: ! #line 536 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 70: ! #line 538 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 71: ! #line 540 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 72: ! #line 542 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 73: ! #line 544 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 74: ! #line 546 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 75: ! #line 548 "objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 76: ! #line 550 "objc-parse.y" { yyvsp[-1].ttype = truthvalue_conversion (default_conversion (yyvsp[-1].ttype)); skip_evaluation += yyvsp[-1].ttype == boolean_false_node; ; break;} ! case 77: ! #line 553 "objc-parse.y" { skip_evaluation -= yyvsp[-3].ttype == boolean_false_node; yyval.ttype = parser_build_binary_op (TRUTH_ANDIF_EXPR, yyvsp[-3].ttype, yyvsp[0].ttype); ; break;} ! case 78: ! #line 556 "objc-parse.y" { yyvsp[-1].ttype = truthvalue_conversion (default_conversion (yyvsp[-1].ttype)); skip_evaluation += yyvsp[-1].ttype == boolean_true_node; ; break;} ! case 79: ! #line 559 "objc-parse.y" { skip_evaluation -= yyvsp[-3].ttype == boolean_true_node; yyval.ttype = parser_build_binary_op (TRUTH_ORIF_EXPR, yyvsp[-3].ttype, yyvsp[0].ttype); ; break;} ! case 80: ! #line 562 "objc-parse.y" { yyvsp[-1].ttype = truthvalue_conversion (default_conversion (yyvsp[-1].ttype)); skip_evaluation += yyvsp[-1].ttype == boolean_false_node; ; break;} ! case 81: ! #line 565 "objc-parse.y" { skip_evaluation += ((yyvsp[-4].ttype == boolean_true_node) - (yyvsp[-4].ttype == boolean_false_node)); ; break;} ! case 82: ! #line 568 "objc-parse.y" { skip_evaluation -= yyvsp[-6].ttype == boolean_true_node; yyval.ttype = build_conditional_expr (yyvsp[-6].ttype, yyvsp[-3].ttype, yyvsp[0].ttype); ; break;} ! case 83: ! #line 571 "objc-parse.y" { if (pedantic) pedwarn ("ISO C forbids omitting the middle term of a ?: expression"); /* Make sure first operand is calculated only once. */ --- 2701,2992 ---- error ("argument of `asm' is not a constant string"); ; break;} case 11: ! #line 345 "objc-parse.y" { RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ; break;} case 12: ! #line 350 "objc-parse.y" { if (pedantic) error ("ISO C forbids data definition with no type or storage class"); else if (!flag_traditional) warning ("data definition has no type or storage class"); ! POP_DECLSPEC_STACK; ; break;} case 13: ! #line 357 "objc-parse.y" ! { POP_DECLSPEC_STACK; ; break;} case 14: ! #line 359 "objc-parse.y" ! { POP_DECLSPEC_STACK; ; break;} case 15: ! #line 361 "objc-parse.y" { shadow_tag (yyvsp[-1].ttype); ; break;} ! case 18: ! #line 365 "objc-parse.y" { if (pedantic) pedwarn ("ISO C does not allow extra `;' outside of a function"); ; break;} ! case 19: ! #line 371 "objc-parse.y" { if (! start_function (current_declspecs, yyvsp[0].ttype, ! all_prefix_attributes)) YYERROR1; ; break;} ! case 20: ! #line 376 "objc-parse.y" { store_parm_decls (); ; break;} ! case 21: ! #line 378 "objc-parse.y" { DECL_SOURCE_FILE (current_function_decl) = yyvsp[-2].filename; DECL_SOURCE_LINE (current_function_decl) = yyvsp[-1].lineno; ! finish_function (0, 1); ! POP_DECLSPEC_STACK; ; break;} ! case 22: ! #line 383 "objc-parse.y" ! { POP_DECLSPEC_STACK; ; break;} ! case 23: ! #line 385 "objc-parse.y" { if (! start_function (current_declspecs, yyvsp[0].ttype, ! all_prefix_attributes)) YYERROR1; ; break;} ! case 24: ! #line 390 "objc-parse.y" { store_parm_decls (); ; break;} ! case 25: ! #line 392 "objc-parse.y" { DECL_SOURCE_FILE (current_function_decl) = yyvsp[-2].filename; DECL_SOURCE_LINE (current_function_decl) = yyvsp[-1].lineno; ! finish_function (0, 1); ! POP_DECLSPEC_STACK; ; break;} ! case 26: ! #line 397 "objc-parse.y" ! { POP_DECLSPEC_STACK; ; break;} ! case 27: ! #line 399 "objc-parse.y" { if (! start_function (NULL_TREE, yyvsp[0].ttype, ! all_prefix_attributes)) YYERROR1; ; break;} ! case 28: ! #line 404 "objc-parse.y" { store_parm_decls (); ; break;} ! case 29: ! #line 406 "objc-parse.y" { DECL_SOURCE_FILE (current_function_decl) = yyvsp[-2].filename; DECL_SOURCE_LINE (current_function_decl) = yyvsp[-1].lineno; ! finish_function (0, 1); ! POP_DECLSPEC_STACK; ; break;} ! case 30: ! #line 411 "objc-parse.y" ! { POP_DECLSPEC_STACK; ; break;} ! case 35: ! #line 422 "objc-parse.y" { yyval.code = ADDR_EXPR; ; break;} ! case 36: ! #line 424 "objc-parse.y" { yyval.code = NEGATE_EXPR; ; break;} ! case 37: ! #line 426 "objc-parse.y" { yyval.code = CONVERT_EXPR; ; break;} ! case 38: ! #line 429 "objc-parse.y" { yyval.code = PREINCREMENT_EXPR; ; break;} ! case 39: ! #line 431 "objc-parse.y" { yyval.code = PREDECREMENT_EXPR; ; break;} ! case 40: ! #line 433 "objc-parse.y" { yyval.code = BIT_NOT_EXPR; ; break;} ! case 41: ! #line 435 "objc-parse.y" { yyval.code = TRUTH_NOT_EXPR; ; break;} ! case 42: ! #line 439 "objc-parse.y" { yyval.ttype = build_compound_expr (yyvsp[0].ttype); ; break;} ! case 43: ! #line 444 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 45: ! #line 450 "objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 46: ! #line 452 "objc-parse.y" { chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} ! case 48: ! #line 458 "objc-parse.y" { yyval.ttype = build_indirect_ref (yyvsp[0].ttype, "unary *"); ; break;} ! case 49: ! #line 461 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ; break;} ! case 50: ! #line 464 "objc-parse.y" { yyval.ttype = build_unary_op (yyvsp[-1].code, yyvsp[0].ttype, 0); overflow_warning (yyval.ttype); ; break;} ! case 51: ! #line 468 "objc-parse.y" ! { yyval.ttype = finish_label_address_expr (yyvsp[0].ttype); ; break;} ! case 52: ! #line 485 "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 53: ! #line 491 "objc-parse.y" { skip_evaluation--; yyval.ttype = c_sizeof (groktypename (yyvsp[-1].ttype)); ; break;} ! case 54: ! #line 494 "objc-parse.y" { skip_evaluation--; yyval.ttype = c_alignof_expr (yyvsp[0].ttype); ; break;} ! case 55: ! #line 497 "objc-parse.y" { skip_evaluation--; yyval.ttype = c_alignof (groktypename (yyvsp[-1].ttype)); ; break;} ! case 56: ! #line 500 "objc-parse.y" { yyval.ttype = build_unary_op (REALPART_EXPR, yyvsp[0].ttype, 0); ; break;} ! case 57: ! #line 502 "objc-parse.y" { yyval.ttype = build_unary_op (IMAGPART_EXPR, yyvsp[0].ttype, 0); ; break;} ! case 58: ! #line 506 "objc-parse.y" { skip_evaluation++; ; break;} ! case 59: ! #line 510 "objc-parse.y" { skip_evaluation++; ; break;} ! case 61: ! #line 516 "objc-parse.y" ! { yyval.ttype = c_cast_expr (yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 63: ! #line 522 "objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 64: ! #line 524 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 65: ! #line 526 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 66: ! #line 528 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 67: ! #line 530 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 68: ! #line 532 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 69: ! #line 534 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 70: ! #line 536 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 71: ! #line 538 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 72: ! #line 540 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 73: ! #line 542 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 74: ! #line 544 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 75: ! #line 546 "objc-parse.y" { yyvsp[-1].ttype = truthvalue_conversion (default_conversion (yyvsp[-1].ttype)); skip_evaluation += yyvsp[-1].ttype == boolean_false_node; ; break;} ! case 76: ! #line 549 "objc-parse.y" { skip_evaluation -= yyvsp[-3].ttype == boolean_false_node; yyval.ttype = parser_build_binary_op (TRUTH_ANDIF_EXPR, yyvsp[-3].ttype, yyvsp[0].ttype); ; break;} ! case 77: ! #line 552 "objc-parse.y" { yyvsp[-1].ttype = truthvalue_conversion (default_conversion (yyvsp[-1].ttype)); skip_evaluation += yyvsp[-1].ttype == boolean_true_node; ; break;} ! case 78: ! #line 555 "objc-parse.y" { skip_evaluation -= yyvsp[-3].ttype == boolean_true_node; yyval.ttype = parser_build_binary_op (TRUTH_ORIF_EXPR, yyvsp[-3].ttype, yyvsp[0].ttype); ; break;} ! case 79: ! #line 558 "objc-parse.y" { yyvsp[-1].ttype = truthvalue_conversion (default_conversion (yyvsp[-1].ttype)); skip_evaluation += yyvsp[-1].ttype == boolean_false_node; ; break;} ! case 80: ! #line 561 "objc-parse.y" { skip_evaluation += ((yyvsp[-4].ttype == boolean_true_node) - (yyvsp[-4].ttype == boolean_false_node)); ; break;} ! case 81: ! #line 564 "objc-parse.y" { skip_evaluation -= yyvsp[-6].ttype == boolean_true_node; yyval.ttype = build_conditional_expr (yyvsp[-6].ttype, yyvsp[-3].ttype, yyvsp[0].ttype); ; break;} ! case 82: ! #line 567 "objc-parse.y" { if (pedantic) pedwarn ("ISO C forbids omitting the middle term of a ?: expression"); /* Make sure first operand is calculated only once. */ *************** case 83: *** 2667,2757 **** yyvsp[-1].ttype = truthvalue_conversion (default_conversion (yyvsp[0].ttype)); skip_evaluation += yyvsp[-1].ttype == boolean_true_node; ; break;} ! case 84: ! #line 578 "objc-parse.y" { skip_evaluation -= yyvsp[-4].ttype == boolean_true_node; yyval.ttype = build_conditional_expr (yyvsp[-4].ttype, yyvsp[-3].ttype, yyvsp[0].ttype); ; break;} ! case 85: ! #line 581 "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 (class == 'e' || class == '1' ! || class == '2' || class == '<') C_SET_EXP_ORIGINAL_CODE (yyval.ttype, MODIFY_EXPR); ; break;} ! case 86: ! #line 589 "objc-parse.y" { char class; yyval.ttype = build_modify_expr (yyvsp[-2].ttype, yyvsp[-1].code, yyvsp[0].ttype); /* This inhibits warnings in truthvalue_conversion. */ class = TREE_CODE_CLASS (TREE_CODE (yyval.ttype)); ! if (class == 'e' || class == '1' ! || class == '2' || class == '<') C_SET_EXP_ORIGINAL_CODE (yyval.ttype, ERROR_MARK); ; break;} ! case 87: ! #line 601 "objc-parse.y" { if (yychar == YYEMPTY) yychar = YYLEX; yyval.ttype = build_external_ref (yyvsp[0].ttype, yychar == '('); ; break;} ! case 89: ! #line 608 "objc-parse.y" { yyval.ttype = combine_strings (yyvsp[0].ttype); ; break;} case 90: ! #line 610 "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 91: ! #line 614 "objc-parse.y" ! { const char *name; ! tree result = pop_init_level (0); tree type = yyvsp[-5].ttype; finish_init (); if (pedantic && ! flag_isoc99) pedwarn ("ISO C89 forbids compound literals"); ! if (TYPE_NAME (type) != 0) ! { ! if (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE) ! name = IDENTIFIER_POINTER (TYPE_NAME (type)); ! else ! name = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type))); ! } ! else ! name = ""; ! yyval.ttype = result; ! if (TREE_CODE (type) == ARRAY_TYPE && !COMPLETE_TYPE_P (type)) ! { ! int failure = complete_array_type (type, yyval.ttype, 1); ! if (failure) ! abort (); ! } ; break;} case 92: ! #line 639 "objc-parse.y" { char class = TREE_CODE_CLASS (TREE_CODE (yyvsp[-1].ttype)); ! if (class == 'e' || class == '1' ! || class == '2' || class == '<') C_SET_EXP_ORIGINAL_CODE (yyvsp[-1].ttype, ERROR_MARK); yyval.ttype = yyvsp[-1].ttype; ; break;} case 93: ! #line 645 "objc-parse.y" { yyval.ttype = error_mark_node; ; break;} case 94: ! #line 647 "objc-parse.y" { tree saved_last_tree; if (pedantic) --- 2994,3069 ---- yyvsp[-1].ttype = truthvalue_conversion (default_conversion (yyvsp[0].ttype)); skip_evaluation += yyvsp[-1].ttype == boolean_true_node; ; break;} ! case 83: ! #line 574 "objc-parse.y" { skip_evaluation -= yyvsp[-4].ttype == boolean_true_node; yyval.ttype = build_conditional_expr (yyvsp[-4].ttype, yyvsp[-3].ttype, yyvsp[0].ttype); ; break;} ! case 84: ! #line 577 "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 85: ! #line 584 "objc-parse.y" { char class; yyval.ttype = build_modify_expr (yyvsp[-2].ttype, yyvsp[-1].code, yyvsp[0].ttype); /* This inhibits warnings in 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 86: ! #line 595 "objc-parse.y" { if (yychar == YYEMPTY) yychar = YYLEX; yyval.ttype = build_external_ref (yyvsp[0].ttype, yychar == '('); ; break;} ! case 88: ! #line 602 "objc-parse.y" { yyval.ttype = combine_strings (yyvsp[0].ttype); ; break;} + case 89: + #line 604 "objc-parse.y" + { yyval.ttype = fname_decl (C_RID_CODE (yyval.ttype), yyval.ttype); ; + break;} case 90: ! #line 606 "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 91: ! #line 610 "objc-parse.y" ! { tree constructor = pop_init_level (0); tree type = yyvsp[-5].ttype; finish_init (); if (pedantic && ! flag_isoc99) pedwarn ("ISO C89 forbids compound literals"); ! yyval.ttype = build_compound_literal (type, constructor); ; break;} case 92: ! #line 619 "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 93: ! #line 624 "objc-parse.y" { yyval.ttype = error_mark_node; ; break;} case 94: ! #line 626 "objc-parse.y" { tree saved_last_tree; if (pedantic) *************** case 94: *** 2769,2775 **** ; break;} case 95: ! #line 663 "objc-parse.y" { pop_label_level (); last_tree = COMPOUND_BODY (yyvsp[-2].ttype); --- 3081,3087 ---- ; break;} case 95: ! #line 642 "objc-parse.y" { pop_label_level (); last_tree = COMPOUND_BODY (yyvsp[-2].ttype); *************** case 95: *** 2778,3458 **** ; break;} case 96: ! #line 670 "objc-parse.y" { yyval.ttype = build_function_call (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 97: ! #line 672 "objc-parse.y" { yyval.ttype = build_va_arg (yyvsp[-3].ttype, groktypename (yyvsp[-1].ttype)); ; break;} case 98: #line 674 "objc-parse.y" { yyval.ttype = build_array_ref (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} ! case 99: #line 676 "objc-parse.y" { ! if (doing_objc_thang) ! { ! if (is_public (yyvsp[-2].ttype, yyvsp[0].ttype)) ! yyval.ttype = build_component_ref (yyvsp[-2].ttype, yyvsp[0].ttype); ! else ! yyval.ttype = error_mark_node; ! } ! else ! yyval.ttype = build_component_ref (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 100: ! #line 688 "objc-parse.y" { tree expr = build_indirect_ref (yyvsp[-2].ttype, "->"); ! if (doing_objc_thang) ! { ! if (is_public (expr, yyvsp[0].ttype)) ! yyval.ttype = build_component_ref (expr, yyvsp[0].ttype); ! else yyval.ttype = error_mark_node; ! } ! else ! yyval.ttype = build_component_ref (expr, yyvsp[0].ttype); ; break;} ! case 101: ! #line 702 "objc-parse.y" { yyval.ttype = build_unary_op (POSTINCREMENT_EXPR, yyvsp[-1].ttype, 0); ; break;} ! case 102: ! #line 704 "objc-parse.y" { yyval.ttype = build_unary_op (POSTDECREMENT_EXPR, yyvsp[-1].ttype, 0); ; break;} ! case 103: ! #line 706 "objc-parse.y" { yyval.ttype = build_message_expr (yyvsp[0].ttype); ; break;} ! case 104: ! #line 708 "objc-parse.y" { yyval.ttype = build_selector_expr (yyvsp[0].ttype); ; break;} ! case 105: ! #line 710 "objc-parse.y" { yyval.ttype = build_protocol_expr (yyvsp[0].ttype); ; break;} ! case 106: ! #line 712 "objc-parse.y" { yyval.ttype = build_encode_expr (yyvsp[0].ttype); ; break;} ! case 107: ! #line 714 "objc-parse.y" { yyval.ttype = build_objc_string_object (yyvsp[0].ttype); ; break;} ! case 109: ! #line 721 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 111: ! #line 731 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 114: ! #line 739 "objc-parse.y" { c_mark_varargs (); if (pedantic) pedwarn ("ISO C does not permit use of `varargs.h'"); ; break;} ! case 115: ! #line 749 "objc-parse.y" { ; break;} - case 120: - #line 765 "objc-parse.y" - { current_declspecs = TREE_VALUE (declspec_stack); - prefix_attributes = TREE_PURPOSE (declspec_stack); - declspec_stack = TREE_CHAIN (declspec_stack); ; - break;} - case 121: - #line 769 "objc-parse.y" - { current_declspecs = TREE_VALUE (declspec_stack); - prefix_attributes = TREE_PURPOSE (declspec_stack); - declspec_stack = TREE_CHAIN (declspec_stack); ; - break;} case 122: ! #line 773 "objc-parse.y" ! { shadow_tag_warned (yyvsp[-1].ttype, 1); ! pedwarn ("empty declaration"); ; break;} case 123: ! #line 776 "objc-parse.y" ! { pedwarn ("empty declaration"); ; break;} case 124: ! #line 785 "objc-parse.y" ! { ; break;} case 125: ! #line 793 "objc-parse.y" ! { pending_xref_error (); ! declspec_stack = tree_cons (prefix_attributes, ! current_declspecs, ! declspec_stack); ! split_specs_attrs (yyvsp[0].ttype, ! ¤t_declspecs, &prefix_attributes); ; break;} case 126: ! #line 803 "objc-parse.y" ! { prefix_attributes = chainon (prefix_attributes, yyvsp[0].ttype); ; break;} case 127: ! #line 808 "objc-parse.y" ! { current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 128: ! #line 812 "objc-parse.y" ! { current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 129: ! #line 816 "objc-parse.y" ! { current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 130: ! #line 820 "objc-parse.y" ! { current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 131: ! #line 824 "objc-parse.y" ! { shadow_tag (yyvsp[-1].ttype); ; break;} case 132: ! #line 826 "objc-parse.y" ! { pedwarn ("empty declaration"); ; break;} case 133: ! #line 828 "objc-parse.y" ! { RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ; break;} case 134: ! #line 838 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 135: ! #line 840 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[0].ttype, tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[-2].ttype)); ; break;} case 136: ! #line 844 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ; break;} case 137: ! #line 846 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 138: ! #line 848 "objc-parse.y" ! { if (extra_warnings) ! 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); ; break;} case 139: ! #line 853 "objc-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ; break;} case 140: ! #line 858 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 141: ! #line 860 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[0].ttype, tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[-2].ttype)); ; break;} case 142: ! #line 865 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ; break;} case 143: ! #line 867 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 144: ! #line 869 "objc-parse.y" ! { if (extra_warnings) ! 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); ; break;} case 145: ! #line 882 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; break;} case 146: ! #line 884 "objc-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, NULL_TREE); ; break;} case 147: ! #line 886 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 148: ! #line 888 "objc-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ; break;} case 149: ! #line 893 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); TREE_STATIC (yyval.ttype) = 1; ; break;} case 150: ! #line 896 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} case 151: ! #line 898 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); TREE_STATIC (yyval.ttype) = 1; ; break;} ! case 152: ! #line 901 "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 153: ! #line 915 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 154: ! #line 917 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[0].ttype, tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[-2].ttype)); ; break;} ! case 155: ! #line 921 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 156: ! #line 923 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} ! case 159: ! #line 933 "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 160: ! #line 937 "objc-parse.y" { yyval.ttype = get_static_reference (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 161: ! #line 939 "objc-parse.y" { yyval.ttype = get_object_reference (yyvsp[0].ttype); ; break;} ! case 162: ! #line 944 "objc-parse.y" { yyval.ttype = get_object_reference (yyvsp[0].ttype); ; break;} ! case 163: ! #line 946 "objc-parse.y" { yyval.ttype = TREE_TYPE (yyvsp[-1].ttype); ; break;} ! case 164: ! #line 948 "objc-parse.y" { yyval.ttype = groktypename (yyvsp[-1].ttype); ; break;} ! case 172: ! #line 970 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 173: ! #line 972 "objc-parse.y" { if (TREE_CHAIN (yyvsp[-1].ttype)) yyvsp[-1].ttype = combine_strings (yyvsp[-1].ttype); yyval.ttype = yyvsp[-1].ttype; ; break;} ! case 174: ! #line 979 "objc-parse.y" { yyval.ttype = start_decl (yyvsp[-3].ttype, current_declspecs, 1, ! yyvsp[-1].ttype, prefix_attributes); start_init (yyval.ttype, yyvsp[-2].ttype, global_bindings_p ()); ; break;} ! case 175: ! #line 984 "objc-parse.y" { finish_init (); finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype); ; break;} ! case 176: ! #line 987 "objc-parse.y" { tree d = start_decl (yyvsp[-2].ttype, current_declspecs, 0, ! yyvsp[0].ttype, prefix_attributes); finish_decl (d, NULL_TREE, yyvsp[-1].ttype); ; break;} ! case 177: ! #line 995 "objc-parse.y" { yyval.ttype = start_decl (yyvsp[-3].ttype, current_declspecs, 1, ! yyvsp[-1].ttype, prefix_attributes); start_init (yyval.ttype, yyvsp[-2].ttype, global_bindings_p ()); ; break;} ! case 178: ! #line 1000 "objc-parse.y" { finish_init (); - decl_attributes (yyvsp[-1].ttype, yyvsp[-3].ttype, prefix_attributes); finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype); ; break;} ! case 179: ! #line 1004 "objc-parse.y" { tree d = start_decl (yyvsp[-2].ttype, current_declspecs, 0, ! yyvsp[0].ttype, prefix_attributes); finish_decl (d, NULL_TREE, yyvsp[-1].ttype); ; break;} ! case 180: ! #line 1012 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 181: ! #line 1014 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 182: ! #line 1019 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 183: ! #line 1021 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 184: ! #line 1026 "objc-parse.y" { yyval.ttype = yyvsp[-2].ttype; ; break;} ! case 185: ! #line 1031 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 186: ! #line 1033 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 187: ! #line 1038 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 188: ! #line 1040 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[0].ttype, NULL_TREE); ; break;} ! case 189: ! #line 1042 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, build_tree_list (NULL_TREE, yyvsp[-1].ttype)); ; break;} ! case 190: ! #line 1044 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-5].ttype, tree_cons (NULL_TREE, yyvsp[-3].ttype, yyvsp[-1].ttype)); ; break;} ! case 191: ! #line 1046 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} ! case 197: ! #line 1064 "objc-parse.y" { really_start_incremental_init (NULL_TREE); ; break;} ! case 198: ! #line 1066 "objc-parse.y" { yyval.ttype = pop_init_level (0); ; break;} ! case 199: ! #line 1068 "objc-parse.y" { yyval.ttype = error_mark_node; ; break;} ! case 200: ! #line 1074 "objc-parse.y" { if (pedantic) pedwarn ("ISO C forbids empty initializer braces"); ; break;} ! case 204: ! #line 1088 "objc-parse.y" { if (pedantic && ! flag_isoc99) pedwarn ("ISO C89 forbids specifying subobject to initialize"); ; break;} ! case 205: ! #line 1091 "objc-parse.y" { if (pedantic) pedwarn ("obsolete use of designated initializer without `='"); ; break;} ! case 206: ! #line 1094 "objc-parse.y" { set_init_label (yyvsp[-1].ttype); if (pedantic) pedwarn ("obsolete use of designated initializer with `:'"); ; break;} ! case 209: ! #line 1103 "objc-parse.y" { push_init_level (0); ; break;} ! case 210: ! #line 1105 "objc-parse.y" { process_init_element (pop_init_level (0)); ; break;} ! case 211: ! #line 1107 "objc-parse.y" { process_init_element (yyvsp[0].ttype); ; break;} ! case 215: ! #line 1118 "objc-parse.y" { set_init_label (yyvsp[0].ttype); ; break;} ! case 216: ! #line 1126 "objc-parse.y" { if (pedantic) pedwarn ("ISO C forbids nested functions"); push_function_context (); if (! start_function (current_declspecs, yyvsp[0].ttype, ! prefix_attributes, NULL_TREE)) { pop_function_context (); YYERROR1; } ; break;} ! case 217: ! #line 1138 "objc-parse.y" { store_parm_decls (); ; break;} ! case 218: ! #line 1146 "objc-parse.y" { tree decl = current_function_decl; DECL_SOURCE_FILE (decl) = yyvsp[-2].filename; DECL_SOURCE_LINE (decl) = yyvsp[-1].lineno; ! finish_function (1); pop_function_context (); add_decl_stmt (decl); ; break;} ! case 219: ! #line 1156 "objc-parse.y" { if (pedantic) pedwarn ("ISO C forbids nested functions"); push_function_context (); if (! start_function (current_declspecs, yyvsp[0].ttype, ! prefix_attributes, NULL_TREE)) { pop_function_context (); YYERROR1; } ; break;} ! case 220: ! #line 1168 "objc-parse.y" { store_parm_decls (); ; break;} ! case 221: ! #line 1176 "objc-parse.y" { tree decl = current_function_decl; DECL_SOURCE_FILE (decl) = yyvsp[-2].filename; DECL_SOURCE_LINE (decl) = yyvsp[-1].lineno; ! finish_function (1); pop_function_context (); add_decl_stmt (decl); ; break;} ! case 224: ! #line 1196 "objc-parse.y" ! { yyval.ttype = yyvsp[-1].ttype; ; break;} ! case 225: ! #line 1198 "objc-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} ! case 226: ! #line 1203 "objc-parse.y" ! { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; ! break;} ! case 227: ! #line 1205 "objc-parse.y" ! { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} ! case 228: ! #line 1207 "objc-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 229: ! #line 1214 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 232: ! #line 1226 "objc-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} ! case 233: ! #line 1231 "objc-parse.y" ! { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} ! case 234: ! #line 1233 "objc-parse.y" ! { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} ! case 235: ! #line 1235 "objc-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 236: ! #line 1242 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 238: ! #line 1251 "objc-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} ! case 239: ! #line 1256 "objc-parse.y" ! { yyval.ttype = yyvsp[-1].ttype; ; break;} ! case 240: ! #line 1258 "objc-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 241: ! #line 1260 "objc-parse.y" ! { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; ! break;} ! case 242: ! #line 1262 "objc-parse.y" ! { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; ! break;} ! case 243: ! #line 1269 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 245: ! #line 1275 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 246: ! #line 1277 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 247: ! #line 1282 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 248: ! #line 1284 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 249: ! #line 1289 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 250: ! #line 1291 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 251: ! #line 1296 "objc-parse.y" { yyval.ttype = start_struct (RECORD_TYPE, yyvsp[-1].ttype); /* Start scope of tag before parsing components. */ ; break;} ! case 252: ! #line 1300 "objc-parse.y" { yyval.ttype = finish_struct (yyvsp[-3].ttype, yyvsp[-2].ttype, chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ; break;} ! case 253: ! #line 1302 "objc-parse.y" { yyval.ttype = finish_struct (start_struct (RECORD_TYPE, NULL_TREE), yyvsp[-2].ttype, chainon (yyvsp[-4].ttype, yyvsp[0].ttype)); ; break;} ! case 254: ! #line 1306 "objc-parse.y" ! { yyval.ttype = xref_tag (RECORD_TYPE, yyvsp[0].ttype); ; ! break;} ! case 255: ! #line 1308 "objc-parse.y" { yyval.ttype = start_struct (UNION_TYPE, yyvsp[-1].ttype); ; break;} ! case 256: ! #line 1310 "objc-parse.y" { yyval.ttype = finish_struct (yyvsp[-3].ttype, yyvsp[-2].ttype, chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ; break;} ! case 257: ! #line 1312 "objc-parse.y" { yyval.ttype = finish_struct (start_struct (UNION_TYPE, NULL_TREE), yyvsp[-2].ttype, chainon (yyvsp[-4].ttype, yyvsp[0].ttype)); ; break;} ! case 258: ! #line 1316 "objc-parse.y" ! { yyval.ttype = xref_tag (UNION_TYPE, yyvsp[0].ttype); ; ! break;} ! case 259: ! #line 1318 "objc-parse.y" { yyval.ttype = start_enum (yyvsp[-1].ttype); ; break;} ! case 260: ! #line 1320 "objc-parse.y" { yyval.ttype = finish_enum (yyvsp[-4].ttype, nreverse (yyvsp[-3].ttype), chainon (yyvsp[-7].ttype, yyvsp[0].ttype)); ; break;} ! case 261: ! #line 1323 "objc-parse.y" { yyval.ttype = start_enum (NULL_TREE); ; break;} ! case 262: ! #line 1325 "objc-parse.y" { yyval.ttype = finish_enum (yyvsp[-4].ttype, nreverse (yyvsp[-3].ttype), chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ; break;} ! case 263: ! #line 1328 "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 267: ! #line 1343 "objc-parse.y" { if (pedantic && ! flag_isoc99) pedwarn ("comma at end of enumerator list"); ; break;} ! case 268: ! #line 1349 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 269: ! #line 1351 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); pedwarn ("no semicolon at end of struct or union"); ; break;} ! case 270: ! #line 1356 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 271: ! #line 1358 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[-1].ttype); ; break;} ! case 272: ! #line 1360 "objc-parse.y" { if (pedantic) pedwarn ("extra semicolon in struct or union specified"); ; break;} ! case 273: ! #line 1364 "objc-parse.y" { tree interface = lookup_interface (yyvsp[-1].ttype); --- 3090,4103 ---- ; break;} case 96: ! #line 649 "objc-parse.y" { yyval.ttype = build_function_call (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 97: ! #line 651 "objc-parse.y" { yyval.ttype = build_va_arg (yyvsp[-3].ttype, groktypename (yyvsp[-1].ttype)); ; break;} case 98: + #line 654 "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 99: + #line 664 "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) + ? build_int_2 (1, 0) : build_int_2 (0, 0); + ; + break;} + case 100: #line 674 "objc-parse.y" { yyval.ttype = build_array_ref (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} ! case 101: #line 676 "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 102: ! #line 683 "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 103: ! #line 692 "objc-parse.y" { yyval.ttype = build_unary_op (POSTINCREMENT_EXPR, yyvsp[-1].ttype, 0); ; break;} ! case 104: ! #line 694 "objc-parse.y" { yyval.ttype = build_unary_op (POSTDECREMENT_EXPR, yyvsp[-1].ttype, 0); ; break;} ! case 105: ! #line 696 "objc-parse.y" { yyval.ttype = build_message_expr (yyvsp[0].ttype); ; break;} ! case 106: ! #line 698 "objc-parse.y" { yyval.ttype = build_selector_expr (yyvsp[0].ttype); ; break;} ! case 107: ! #line 700 "objc-parse.y" { yyval.ttype = build_protocol_expr (yyvsp[0].ttype); ; break;} ! case 108: ! #line 702 "objc-parse.y" { yyval.ttype = build_encode_expr (yyvsp[0].ttype); ; break;} ! case 109: ! #line 704 "objc-parse.y" { yyval.ttype = build_objc_string_object (yyvsp[0].ttype); ; break;} ! case 111: ! #line 711 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 112: ! #line 720 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 113: ! #line 722 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 116: ! #line 730 "objc-parse.y" { c_mark_varargs (); if (pedantic) pedwarn ("ISO C does not permit use of `varargs.h'"); ; break;} ! case 117: ! #line 740 "objc-parse.y" { ; break;} case 122: ! #line 756 "objc-parse.y" ! { POP_DECLSPEC_STACK; ; break;} case 123: ! #line 758 "objc-parse.y" ! { POP_DECLSPEC_STACK; ; break;} case 124: ! #line 760 "objc-parse.y" ! { shadow_tag_warned (yyvsp[-1].ttype, 1); ! pedwarn ("empty declaration"); ; break;} case 125: ! #line 763 "objc-parse.y" ! { pedwarn ("empty declaration"); ; break;} case 126: ! #line 772 "objc-parse.y" ! { ; break;} case 127: ! #line 780 "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 128: ! #line 791 "objc-parse.y" ! { all_prefix_attributes = chainon (yyvsp[0].ttype, prefix_attributes); ; break;} case 129: ! #line 796 "objc-parse.y" ! { POP_DECLSPEC_STACK; ; break;} case 130: ! #line 798 "objc-parse.y" ! { POP_DECLSPEC_STACK; ; break;} case 131: ! #line 800 "objc-parse.y" ! { POP_DECLSPEC_STACK; ; break;} case 132: ! #line 802 "objc-parse.y" ! { POP_DECLSPEC_STACK; ; break;} case 133: ! #line 804 "objc-parse.y" ! { shadow_tag (yyvsp[-1].ttype); ; break;} case 134: ! #line 806 "objc-parse.y" ! { RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ; break;} case 135: ! #line 863 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 136: ! #line 866 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 137: ! #line 869 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 138: ! #line 875 "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 139: ! #line 881 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 140: ! #line 884 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 141: ! #line 890 "objc-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, NULL_TREE); ! TREE_STATIC (yyval.ttype) = 0; ; break;} case 142: ! #line 893 "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 143: ! #line 899 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 144: ! #line 902 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 145: ! #line 905 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 146: ! #line 908 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 147: ! #line 911 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 148: ! #line 914 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 149: ! #line 917 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); TREE_STATIC (yyval.ttype) = 1; ; break;} case 150: ! #line 923 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ! TREE_STATIC (yyval.ttype) = 1; ; break;} case 151: ! #line 926 "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 152: ! #line 929 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); TREE_STATIC (yyval.ttype) = 1; ; break;} ! case 153: ! #line 932 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 154: ! #line 935 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 155: ! #line 938 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 156: ! #line 944 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 157: ! #line 947 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 158: ! #line 950 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 159: ! #line 953 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 160: ! #line 956 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 161: ! #line 959 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 162: ! #line 965 "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 163: ! #line 968 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 164: ! #line 971 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 165: ! #line 974 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 166: ! #line 977 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 167: ! #line 983 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ! TREE_STATIC (yyval.ttype) = 0; ; ! break;} ! case 168: ! #line 986 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 169: ! #line 989 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 170: ! #line 992 "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 998 "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 1004 "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 173: ! #line 1010 "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 174: ! #line 1019 "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 175: ! #line 1025 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 176: ! #line 1028 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 177: ! #line 1031 "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 1037 "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 1043 "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 180: ! #line 1049 "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 181: ! #line 1058 "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 182: ! #line 1064 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 183: ! #line 1067 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 184: ! #line 1070 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 185: ! #line 1073 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 186: ! #line 1076 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 187: ! #line 1079 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 188: ! #line 1082 "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 1088 "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 1094 "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 191: ! #line 1100 "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 192: ! #line 1109 "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 193: ! #line 1112 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 194: ! #line 1115 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 195: ! #line 1118 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 196: ! #line 1121 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 197: ! #line 1127 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 198: ! #line 1130 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 199: ! #line 1133 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 200: ! #line 1136 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 201: ! #line 1139 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 202: ! #line 1142 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 203: ! #line 1145 "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 1151 "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 1157 "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 206: ! #line 1163 "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 207: ! #line 1172 "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 208: ! #line 1175 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 209: ! #line 1178 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 210: ! #line 1181 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 211: ! #line 1184 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 268: ! #line 1272 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 269: ! #line 1274 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 273: ! #line 1309 "objc-parse.y" ! { OBJC_NEED_RAW_IDENTIFIER (1); ; ! break;} ! case 276: ! #line 1319 "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 277: ! #line 1323 "objc-parse.y" { yyval.ttype = get_static_reference (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 278: ! #line 1325 "objc-parse.y" { yyval.ttype = get_object_reference (yyvsp[0].ttype); ; break;} ! case 279: ! #line 1330 "objc-parse.y" { yyval.ttype = get_object_reference (yyvsp[0].ttype); ; break;} ! case 280: ! #line 1332 "objc-parse.y" { yyval.ttype = TREE_TYPE (yyvsp[-1].ttype); ; break;} ! case 281: ! #line 1334 "objc-parse.y" { yyval.ttype = groktypename (yyvsp[-1].ttype); ; break;} ! case 286: ! #line 1351 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 287: ! #line 1353 "objc-parse.y" { if (TREE_CHAIN (yyvsp[-1].ttype)) yyvsp[-1].ttype = combine_strings (yyvsp[-1].ttype); yyval.ttype = yyvsp[-1].ttype; ; break;} ! case 288: ! #line 1360 "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 289: ! #line 1365 "objc-parse.y" { finish_init (); finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype); ; break;} ! case 290: ! #line 1368 "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 291: ! #line 1376 "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 292: ! #line 1381 "objc-parse.y" { finish_init (); finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype); ; break;} ! case 293: ! #line 1384 "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 294: ! #line 1392 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 295: ! #line 1394 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 296: ! #line 1399 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 297: ! #line 1401 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 298: ! #line 1406 "objc-parse.y" { yyval.ttype = yyvsp[-2].ttype; ; break;} ! case 299: ! #line 1411 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 300: ! #line 1413 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 301: ! #line 1418 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 302: ! #line 1420 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[0].ttype, NULL_TREE); ; break;} ! case 303: ! #line 1422 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, build_tree_list (NULL_TREE, yyvsp[-1].ttype)); ; break;} ! case 304: ! #line 1424 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-5].ttype, tree_cons (NULL_TREE, yyvsp[-3].ttype, yyvsp[-1].ttype)); ; break;} ! case 305: ! #line 1426 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} ! case 311: ! #line 1444 "objc-parse.y" { really_start_incremental_init (NULL_TREE); ; break;} ! case 312: ! #line 1446 "objc-parse.y" { yyval.ttype = pop_init_level (0); ; break;} ! case 313: ! #line 1448 "objc-parse.y" { yyval.ttype = error_mark_node; ; break;} ! case 314: ! #line 1454 "objc-parse.y" { if (pedantic) pedwarn ("ISO C forbids empty initializer braces"); ; break;} ! case 318: ! #line 1468 "objc-parse.y" { if (pedantic && ! flag_isoc99) pedwarn ("ISO C89 forbids specifying subobject to initialize"); ; break;} ! case 319: ! #line 1471 "objc-parse.y" { if (pedantic) pedwarn ("obsolete use of designated initializer without `='"); ; break;} ! case 320: ! #line 1474 "objc-parse.y" { set_init_label (yyvsp[-1].ttype); if (pedantic) pedwarn ("obsolete use of designated initializer with `:'"); ; break;} ! case 323: ! #line 1483 "objc-parse.y" { push_init_level (0); ; break;} ! case 324: ! #line 1485 "objc-parse.y" { process_init_element (pop_init_level (0)); ; break;} ! case 325: ! #line 1487 "objc-parse.y" { process_init_element (yyvsp[0].ttype); ; break;} ! case 329: ! #line 1498 "objc-parse.y" { set_init_label (yyvsp[0].ttype); ; break;} ! case 330: ! #line 1506 "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; } ; break;} ! case 331: ! #line 1518 "objc-parse.y" { store_parm_decls (); ; break;} ! case 332: ! #line 1526 "objc-parse.y" { tree decl = current_function_decl; DECL_SOURCE_FILE (decl) = yyvsp[-2].filename; DECL_SOURCE_LINE (decl) = yyvsp[-1].lineno; ! finish_function (1, 1); pop_function_context (); add_decl_stmt (decl); ; break;} ! case 333: ! #line 1536 "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; } ; break;} ! case 334: ! #line 1548 "objc-parse.y" { store_parm_decls (); ; break;} ! case 335: ! #line 1556 "objc-parse.y" { tree decl = current_function_decl; DECL_SOURCE_FILE (decl) = yyvsp[-2].filename; DECL_SOURCE_LINE (decl) = yyvsp[-1].lineno; ! finish_function (1, 1); pop_function_context (); add_decl_stmt (decl); ; break;} ! case 338: ! #line 1576 "objc-parse.y" ! { yyval.ttype = yyvsp[-2].ttype ? tree_cons (yyvsp[-2].ttype, yyvsp[-1].ttype, NULL_TREE) : yyvsp[-1].ttype; ; break;} ! case 339: ! #line 1578 "objc-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} ! case 340: ! #line 1583 "objc-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, yyvsp[-1].ttype, 0); ; break;} ! case 341: ! #line 1585 "objc-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 346: ! #line 1601 "objc-parse.y" ! { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} ! case 347: ! #line 1606 "objc-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, yyvsp[-1].ttype, 0); ; ! break;} ! case 350: ! #line 1613 "objc-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} ! case 351: ! #line 1618 "objc-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, yyvsp[-1].ttype, 0); ; break;} ! case 352: ! #line 1620 "objc-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 353: ! #line 1622 "objc-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 354: ! #line 1624 "objc-parse.y" ! { yyval.ttype = yyvsp[-2].ttype ? tree_cons (yyvsp[-2].ttype, yyvsp[-1].ttype, NULL_TREE) : yyvsp[-1].ttype; ; break;} ! case 355: ! #line 1632 "objc-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} ! case 356: ! #line 1637 "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 1639 "objc-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 358: ! #line 1641 "objc-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, yyvsp[-1].ttype, 0); ; break;} ! case 360: ! #line 1647 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 361: ! #line 1649 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 362: ! #line 1654 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 363: ! #line 1656 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 364: ! #line 1661 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 365: ! #line 1663 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 366: ! #line 1674 "objc-parse.y" { yyval.ttype = start_struct (RECORD_TYPE, yyvsp[-1].ttype); /* Start scope of tag before parsing components. */ ; break;} ! case 367: ! #line 1678 "objc-parse.y" { yyval.ttype = finish_struct (yyvsp[-3].ttype, yyvsp[-2].ttype, chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ; break;} ! case 368: ! #line 1680 "objc-parse.y" { yyval.ttype = finish_struct (start_struct (RECORD_TYPE, NULL_TREE), yyvsp[-2].ttype, chainon (yyvsp[-4].ttype, yyvsp[0].ttype)); ; break;} ! case 369: ! #line 1684 "objc-parse.y" { yyval.ttype = start_struct (UNION_TYPE, yyvsp[-1].ttype); ; break;} ! case 370: ! #line 1686 "objc-parse.y" { yyval.ttype = finish_struct (yyvsp[-3].ttype, yyvsp[-2].ttype, chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ; break;} ! case 371: ! #line 1688 "objc-parse.y" { yyval.ttype = finish_struct (start_struct (UNION_TYPE, NULL_TREE), yyvsp[-2].ttype, chainon (yyvsp[-4].ttype, yyvsp[0].ttype)); ; break;} ! case 372: ! #line 1692 "objc-parse.y" { yyval.ttype = start_enum (yyvsp[-1].ttype); ; break;} ! case 373: ! #line 1694 "objc-parse.y" { yyval.ttype = finish_enum (yyvsp[-4].ttype, nreverse (yyvsp[-3].ttype), chainon (yyvsp[-7].ttype, yyvsp[0].ttype)); ; break;} ! case 374: ! #line 1697 "objc-parse.y" { yyval.ttype = start_enum (NULL_TREE); ; break;} ! case 375: ! #line 1699 "objc-parse.y" { yyval.ttype = finish_enum (yyvsp[-4].ttype, nreverse (yyvsp[-3].ttype), chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ; break;} ! case 376: ! #line 1705 "objc-parse.y" ! { yyval.ttype = xref_tag (RECORD_TYPE, yyvsp[0].ttype); ; ! break;} ! case 377: ! #line 1707 "objc-parse.y" ! { yyval.ttype = xref_tag (UNION_TYPE, yyvsp[0].ttype); ; ! break;} ! case 378: ! #line 1709 "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 382: ! #line 1724 "objc-parse.y" { if (pedantic && ! flag_isoc99) pedwarn ("comma at end of enumerator list"); ; break;} ! case 383: ! #line 1730 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 384: ! #line 1732 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); pedwarn ("no semicolon at end of struct or union"); ; break;} ! case 385: ! #line 1737 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 386: ! #line 1739 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[-1].ttype); ; break;} ! case 387: ! #line 1741 "objc-parse.y" { if (pedantic) pedwarn ("extra semicolon in struct or union specified"); ; break;} ! case 388: ! #line 1745 "objc-parse.y" { tree interface = lookup_interface (yyvsp[-1].ttype); *************** case 273: *** 3460,3480 **** yyval.ttype = get_class_ivars (interface); else { ! error ("Cannot find interface declaration for `%s'", IDENTIFIER_POINTER (yyvsp[-1].ttype)); yyval.ttype = NULL_TREE; } ; break;} ! case 274: ! #line 1389 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ; break;} ! case 275: ! #line 1394 "objc-parse.y" { /* Support for unnamed structs or unions as members of structs or unions (which is [a] useful and [b] supports --- 4105,4123 ---- yyval.ttype = get_class_ivars (interface); else { ! error ("cannot find interface declaration for `%s'", IDENTIFIER_POINTER (yyvsp[-1].ttype)); yyval.ttype = NULL_TREE; } ; break;} ! case 389: ! #line 1761 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ; break;} ! case 390: ! #line 1764 "objc-parse.y" { /* Support for unnamed structs or unions as members of structs or unions (which is [a] useful and [b] supports *************** case 275: *** 3482,3639 **** if (pedantic) pedwarn ("ISO C doesn't support unnamed structs/unions"); ! yyval.ttype = grokfield(yyvsp[-2].filename, yyvsp[-1].lineno, NULL, current_declspecs, NULL_TREE); ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ! ; break;} ! case 276: ! #line 1407 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ; break;} ! case 277: ! #line 1412 "objc-parse.y" { if (pedantic) pedwarn ("ISO C forbids member declarations with no members"); shadow_tag(yyvsp[0].ttype); yyval.ttype = NULL_TREE; ; break;} ! case 278: ! #line 1417 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 279: ! #line 1419 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ; break;} ! case 281: ! #line 1426 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 282: ! #line 1431 "objc-parse.y" { yyval.ttype = grokfield (yyvsp[-3].filename, yyvsp[-2].lineno, yyvsp[-1].ttype, current_declspecs, NULL_TREE); ! decl_attributes (yyval.ttype, yyvsp[0].ttype, prefix_attributes); ; break;} ! case 283: ! #line 1435 "objc-parse.y" { yyval.ttype = grokfield (yyvsp[-5].filename, yyvsp[-4].lineno, yyvsp[-3].ttype, current_declspecs, yyvsp[-1].ttype); ! decl_attributes (yyval.ttype, yyvsp[0].ttype, prefix_attributes); ; break;} ! case 284: ! #line 1438 "objc-parse.y" { yyval.ttype = grokfield (yyvsp[-4].filename, yyvsp[-3].lineno, NULL_TREE, current_declspecs, yyvsp[-1].ttype); ! decl_attributes (yyval.ttype, yyvsp[0].ttype, prefix_attributes); ; break;} ! case 286: ! #line 1450 "objc-parse.y" { if (yyvsp[-2].ttype == error_mark_node) yyval.ttype = yyvsp[-2].ttype; else yyval.ttype = chainon (yyvsp[0].ttype, yyvsp[-2].ttype); ; break;} ! case 287: ! #line 1455 "objc-parse.y" { yyval.ttype = error_mark_node; ; break;} ! case 288: ! #line 1461 "objc-parse.y" { yyval.ttype = build_enumerator (yyvsp[0].ttype, NULL_TREE); ; break;} ! case 289: ! #line 1463 "objc-parse.y" { yyval.ttype = build_enumerator (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 290: ! #line 1468 "objc-parse.y" ! { pending_xref_error (); ; ! break;} ! case 291: ! #line 1470 "objc-parse.y" ! { yyval.ttype = build_tree_list (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 292: ! #line 1472 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 293: ! #line 1477 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 295: ! #line 1483 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} ! case 296: ! #line 1485 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} ! case 297: ! #line 1490 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ; break;} ! case 298: ! #line 1492 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} ! case 299: ! #line 1497 "objc-parse.y" ! { yyval.ttype = yyvsp[-1].ttype; ; break;} ! case 300: ! #line 1500 "objc-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 301: ! #line 1502 "objc-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); ; break;} ! case 302: ! #line 1504 "objc-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} ! case 303: ! #line 1506 "objc-parse.y" ! { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; ! break;} ! case 304: ! #line 1508 "objc-parse.y" ! { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} ! case 305: ! #line 1510 "objc-parse.y" { yyval.ttype = build_nt (CALL_EXPR, NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} ! case 306: ! #line 1512 "objc-parse.y" ! { yyval.ttype = build_nt (ARRAY_REF, NULL_TREE, yyvsp[-1].ttype); ; break;} ! case 307: ! #line 1514 "objc-parse.y" ! { yyval.ttype = build_nt (ARRAY_REF, NULL_TREE, NULL_TREE); ; break;} ! case 308: ! #line 1518 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 311: ! #line 1531 "objc-parse.y" { pedwarn ("deprecated use of label at end of compound statement"); ; break;} ! case 319: ! #line 1548 "objc-parse.y" { if (pedantic && !flag_isoc99) pedwarn ("ISO C89 forbids mixed declarations and code"); ; break;} ! case 334: ! #line 1578 "objc-parse.y" { pushlevel (0); clear_last_expr (); add_scope_stmt (/*begin_p=*/1, /*partial_p=*/0); --- 4125,4329 ---- if (pedantic) pedwarn ("ISO C doesn't support unnamed structs/unions"); ! yyval.ttype = grokfield(yyvsp[-1].filename, yyvsp[0].lineno, NULL, current_declspecs, NULL_TREE); ! POP_DECLSPEC_STACK; ; break;} ! case 391: ! #line 1774 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ; break;} ! case 392: ! #line 1777 "objc-parse.y" { if (pedantic) pedwarn ("ISO C forbids member declarations with no members"); shadow_tag(yyvsp[0].ttype); yyval.ttype = NULL_TREE; ; break;} ! case 393: ! #line 1782 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 394: ! #line 1784 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ; break;} ! case 396: ! #line 1791 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-3].ttype, yyvsp[0].ttype); ; break;} ! case 398: ! #line 1797 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-3].ttype, yyvsp[0].ttype); ; ! break;} ! case 399: ! #line 1802 "objc-parse.y" { yyval.ttype = grokfield (yyvsp[-3].filename, yyvsp[-2].lineno, yyvsp[-1].ttype, current_declspecs, NULL_TREE); ! decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ; break;} ! case 400: ! #line 1806 "objc-parse.y" { yyval.ttype = grokfield (yyvsp[-5].filename, yyvsp[-4].lineno, yyvsp[-3].ttype, current_declspecs, yyvsp[-1].ttype); ! decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ; break;} ! case 401: ! #line 1809 "objc-parse.y" { yyval.ttype = grokfield (yyvsp[-4].filename, yyvsp[-3].lineno, NULL_TREE, current_declspecs, yyvsp[-1].ttype); ! decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ; break;} ! case 402: ! #line 1815 "objc-parse.y" ! { yyval.ttype = grokfield (yyvsp[-3].filename, yyvsp[-2].lineno, yyvsp[-1].ttype, current_declspecs, NULL_TREE); ! decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ; ! break;} ! case 403: ! #line 1819 "objc-parse.y" ! { yyval.ttype = grokfield (yyvsp[-5].filename, yyvsp[-4].lineno, yyvsp[-3].ttype, current_declspecs, yyvsp[-1].ttype); ! decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ; ! break;} ! case 404: ! #line 1822 "objc-parse.y" ! { yyval.ttype = grokfield (yyvsp[-4].filename, yyvsp[-3].lineno, NULL_TREE, current_declspecs, yyvsp[-1].ttype); ! decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ; ! break;} ! case 406: ! #line 1834 "objc-parse.y" { if (yyvsp[-2].ttype == error_mark_node) yyval.ttype = yyvsp[-2].ttype; else yyval.ttype = chainon (yyvsp[0].ttype, yyvsp[-2].ttype); ; break;} ! case 407: ! #line 1839 "objc-parse.y" { yyval.ttype = error_mark_node; ; break;} ! case 408: ! #line 1845 "objc-parse.y" { yyval.ttype = build_enumerator (yyvsp[0].ttype, NULL_TREE); ; break;} ! case 409: ! #line 1847 "objc-parse.y" { yyval.ttype = build_enumerator (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 410: ! #line 1852 "objc-parse.y" ! { pending_xref_error (); ! yyval.ttype = yyvsp[0].ttype; ; break;} ! case 411: ! #line 1855 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 412: ! #line 1860 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 414: ! #line 1866 "objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, ! NULL_TREE), ! all_prefix_attributes); ; break;} ! case 415: ! #line 1870 "objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, ! yyvsp[0].ttype), ! all_prefix_attributes); ; break;} ! case 416: ! #line 1874 "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 420: ! #line 1887 "objc-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 421: ! #line 1892 "objc-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); ; break;} ! case 422: ! #line 1894 "objc-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 423: ! #line 1899 "objc-parse.y" ! { yyval.ttype = yyvsp[-2].ttype ? tree_cons (yyvsp[-2].ttype, yyvsp[-1].ttype, NULL_TREE) : yyvsp[-1].ttype; ; break;} ! case 424: ! #line 1901 "objc-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} ! case 425: ! #line 1903 "objc-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, yyvsp[-1].ttype, 1); ; break;} ! case 426: ! #line 1905 "objc-parse.y" { yyval.ttype = build_nt (CALL_EXPR, NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} ! case 427: ! #line 1907 "objc-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, NULL_TREE, 1); ; break;} ! case 428: ! #line 1914 "objc-parse.y" ! { yyval.ttype = build_array_declarator (yyvsp[-1].ttype, NULL_TREE, 0, 0); ; break;} ! case 429: ! #line 1916 "objc-parse.y" ! { yyval.ttype = build_array_declarator (yyvsp[-1].ttype, yyvsp[-2].ttype, 0, 0); ; break;} ! case 430: ! #line 1918 "objc-parse.y" ! { yyval.ttype = build_array_declarator (NULL_TREE, NULL_TREE, 0, 0); ; ! break;} ! case 431: ! #line 1920 "objc-parse.y" ! { yyval.ttype = build_array_declarator (NULL_TREE, yyvsp[-1].ttype, 0, 0); ; ! break;} ! case 432: ! #line 1922 "objc-parse.y" ! { yyval.ttype = build_array_declarator (NULL_TREE, NULL_TREE, 0, 1); ; ! break;} ! case 433: ! #line 1924 "objc-parse.y" ! { yyval.ttype = build_array_declarator (NULL_TREE, yyvsp[-2].ttype, 0, 1); ; ! break;} ! case 434: ! #line 1926 "objc-parse.y" ! { if (C_RID_CODE (yyvsp[-2].ttype) != RID_STATIC) ! error ("storage class specifier in array declarator"); ! yyval.ttype = build_array_declarator (yyvsp[-1].ttype, NULL_TREE, 1, 0); ; ! break;} ! case 435: ! #line 1930 "objc-parse.y" ! { if (C_RID_CODE (yyvsp[-3].ttype) != RID_STATIC) ! error ("storage class specifier in array declarator"); ! yyval.ttype = build_array_declarator (yyvsp[-1].ttype, yyvsp[-2].ttype, 1, 0); ; ! break;} ! case 436: ! #line 1934 "objc-parse.y" ! { if (C_RID_CODE (yyvsp[-2].ttype) != RID_STATIC) ! error ("storage class specifier in array declarator"); ! yyval.ttype = build_array_declarator (yyvsp[-1].ttype, yyvsp[-3].ttype, 1, 0); ; ! break;} ! case 439: ! #line 1949 "objc-parse.y" { pedwarn ("deprecated use of label at end of compound statement"); ; break;} ! case 447: ! #line 1966 "objc-parse.y" { if (pedantic && !flag_isoc99) pedwarn ("ISO C89 forbids mixed declarations and code"); ; break;} ! case 462: ! #line 1996 "objc-parse.y" { pushlevel (0); clear_last_expr (); add_scope_stmt (/*begin_p=*/1, /*partial_p=*/0); *************** case 334: *** 3641,3652 **** add_objc_decls (); ; break;} ! case 335: ! #line 1587 "objc-parse.y" { yyval.ttype = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0); ; break;} ! case 336: ! #line 1591 "objc-parse.y" { if (flag_isoc99) { yyval.ttype = c_begin_compound_stmt (); --- 4331,4342 ---- add_objc_decls (); ; break;} ! case 463: ! #line 2005 "objc-parse.y" { yyval.ttype = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0); ; break;} ! case 464: ! #line 2010 "objc-parse.y" { if (flag_isoc99) { yyval.ttype = c_begin_compound_stmt (); *************** case 336: *** 3660,3667 **** yyval.ttype = NULL_TREE; ; break;} ! case 337: ! #line 1609 "objc-parse.y" { if (flag_isoc99) { tree scope_stmt = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0); --- 4350,4357 ---- yyval.ttype = NULL_TREE; ; break;} ! case 465: ! #line 2028 "objc-parse.y" { if (flag_isoc99) { tree scope_stmt = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0); *************** case 337: *** 3673,3685 **** else yyval.ttype = NULL_TREE; ; break;} ! case 339: ! #line 1626 "objc-parse.y" { if (pedantic) pedwarn ("ISO C forbids label declarations"); ; break;} ! case 342: ! #line 1637 "objc-parse.y" { tree link; for (link = yyvsp[-1].ttype; link; link = TREE_CHAIN (link)) { --- 4363,4375 ---- else yyval.ttype = NULL_TREE; ; break;} ! case 467: ! #line 2045 "objc-parse.y" { if (pedantic) pedwarn ("ISO C forbids label declarations"); ; break;} ! case 470: ! #line 2056 "objc-parse.y" { tree link; for (link = yyvsp[-1].ttype; link; link = TREE_CHAIN (link)) { *************** case 342: *** 3689,3716 **** } ; break;} ! case 343: ! #line 1651 "objc-parse.y" {; break;} ! case 345: ! #line 1655 "objc-parse.y" { compstmt_count++; yyval.ttype = c_begin_compound_stmt (); ; break;} ! case 346: ! #line 1659 "objc-parse.y" { yyval.ttype = convert (void_type_node, integer_zero_node); ; break;} ! case 347: ! #line 1661 "objc-parse.y" { yyval.ttype = poplevel (kept_level_p (), 1, 0); SCOPE_STMT_BLOCK (TREE_PURPOSE (yyvsp[0].ttype)) = SCOPE_STMT_BLOCK (TREE_VALUE (yyvsp[0].ttype)) = yyval.ttype; ; break;} ! case 350: ! #line 1674 "objc-parse.y" { if (current_function_decl == 0) { error ("braced-group within expression allowed only inside a function"); --- 4379,4406 ---- } ; break;} ! case 471: ! #line 2070 "objc-parse.y" {; break;} ! case 473: ! #line 2074 "objc-parse.y" { compstmt_count++; yyval.ttype = c_begin_compound_stmt (); ; break;} ! case 474: ! #line 2079 "objc-parse.y" { yyval.ttype = convert (void_type_node, integer_zero_node); ; break;} ! case 475: ! #line 2081 "objc-parse.y" { yyval.ttype = poplevel (kept_level_p (), 1, 0); SCOPE_STMT_BLOCK (TREE_PURPOSE (yyvsp[0].ttype)) = SCOPE_STMT_BLOCK (TREE_VALUE (yyvsp[0].ttype)) = yyval.ttype; ; break;} ! case 478: ! #line 2094 "objc-parse.y" { if (current_function_decl == 0) { error ("braced-group within expression allowed only inside a function"); *************** case 350: *** 3726,3754 **** yyval.ttype = add_stmt (build_stmt (COMPOUND_STMT, last_tree)); ; break;} ! case 351: ! #line 1690 "objc-parse.y" { RECHAIN_STMTS (yyvsp[-1].ttype, COMPOUND_BODY (yyvsp[-1].ttype)); yyval.ttype = yyvsp[-1].ttype; ; break;} ! case 352: ! #line 1697 "objc-parse.y" { c_finish_then (); ; break;} ! case 354: ! #line 1714 "objc-parse.y" { yyval.ttype = c_begin_if_stmt (); ; break;} ! case 355: ! #line 1716 "objc-parse.y" { c_expand_start_cond (truthvalue_conversion (yyvsp[-1].ttype), compstmt_count,yyvsp[-3].ttype); yyval.itype = stmt_count; if_stmt_file = yyvsp[-7].filename; if_stmt_line = yyvsp[-6].lineno; ; break;} ! case 356: ! #line 1728 "objc-parse.y" { stmt_count++; compstmt_count++; yyval.ttype --- 4416,4445 ---- yyval.ttype = add_stmt (build_stmt (COMPOUND_STMT, last_tree)); ; break;} ! case 479: ! #line 2111 "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 480: ! #line 2119 "objc-parse.y" { c_finish_then (); ; break;} ! case 482: ! #line 2136 "objc-parse.y" { yyval.ttype = c_begin_if_stmt (); ; break;} ! case 483: ! #line 2138 "objc-parse.y" { c_expand_start_cond (truthvalue_conversion (yyvsp[-1].ttype), compstmt_count,yyvsp[-3].ttype); yyval.itype = stmt_count; if_stmt_file = yyvsp[-7].filename; if_stmt_line = yyvsp[-6].lineno; ; break;} ! case 484: ! #line 2150 "objc-parse.y" { stmt_count++; compstmt_count++; yyval.ttype *************** case 356: *** 3760,3822 **** RTL-generation time. */ DO_COND (yyval.ttype) = error_mark_node; ; break;} ! case 357: ! #line 1739 "objc-parse.y" { yyval.ttype = yyvsp[-2].ttype; RECHAIN_STMTS (yyval.ttype, DO_BODY (yyval.ttype)); ; break;} ! case 358: ! #line 1747 "objc-parse.y" { if (yychar == YYEMPTY) yychar = YYLEX; yyval.filename = input_filename; ; break;} ! case 359: ! #line 1753 "objc-parse.y" { if (yychar == YYEMPTY) yychar = YYLEX; yyval.lineno = lineno; ; break;} ! case 362: ! #line 1766 "objc-parse.y" { if (flag_isoc99) RECHAIN_STMTS (yyvsp[-2].ttype, COMPOUND_BODY (yyvsp[-2].ttype)); ; break;} ! case 363: ! #line 1772 "objc-parse.y" { if (yyvsp[0].ttype) { STMT_LINENO (yyvsp[0].ttype) = yyvsp[-1].lineno; /* ??? 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 ocurr when doing inlining at the tree level. */ } ; break;} ! case 364: ! #line 1786 "objc-parse.y" { if (yyvsp[0].ttype) { STMT_LINENO (yyvsp[0].ttype) = yyvsp[-1].lineno; } ; break;} ! case 365: ! #line 1795 "objc-parse.y" { c_expand_start_else (); yyvsp[-1].itype = stmt_count; ; break;} ! case 366: ! #line 1798 "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 367: ! #line 1803 "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 --- 4451,4513 ---- RTL-generation time. */ DO_COND (yyval.ttype) = error_mark_node; ; break;} ! case 485: ! #line 2161 "objc-parse.y" { yyval.ttype = yyvsp[-2].ttype; RECHAIN_STMTS (yyval.ttype, DO_BODY (yyval.ttype)); ; break;} ! case 486: ! #line 2169 "objc-parse.y" { if (yychar == YYEMPTY) yychar = YYLEX; yyval.filename = input_filename; ; break;} ! case 487: ! #line 2175 "objc-parse.y" { if (yychar == YYEMPTY) yychar = YYLEX; yyval.lineno = lineno; ; break;} ! case 490: ! #line 2188 "objc-parse.y" { if (flag_isoc99) RECHAIN_STMTS (yyvsp[-2].ttype, COMPOUND_BODY (yyvsp[-2].ttype)); ; break;} ! case 491: ! #line 2194 "objc-parse.y" { if (yyvsp[0].ttype) { STMT_LINENO (yyvsp[0].ttype) = yyvsp[-1].lineno; /* ??? 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 492: ! #line 2208 "objc-parse.y" { if (yyvsp[0].ttype) { STMT_LINENO (yyvsp[0].ttype) = yyvsp[-1].lineno; } ; break;} ! case 493: ! #line 2217 "objc-parse.y" { c_expand_start_else (); yyvsp[-1].itype = stmt_count; ; break;} ! case 494: ! #line 2220 "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 495: ! #line 2225 "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 *************** case 367: *** 3826,3976 **** warning_with_file_and_line (if_stmt_file, if_stmt_line, "empty body in an if-statement"); ; break;} ! case 368: ! #line 1815 "objc-parse.y" { c_expand_end_cond (); ; break;} ! case 369: ! #line 1825 "objc-parse.y" { stmt_count++; yyval.ttype = c_begin_while_stmt (); ; break;} ! case 370: ! #line 1828 "objc-parse.y" { yyvsp[-1].ttype = truthvalue_conversion (yyvsp[-1].ttype); c_finish_while_stmt_cond (truthvalue_conversion (yyvsp[-1].ttype), yyvsp[-3].ttype); yyval.ttype = add_stmt (yyvsp[-3].ttype); ; break;} ! case 371: ! #line 1833 "objc-parse.y" { RECHAIN_STMTS (yyvsp[-1].ttype, WHILE_BODY (yyvsp[-1].ttype)); ; break;} ! case 372: ! #line 1836 "objc-parse.y" { DO_COND (yyvsp[-4].ttype) = truthvalue_conversion (yyvsp[-2].ttype); ; break;} ! case 373: ! #line 1838 "objc-parse.y" { ; break;} ! case 374: ! #line 1840 "objc-parse.y" { yyval.ttype = build_stmt (FOR_STMT, NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE); add_stmt (yyval.ttype); ; break;} ! case 375: ! #line 1844 "objc-parse.y" { stmt_count++; RECHAIN_STMTS (yyvsp[-2].ttype, FOR_INIT_STMT (yyvsp[-2].ttype)); ; break;} ! case 376: ! #line 1847 "objc-parse.y" { if (yyvsp[-1].ttype) FOR_COND (yyvsp[-5].ttype) = truthvalue_conversion (yyvsp[-1].ttype); ; break;} ! case 377: ! #line 1850 "objc-parse.y" { FOR_EXPR (yyvsp[-8].ttype) = yyvsp[-1].ttype; ; break;} ! case 378: ! #line 1852 "objc-parse.y" { RECHAIN_STMTS (yyvsp[-10].ttype, FOR_BODY (yyvsp[-10].ttype)); ; break;} ! case 379: ! #line 1854 "objc-parse.y" { stmt_count++; yyval.ttype = c_start_case (yyvsp[-1].ttype); ; break;} ! case 380: ! #line 1857 "objc-parse.y" { c_finish_case (); ; break;} ! case 381: ! #line 1862 "objc-parse.y" { add_stmt (build_stmt (EXPR_STMT, yyvsp[-1].ttype)); ; break;} ! case 382: ! #line 1864 "objc-parse.y" { check_for_loop_decls (); ; break;} ! case 383: ! #line 1870 "objc-parse.y" { stmt_count++; yyval.ttype = yyvsp[0].ttype; ; break;} ! case 384: ! #line 1872 "objc-parse.y" { stmt_count++; yyval.ttype = c_expand_expr_stmt (yyvsp[-1].ttype); ; break;} ! case 385: ! #line 1875 "objc-parse.y" { if (flag_isoc99) RECHAIN_STMTS (yyvsp[-2].ttype, COMPOUND_BODY (yyvsp[-2].ttype)); yyval.ttype = NULL_TREE; ; break;} ! case 386: ! #line 1879 "objc-parse.y" { stmt_count++; yyval.ttype = add_stmt (build_break_stmt ()); ; break;} ! case 387: ! #line 1882 "objc-parse.y" { stmt_count++; yyval.ttype = add_stmt (build_continue_stmt ()); ; break;} ! case 388: ! #line 1885 "objc-parse.y" { stmt_count++; yyval.ttype = c_expand_return (NULL_TREE); ; break;} ! case 389: ! #line 1888 "objc-parse.y" { stmt_count++; yyval.ttype = c_expand_return (yyvsp[-1].ttype); ; break;} ! case 390: ! #line 1891 "objc-parse.y" { stmt_count++; ! 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) ! { ! if (TREE_CODE (yyvsp[-2].ttype) == ADDR_EXPR) ! yyvsp[-2].ttype = TREE_OPERAND (yyvsp[-2].ttype, 0); ! if (TREE_CHAIN (yyvsp[-2].ttype)) ! yyvsp[-2].ttype = combine_strings (yyvsp[-2].ttype); ! yyval.ttype = add_stmt (build_stmt (ASM_STMT, NULL_TREE, yyvsp[-2].ttype, ! NULL_TREE, NULL_TREE, ! NULL_TREE)); ! ASM_INPUT_P (yyval.ttype) = 1; ! } ! else ! { ! error ("argument of `asm' is not a constant string"); ! yyval.ttype = NULL_TREE; ! } ! ; break;} ! case 391: ! #line 1914 "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 392: ! #line 1919 "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 393: ! #line 1924 "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 394: ! #line 1927 "objc-parse.y" { tree decl; stmt_count++; decl = lookup_label (yyvsp[-1].ttype); --- 4517,4648 ---- warning_with_file_and_line (if_stmt_file, if_stmt_line, "empty body in an if-statement"); ; break;} ! case 496: ! #line 2237 "objc-parse.y" { c_expand_end_cond (); ; break;} ! case 497: ! #line 2247 "objc-parse.y" { stmt_count++; yyval.ttype = c_begin_while_stmt (); ; break;} ! case 498: ! #line 2250 "objc-parse.y" { yyvsp[-1].ttype = truthvalue_conversion (yyvsp[-1].ttype); c_finish_while_stmt_cond (truthvalue_conversion (yyvsp[-1].ttype), yyvsp[-3].ttype); yyval.ttype = add_stmt (yyvsp[-3].ttype); ; break;} ! case 499: ! #line 2255 "objc-parse.y" { RECHAIN_STMTS (yyvsp[-1].ttype, WHILE_BODY (yyvsp[-1].ttype)); ; break;} ! case 500: ! #line 2258 "objc-parse.y" { DO_COND (yyvsp[-4].ttype) = truthvalue_conversion (yyvsp[-2].ttype); ; break;} ! case 501: ! #line 2260 "objc-parse.y" { ; break;} ! case 502: ! #line 2262 "objc-parse.y" { yyval.ttype = build_stmt (FOR_STMT, NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE); add_stmt (yyval.ttype); ; break;} ! case 503: ! #line 2266 "objc-parse.y" { stmt_count++; RECHAIN_STMTS (yyvsp[-2].ttype, FOR_INIT_STMT (yyvsp[-2].ttype)); ; break;} ! case 504: ! #line 2269 "objc-parse.y" { if (yyvsp[-1].ttype) FOR_COND (yyvsp[-5].ttype) = truthvalue_conversion (yyvsp[-1].ttype); ; break;} ! case 505: ! #line 2272 "objc-parse.y" { FOR_EXPR (yyvsp[-8].ttype) = yyvsp[-1].ttype; ; break;} ! case 506: ! #line 2274 "objc-parse.y" { RECHAIN_STMTS (yyvsp[-10].ttype, FOR_BODY (yyvsp[-10].ttype)); ; break;} ! case 507: ! #line 2276 "objc-parse.y" { stmt_count++; yyval.ttype = c_start_case (yyvsp[-1].ttype); ; break;} ! case 508: ! #line 2279 "objc-parse.y" { c_finish_case (); ; break;} ! case 509: ! #line 2284 "objc-parse.y" { add_stmt (build_stmt (EXPR_STMT, yyvsp[-1].ttype)); ; break;} ! case 510: ! #line 2286 "objc-parse.y" { check_for_loop_decls (); ; break;} ! case 511: ! #line 2292 "objc-parse.y" { stmt_count++; yyval.ttype = yyvsp[0].ttype; ; break;} ! case 512: ! #line 2294 "objc-parse.y" { stmt_count++; yyval.ttype = c_expand_expr_stmt (yyvsp[-1].ttype); ; break;} ! case 513: ! #line 2297 "objc-parse.y" { if (flag_isoc99) RECHAIN_STMTS (yyvsp[-2].ttype, COMPOUND_BODY (yyvsp[-2].ttype)); yyval.ttype = NULL_TREE; ; break;} ! case 514: ! #line 2301 "objc-parse.y" { stmt_count++; yyval.ttype = add_stmt (build_break_stmt ()); ; break;} ! case 515: ! #line 2304 "objc-parse.y" { stmt_count++; yyval.ttype = add_stmt (build_continue_stmt ()); ; break;} ! case 516: ! #line 2307 "objc-parse.y" { stmt_count++; yyval.ttype = c_expand_return (NULL_TREE); ; break;} ! case 517: ! #line 2310 "objc-parse.y" { stmt_count++; yyval.ttype = c_expand_return (yyvsp[-1].ttype); ; break;} ! case 518: ! #line 2313 "objc-parse.y" { stmt_count++; ! yyval.ttype = simple_asm_stmt (yyvsp[-2].ttype); ; break;} ! case 519: ! #line 2317 "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 520: ! #line 2322 "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 521: ! #line 2327 "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 522: ! #line 2330 "objc-parse.y" { tree decl; stmt_count++; decl = lookup_label (yyvsp[-1].ttype); *************** case 394: *** 3983,4075 **** yyval.ttype = NULL_TREE; ; break;} ! case 395: ! #line 1939 "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 396: ! #line 1945 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 397: ! #line 1953 "objc-parse.y" { stmt_count++; yyval.ttype = do_case (yyvsp[-1].ttype, NULL_TREE); ; break;} ! case 398: ! #line 1956 "objc-parse.y" { stmt_count++; yyval.ttype = do_case (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} ! case 399: ! #line 1959 "objc-parse.y" { stmt_count++; yyval.ttype = do_case (NULL_TREE, NULL_TREE); ; break;} ! case 400: ! #line 1962 "objc-parse.y" { tree label = define_label (yyvsp[-3].filename, yyvsp[-2].lineno, yyvsp[-4].ttype); stmt_count++; if (label) { ! decl_attributes (label, yyvsp[0].ttype, NULL_TREE); yyval.ttype = add_stmt (build_stmt (LABEL_STMT, label)); } else yyval.ttype = NULL_TREE; ; break;} ! case 401: ! #line 1978 "objc-parse.y" { emit_line_note (input_filename, lineno); yyval.ttype = NULL_TREE; ; break;} ! case 402: ! #line 1981 "objc-parse.y" { emit_line_note (input_filename, lineno); ; break;} ! case 403: ! #line 1986 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 405: ! #line 1993 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 408: ! #line 2000 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 409: ! #line 2005 "objc-parse.y" ! { yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} ! case 410: ! #line 2010 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, combine_strings (yyvsp[0].ttype), NULL_TREE); ; break;} ! case 411: ! #line 2012 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, combine_strings (yyvsp[0].ttype), yyvsp[-2].ttype); ; break;} ! case 412: ! #line 2018 "objc-parse.y" { pushlevel (0); clear_parm_order (); declare_parm_level (0); ; break;} ! case 413: ! #line 2022 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; parmlist_tags_warning (); poplevel (0, 0, 0); ; break;} ! case 415: ! #line 2030 "objc-parse.y" { tree parm; if (pedantic) pedwarn ("ISO C forbids forward parameter declarations"); --- 4655,4751 ---- yyval.ttype = NULL_TREE; ; break;} ! case 523: ! #line 2342 "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 524: ! #line 2348 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 525: ! #line 2356 "objc-parse.y" { stmt_count++; yyval.ttype = do_case (yyvsp[-1].ttype, NULL_TREE); ; break;} ! case 526: ! #line 2359 "objc-parse.y" { stmt_count++; yyval.ttype = do_case (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} ! case 527: ! #line 2362 "objc-parse.y" { stmt_count++; yyval.ttype = do_case (NULL_TREE, NULL_TREE); ; break;} ! case 528: ! #line 2365 "objc-parse.y" { tree label = define_label (yyvsp[-3].filename, yyvsp[-2].lineno, yyvsp[-4].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 529: ! #line 2381 "objc-parse.y" { emit_line_note (input_filename, lineno); yyval.ttype = NULL_TREE; ; break;} ! case 530: ! #line 2384 "objc-parse.y" { emit_line_note (input_filename, lineno); ; break;} ! case 531: ! #line 2389 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 533: ! #line 2396 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 536: ! #line 2403 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 537: ! #line 2408 "objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (NULL_TREE, yyvsp[-3].ttype), yyvsp[-1].ttype); ; break;} ! case 538: ! #line 2410 "objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (yyvsp[-5].ttype, yyvsp[-3].ttype), yyvsp[-1].ttype); ; ! break;} ! case 539: ! #line 2415 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, combine_strings (yyvsp[0].ttype), NULL_TREE); ; break;} ! case 540: ! #line 2417 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, combine_strings (yyvsp[0].ttype), yyvsp[-2].ttype); ; break;} ! case 541: ! #line 2427 "objc-parse.y" { pushlevel (0); clear_parm_order (); declare_parm_level (0); ; break;} ! case 542: ! #line 2431 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; parmlist_tags_warning (); poplevel (0, 0, 0); ; break;} ! case 544: ! #line 2439 "objc-parse.y" { tree parm; if (pedantic) pedwarn ("ISO C forbids forward parameter declarations"); *************** case 415: *** 4078,4097 **** TREE_ASM_WRITTEN (parm) = 1; clear_parm_order (); ; break;} ! case 416: ! #line 2038 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 417: ! #line 2040 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, NULL_TREE); ; break;} ! case 418: ! #line 2046 "objc-parse.y" { yyval.ttype = get_parm_info (0); ; break;} ! case 419: ! #line 2048 "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. --- 4754,4778 ---- TREE_ASM_WRITTEN (parm) = 1; clear_parm_order (); ; break;} ! case 545: ! #line 2447 "objc-parse.y" ! { /* Dummy action so attributes are in known place ! on parser stack. */ ; ! break;} ! case 546: ! #line 2450 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 547: ! #line 2452 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, NULL_TREE); ; break;} ! case 548: ! #line 2458 "objc-parse.y" { yyval.ttype = get_parm_info (0); ; break;} ! case 549: ! #line 2460 "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. *************** case 419: *** 4102,4217 **** error ("ISO C requires a named argument before `...'"); ; break;} ! case 420: ! #line 2058 "objc-parse.y" { yyval.ttype = get_parm_info (1); ; break;} ! case 421: ! #line 2060 "objc-parse.y" { yyval.ttype = get_parm_info (0); ; break;} ! case 422: ! #line 2065 "objc-parse.y" { push_parm_decl (yyvsp[0].ttype); ; break;} ! case 423: ! #line 2067 "objc-parse.y" { push_parm_decl (yyvsp[0].ttype); ; break;} ! case 424: ! #line 2074 "objc-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), ! build_tree_list (prefix_attributes, ! yyvsp[0].ttype)); ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ; break;} ! case 425: ! #line 2082 "objc-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), ! build_tree_list (prefix_attributes, ! yyvsp[0].ttype)); ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ; break;} ! case 426: ! #line 2090 "objc-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), ! build_tree_list (prefix_attributes, ! yyvsp[0].ttype)); ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ; break;} ! case 427: ! #line 2098 "objc-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), ! build_tree_list (prefix_attributes, ! yyvsp[0].ttype)); ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ; break;} ! case 428: ! #line 2107 "objc-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), ! build_tree_list (prefix_attributes, ! yyvsp[0].ttype)); ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ; break;} ! case 429: ! #line 2120 "objc-parse.y" { pushlevel (0); clear_parm_order (); declare_parm_level (1); ; break;} ! case 430: ! #line 2124 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; parmlist_tags_warning (); poplevel (0, 0, 0); ; break;} ! case 432: ! #line 2132 "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); ; break;} ! case 433: ! #line 2142 "objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 434: ! #line 2144 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} ! case 435: ! #line 2150 "objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 436: ! #line 2152 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} ! case 437: ! #line 2157 "objc-parse.y" { yyval.ttype = SAVE_WARN_FLAGS(); pedantic = 0; ! warn_pointer_arith = 0; ; break;} ! case 443: ! #line 2171 "objc-parse.y" { if (objc_implementation_context) { --- 4783,4924 ---- error ("ISO C requires a named argument before `...'"); ; break;} ! case 550: ! #line 2470 "objc-parse.y" { yyval.ttype = get_parm_info (1); ; break;} ! case 551: ! #line 2472 "objc-parse.y" { yyval.ttype = get_parm_info (0); ; break;} ! case 552: ! #line 2477 "objc-parse.y" { push_parm_decl (yyvsp[0].ttype); ; break;} ! case 553: ! #line 2479 "objc-parse.y" { push_parm_decl (yyvsp[0].ttype); ; break;} ! case 554: ! #line 2486 "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 555: ! #line 2491 "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 556: ! #line 2496 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ; ! break;} ! case 557: ! #line 2499 "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 558: ! #line 2505 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ; ! break;} ! case 559: ! #line 2513 "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 560: ! #line 2518 "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 561: ! #line 2523 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ; ! break;} ! case 562: ! #line 2526 "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 563: ! #line 2532 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ; ! break;} ! case 564: ! #line 2538 "objc-parse.y" ! { prefix_attributes = chainon (prefix_attributes, yyvsp[-3].ttype); ! all_prefix_attributes = prefix_attributes; ; ! break;} ! case 565: ! #line 2547 "objc-parse.y" { pushlevel (0); clear_parm_order (); declare_parm_level (1); ; break;} ! case 566: ! #line 2551 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; parmlist_tags_warning (); poplevel (0, 0, 0); ; break;} ! case 568: ! #line 2559 "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 569: ! #line 2577 "objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 570: ! #line 2579 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} ! case 571: ! #line 2585 "objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 572: ! #line 2587 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} ! case 573: ! #line 2592 "objc-parse.y" { yyval.ttype = SAVE_WARN_FLAGS(); pedantic = 0; ! warn_pointer_arith = 0; ! warn_traditional = 0; ; break;} ! case 579: ! #line 2607 "objc-parse.y" { if (objc_implementation_context) { *************** case 443: *** 4223,4337 **** warning ("`@end' must appear in an implementation context"); ; break;} ! case 444: ! #line 2186 "objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 445: ! #line 2188 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} ! case 446: ! #line 2193 "objc-parse.y" { objc_declare_class (yyvsp[-1].ttype); ; break;} ! case 447: ! #line 2199 "objc-parse.y" { objc_declare_alias (yyvsp[-2].ttype, yyvsp[-1].ttype); ; break;} ! case 448: ! #line 2205 "objc-parse.y" { objc_interface_context = objc_ivar_context = start_class (CLASS_INTERFACE_TYPE, yyvsp[-2].ttype, NULL_TREE, yyvsp[-1].ttype); objc_public_flag = 0; ; break;} ! case 449: ! #line 2211 "objc-parse.y" { continue_class (objc_interface_context); ; break;} ! case 450: ! #line 2216 "objc-parse.y" { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ; break;} ! case 451: ! #line 2222 "objc-parse.y" { objc_interface_context = start_class (CLASS_INTERFACE_TYPE, yyvsp[-1].ttype, NULL_TREE, yyvsp[0].ttype); continue_class (objc_interface_context); ; break;} ! case 452: ! #line 2229 "objc-parse.y" { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ; break;} ! case 453: ! #line 2235 "objc-parse.y" { objc_interface_context = objc_ivar_context = start_class (CLASS_INTERFACE_TYPE, yyvsp[-4].ttype, yyvsp[-2].ttype, yyvsp[-1].ttype); objc_public_flag = 0; ; break;} ! case 454: ! #line 2241 "objc-parse.y" { continue_class (objc_interface_context); ; break;} ! case 455: ! #line 2246 "objc-parse.y" { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ; break;} ! case 456: ! #line 2252 "objc-parse.y" { objc_interface_context = start_class (CLASS_INTERFACE_TYPE, yyvsp[-3].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); continue_class (objc_interface_context); ; break;} ! case 457: ! #line 2259 "objc-parse.y" { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ; break;} ! case 458: ! #line 2265 "objc-parse.y" { objc_implementation_context = objc_ivar_context = start_class (CLASS_IMPLEMENTATION_TYPE, yyvsp[-1].ttype, NULL_TREE, NULL_TREE); objc_public_flag = 0; ; break;} ! case 459: ! #line 2271 "objc-parse.y" { objc_ivar_chain = continue_class (objc_implementation_context); ; break;} ! case 460: ! #line 2277 "objc-parse.y" { objc_implementation_context = start_class (CLASS_IMPLEMENTATION_TYPE, yyvsp[0].ttype, NULL_TREE, NULL_TREE); --- 4930,5044 ---- warning ("`@end' must appear in an implementation context"); ; break;} ! case 580: ! #line 2622 "objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 581: ! #line 2624 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} ! case 582: ! #line 2629 "objc-parse.y" { objc_declare_class (yyvsp[-1].ttype); ; break;} ! case 583: ! #line 2635 "objc-parse.y" { objc_declare_alias (yyvsp[-2].ttype, yyvsp[-1].ttype); ; break;} ! case 584: ! #line 2641 "objc-parse.y" { objc_interface_context = objc_ivar_context = start_class (CLASS_INTERFACE_TYPE, yyvsp[-2].ttype, NULL_TREE, yyvsp[-1].ttype); objc_public_flag = 0; ; break;} ! case 585: ! #line 2647 "objc-parse.y" { continue_class (objc_interface_context); ; break;} ! case 586: ! #line 2652 "objc-parse.y" { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ; break;} ! case 587: ! #line 2658 "objc-parse.y" { objc_interface_context = start_class (CLASS_INTERFACE_TYPE, yyvsp[-1].ttype, NULL_TREE, yyvsp[0].ttype); continue_class (objc_interface_context); ; break;} ! case 588: ! #line 2665 "objc-parse.y" { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ; break;} ! case 589: ! #line 2671 "objc-parse.y" { objc_interface_context = objc_ivar_context = start_class (CLASS_INTERFACE_TYPE, yyvsp[-4].ttype, yyvsp[-2].ttype, yyvsp[-1].ttype); objc_public_flag = 0; ; break;} ! case 590: ! #line 2677 "objc-parse.y" { continue_class (objc_interface_context); ; break;} ! case 591: ! #line 2682 "objc-parse.y" { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ; break;} ! case 592: ! #line 2688 "objc-parse.y" { objc_interface_context = start_class (CLASS_INTERFACE_TYPE, yyvsp[-3].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); continue_class (objc_interface_context); ; break;} ! case 593: ! #line 2695 "objc-parse.y" { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ; break;} ! case 594: ! #line 2701 "objc-parse.y" { objc_implementation_context = objc_ivar_context = start_class (CLASS_IMPLEMENTATION_TYPE, yyvsp[-1].ttype, NULL_TREE, NULL_TREE); objc_public_flag = 0; ; break;} ! case 595: ! #line 2707 "objc-parse.y" { objc_ivar_chain = continue_class (objc_implementation_context); ; break;} ! case 596: ! #line 2713 "objc-parse.y" { objc_implementation_context = start_class (CLASS_IMPLEMENTATION_TYPE, yyvsp[0].ttype, NULL_TREE, NULL_TREE); *************** case 460: *** 4339,4361 **** = continue_class (objc_implementation_context); ; break;} ! case 461: ! #line 2285 "objc-parse.y" { objc_implementation_context = objc_ivar_context = start_class (CLASS_IMPLEMENTATION_TYPE, yyvsp[-3].ttype, yyvsp[-1].ttype, NULL_TREE); objc_public_flag = 0; ; break;} ! case 462: ! #line 2291 "objc-parse.y" { objc_ivar_chain = continue_class (objc_implementation_context); ; break;} ! case 463: ! #line 2297 "objc-parse.y" { objc_implementation_context = start_class (CLASS_IMPLEMENTATION_TYPE, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); --- 5046,5068 ---- = continue_class (objc_implementation_context); ; break;} ! case 597: ! #line 2721 "objc-parse.y" { objc_implementation_context = objc_ivar_context = start_class (CLASS_IMPLEMENTATION_TYPE, yyvsp[-3].ttype, yyvsp[-1].ttype, NULL_TREE); objc_public_flag = 0; ; break;} ! case 598: ! #line 2727 "objc-parse.y" { objc_ivar_chain = continue_class (objc_implementation_context); ; break;} ! case 599: ! #line 2733 "objc-parse.y" { objc_implementation_context = start_class (CLASS_IMPLEMENTATION_TYPE, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); *************** case 463: *** 4363,4385 **** = continue_class (objc_implementation_context); ; break;} ! case 464: ! #line 2305 "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 465: ! #line 2312 "objc-parse.y" { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ; break;} ! case 466: ! #line 2318 "objc-parse.y" { objc_implementation_context = start_class (CATEGORY_IMPLEMENTATION_TYPE, yyvsp[-3].ttype, yyvsp[-1].ttype, NULL_TREE); --- 5070,5092 ---- = continue_class (objc_implementation_context); ; break;} ! case 600: ! #line 2741 "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 601: ! #line 2748 "objc-parse.y" { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ; break;} ! case 602: ! #line 2754 "objc-parse.y" { objc_implementation_context = start_class (CATEGORY_IMPLEMENTATION_TYPE, yyvsp[-3].ttype, yyvsp[-1].ttype, NULL_TREE); *************** case 466: *** 4387,4416 **** = continue_class (objc_implementation_context); ; break;} ! case 467: ! #line 2328 "objc-parse.y" { ! remember_protocol_qualifiers (); objc_interface_context = start_protocol(PROTOCOL_INTERFACE_TYPE, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 468: ! #line 2334 "objc-parse.y" { ! forget_protocol_qualifiers(); finish_protocol(objc_interface_context); objc_interface_context = NULL_TREE; ; break;} ! case 469: ! #line 2343 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 471: ! #line 2351 "objc-parse.y" { if (yyvsp[-2].code == LT_EXPR && yyvsp[0].code == GT_EXPR) yyval.ttype = yyvsp[-1].ttype; --- 5094,5129 ---- = continue_class (objc_implementation_context); ; break;} ! case 603: ! #line 2764 "objc-parse.y" { ! objc_pq_context = 1; objc_interface_context = start_protocol(PROTOCOL_INTERFACE_TYPE, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 604: ! #line 2770 "objc-parse.y" { ! objc_pq_context = 0; finish_protocol(objc_interface_context); objc_interface_context = NULL_TREE; ; break;} ! case 605: ! #line 2779 "objc-parse.y" ! { ! objc_declare_protocols (yyvsp[-1].ttype); ! ; ! break;} ! case 606: ! #line 2786 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 608: ! #line 2794 "objc-parse.y" { if (yyvsp[-2].code == LT_EXPR && yyvsp[0].code == GT_EXPR) yyval.ttype = yyvsp[-1].ttype; *************** case 471: *** 4418,4472 **** YYERROR1; ; break;} ! case 474: ! #line 2365 "objc-parse.y" { objc_public_flag = 2; ; break;} ! case 475: ! #line 2366 "objc-parse.y" { objc_public_flag = 0; ; break;} ! case 476: ! #line 2367 "objc-parse.y" { objc_public_flag = 1; ; break;} ! case 477: ! #line 2372 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 479: ! #line 2377 "objc-parse.y" { if (pedantic) pedwarn ("extra semicolon in struct or union specified"); ; break;} ! case 480: ! #line 2395 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ; break;} ! case 481: ! #line 2400 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ; break;} ! case 482: ! #line 2405 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 483: ! #line 2410 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 486: ! #line 2417 "objc-parse.y" { yyval.ttype = add_instance_variable (objc_ivar_context, objc_public_flag, --- 5131,5181 ---- YYERROR1; ; break;} ! case 611: ! #line 2808 "objc-parse.y" { objc_public_flag = 2; ; break;} ! case 612: ! #line 2809 "objc-parse.y" { objc_public_flag = 0; ; break;} ! case 613: ! #line 2810 "objc-parse.y" { objc_public_flag = 1; ; break;} ! case 614: ! #line 2815 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 616: ! #line 2820 "objc-parse.y" { if (pedantic) pedwarn ("extra semicolon in struct or union specified"); ; break;} ! case 617: ! #line 2838 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ; break;} ! case 618: ! #line 2841 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ; break;} ! case 619: ! #line 2844 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 620: ! #line 2849 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 623: ! #line 2856 "objc-parse.y" { yyval.ttype = add_instance_variable (objc_ivar_context, objc_public_flag, *************** case 486: *** 4474,4489 **** NULL_TREE); ; break;} ! case 487: ! #line 2424 "objc-parse.y" { yyval.ttype = add_instance_variable (objc_ivar_context, objc_public_flag, yyvsp[-2].ttype, current_declspecs, yyvsp[0].ttype); ; break;} ! case 488: ! #line 2430 "objc-parse.y" { yyval.ttype = add_instance_variable (objc_ivar_context, objc_public_flag, --- 5183,5198 ---- NULL_TREE); ; break;} ! case 624: ! #line 2863 "objc-parse.y" { yyval.ttype = add_instance_variable (objc_ivar_context, objc_public_flag, yyvsp[-2].ttype, current_declspecs, yyvsp[0].ttype); ; break;} ! case 625: ! #line 2869 "objc-parse.y" { yyval.ttype = add_instance_variable (objc_ivar_context, objc_public_flag, *************** case 488: *** 4491,4732 **** current_declspecs, yyvsp[0].ttype); ; break;} ! case 489: ! #line 2440 "objc-parse.y" ! { ! remember_protocol_qualifiers (); ! if (objc_implementation_context) ! objc_inherit_code = CLASS_METHOD_DECL; ! else ! fatal_error ("method definition not in class context"); ! ; ! break;} ! case 490: ! #line 2448 "objc-parse.y" ! { ! forget_protocol_qualifiers (); ! add_class_method (objc_implementation_context, yyvsp[0].ttype); ! start_method_def (yyvsp[0].ttype); ! objc_method_context = yyvsp[0].ttype; ! ; ! break;} ! case 491: ! #line 2455 "objc-parse.y" ! { ! continue_method_def (); ! ; break;} ! case 492: ! #line 2459 "objc-parse.y" ! { ! finish_method_def (); ! objc_method_context = NULL_TREE; ! ; break;} ! case 493: ! #line 2465 "objc-parse.y" { ! remember_protocol_qualifiers (); ! if (objc_implementation_context) ! objc_inherit_code = INSTANCE_METHOD_DECL; ! else fatal_error ("method definition not in class context"); ; break;} ! case 494: ! #line 2473 "objc-parse.y" { ! forget_protocol_qualifiers (); ! add_instance_method (objc_implementation_context, yyvsp[0].ttype); start_method_def (yyvsp[0].ttype); - objc_method_context = yyvsp[0].ttype; ; break;} ! case 495: ! #line 2480 "objc-parse.y" { continue_method_def (); ; break;} ! case 496: ! #line 2484 "objc-parse.y" { finish_method_def (); - objc_method_context = NULL_TREE; ; break;} ! case 498: ! #line 2496 "objc-parse.y" {yyval.ttype = NULL_TREE; ; break;} ! case 503: ! #line 2503 "objc-parse.y" {yyval.ttype = NULL_TREE; ; break;} ! case 507: ! #line 2513 "objc-parse.y" ! { ! /* Remember protocol qualifiers in prototypes. */ ! remember_protocol_qualifiers (); ! objc_inherit_code = CLASS_METHOD_DECL; ! ; ! break;} ! case 508: ! #line 2519 "objc-parse.y" ! { ! /* Forget protocol qualifiers here. */ ! forget_protocol_qualifiers (); ! add_class_method (objc_interface_context, yyvsp[0].ttype); ! ; ! break;} ! case 510: ! #line 2527 "objc-parse.y" { /* Remember protocol qualifiers in prototypes. */ ! remember_protocol_qualifiers (); ! objc_inherit_code = INSTANCE_METHOD_DECL; ; break;} ! case 511: ! #line 2533 "objc-parse.y" { /* Forget protocol qualifiers here. */ ! forget_protocol_qualifiers (); ! add_instance_method (objc_interface_context, yyvsp[0].ttype); ; break;} ! case 513: ! #line 2543 "objc-parse.y" { yyval.ttype = build_method_decl (objc_inherit_code, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} ! case 514: ! #line 2548 "objc-parse.y" { yyval.ttype = build_method_decl (objc_inherit_code, NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} ! case 515: ! #line 2553 "objc-parse.y" { yyval.ttype = build_method_decl (objc_inherit_code, yyvsp[-3].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 516: ! #line 2558 "objc-parse.y" { yyval.ttype = build_method_decl (objc_inherit_code, NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 525: ! #line 2588 "objc-parse.y" ! { current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ; break;} ! case 526: ! #line 2592 "objc-parse.y" { shadow_tag (yyvsp[-1].ttype); ; break;} ! case 527: ! #line 2594 "objc-parse.y" { pedwarn ("empty declaration"); ; break;} ! case 528: ! #line 2599 "objc-parse.y" { push_parm_decl (yyvsp[0].ttype); ; break;} ! case 529: ! #line 2601 "objc-parse.y" { push_parm_decl (yyvsp[0].ttype); ; break;} ! case 530: ! #line 2609 "objc-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), ! build_tree_list (prefix_attributes, ! yyvsp[0].ttype)); ; break;} ! case 531: ! #line 2614 "objc-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), ! build_tree_list (prefix_attributes, ! yyvsp[0].ttype)); ; break;} ! case 532: ! #line 2619 "objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, ! yyvsp[-1].ttype), ! build_tree_list (prefix_attributes, ! yyvsp[0].ttype)); ; break;} ! case 533: ! #line 2627 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 534: ! #line 2631 "objc-parse.y" { /* oh what a kludge! */ yyval.ttype = objc_ellipsis_node; ; break;} ! case 535: ! #line 2636 "objc-parse.y" { pushlevel (0); ; break;} ! case 536: ! #line 2640 "objc-parse.y" { /* returns a tree list node generated by get_parm_info */ yyval.ttype = yyvsp[0].ttype; poplevel (0, 0, 0); ; break;} ! case 539: ! #line 2655 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 565: ! #line 2676 "objc-parse.y" { yyval.ttype = build_keyword_decl (yyvsp[-5].ttype, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 566: ! #line 2681 "objc-parse.y" { yyval.ttype = build_keyword_decl (yyvsp[-2].ttype, NULL_TREE, yyvsp[0].ttype); ; break;} ! case 567: ! #line 2686 "objc-parse.y" { yyval.ttype = build_keyword_decl (NULL_TREE, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 568: ! #line 2691 "objc-parse.y" { yyval.ttype = build_keyword_decl (NULL_TREE, NULL_TREE, yyvsp[0].ttype); ; break;} ! case 572: ! #line 2704 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 573: ! #line 2712 "objc-parse.y" { if (TREE_CHAIN (yyvsp[0].ttype) == NULL_TREE) /* just return the expr., remove a level of indirection */ --- 5200,5395 ---- current_declspecs, yyvsp[0].ttype); ; break;} ! case 626: ! #line 2879 "objc-parse.y" ! { objc_inherit_code = CLASS_METHOD_DECL; ; break;} ! case 627: ! #line 2881 "objc-parse.y" ! { objc_inherit_code = INSTANCE_METHOD_DECL; ; break;} ! case 628: ! #line 2886 "objc-parse.y" { ! objc_pq_context = 1; ! if (!objc_implementation_context) fatal_error ("method definition not in class context"); ; break;} ! case 629: ! #line 2892 "objc-parse.y" { ! objc_pq_context = 0; ! if (objc_inherit_code == CLASS_METHOD_DECL) ! add_class_method (objc_implementation_context, yyvsp[0].ttype); ! else ! add_instance_method (objc_implementation_context, yyvsp[0].ttype); start_method_def (yyvsp[0].ttype); ; break;} ! case 630: ! #line 2901 "objc-parse.y" { continue_method_def (); ; break;} ! case 631: ! #line 2905 "objc-parse.y" { finish_method_def (); ; break;} ! case 633: ! #line 2916 "objc-parse.y" {yyval.ttype = NULL_TREE; ; break;} ! case 638: ! #line 2923 "objc-parse.y" {yyval.ttype = NULL_TREE; ; break;} ! case 642: ! #line 2933 "objc-parse.y" { /* Remember protocol qualifiers in prototypes. */ ! objc_pq_context = 1; ; break;} ! case 643: ! #line 2938 "objc-parse.y" { /* Forget protocol qualifiers here. */ ! objc_pq_context = 0; ! if (objc_inherit_code == CLASS_METHOD_DECL) ! add_class_method (objc_interface_context, yyvsp[0].ttype); ! else ! add_instance_method (objc_interface_context, yyvsp[0].ttype); ; break;} ! case 645: ! #line 2951 "objc-parse.y" { yyval.ttype = build_method_decl (objc_inherit_code, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} ! case 646: ! #line 2956 "objc-parse.y" { yyval.ttype = build_method_decl (objc_inherit_code, NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} ! case 647: ! #line 2961 "objc-parse.y" { yyval.ttype = build_method_decl (objc_inherit_code, yyvsp[-3].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 648: ! #line 2966 "objc-parse.y" { yyval.ttype = build_method_decl (objc_inherit_code, NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 657: ! #line 2996 "objc-parse.y" ! { POP_DECLSPEC_STACK; ; break;} ! case 658: ! #line 2998 "objc-parse.y" { shadow_tag (yyvsp[-1].ttype); ; break;} ! case 659: ! #line 3000 "objc-parse.y" { pedwarn ("empty declaration"); ; break;} ! case 660: ! #line 3005 "objc-parse.y" { push_parm_decl (yyvsp[0].ttype); ; break;} ! case 661: ! #line 3007 "objc-parse.y" { push_parm_decl (yyvsp[0].ttype); ; break;} ! case 662: ! #line 3015 "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 663: ! #line 3019 "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 664: ! #line 3023 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; break;} ! case 665: ! #line 3028 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} ! case 666: ! #line 3032 "objc-parse.y" { /* oh what a kludge! */ yyval.ttype = objc_ellipsis_node; ; break;} ! case 667: ! #line 3037 "objc-parse.y" { pushlevel (0); ; break;} ! case 668: ! #line 3041 "objc-parse.y" { /* returns a tree list node generated by get_parm_info */ yyval.ttype = yyvsp[0].ttype; poplevel (0, 0, 0); ; break;} ! case 671: ! #line 3056 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 698: ! #line 3078 "objc-parse.y" { yyval.ttype = build_keyword_decl (yyvsp[-5].ttype, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 699: ! #line 3083 "objc-parse.y" { yyval.ttype = build_keyword_decl (yyvsp[-2].ttype, NULL_TREE, yyvsp[0].ttype); ; break;} ! case 700: ! #line 3088 "objc-parse.y" { yyval.ttype = build_keyword_decl (NULL_TREE, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 701: ! #line 3093 "objc-parse.y" { yyval.ttype = build_keyword_decl (NULL_TREE, NULL_TREE, yyvsp[0].ttype); ; break;} ! case 705: ! #line 3106 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 706: ! #line 3114 "objc-parse.y" { if (TREE_CHAIN (yyvsp[0].ttype) == NULL_TREE) /* just return the expr., remove a level of indirection */ *************** case 573: *** 4736,4805 **** yyval.ttype = yyvsp[0].ttype; ; break;} ! case 574: ! #line 2724 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 575: ! #line 2728 "objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 577: ! #line 2736 "objc-parse.y" { yyval.ttype = get_class_reference (yyvsp[0].ttype); ; break;} ! case 578: ! #line 2743 "objc-parse.y" { objc_receiver_context = 1; ; break;} ! case 579: ! #line 2745 "objc-parse.y" { objc_receiver_context = 0; ; break;} ! case 580: ! #line 2747 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} ! case 584: ! #line 2760 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 585: ! #line 2767 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-1].ttype, NULL_TREE); ; break;} ! case 586: ! #line 2771 "objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, NULL_TREE); ; break;} ! case 587: ! #line 2778 "objc-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} ! case 588: ! #line 2785 "objc-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} ! case 589: ! #line 2794 "objc-parse.y" { yyval.ttype = groktypename (yyvsp[-1].ttype); ; --- 5399,5468 ---- yyval.ttype = yyvsp[0].ttype; ; break;} ! case 707: ! #line 3126 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} ! case 708: ! #line 3130 "objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} ! case 710: ! #line 3138 "objc-parse.y" { yyval.ttype = get_class_reference (yyvsp[0].ttype); ; break;} ! case 711: ! #line 3145 "objc-parse.y" { objc_receiver_context = 1; ; break;} ! case 712: ! #line 3147 "objc-parse.y" { objc_receiver_context = 0; ; break;} ! case 713: ! #line 3149 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} ! case 717: ! #line 3162 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} ! case 718: ! #line 3169 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-1].ttype, NULL_TREE); ; break;} ! case 719: ! #line 3173 "objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, NULL_TREE); ; break;} ! case 720: ! #line 3180 "objc-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} ! case 721: ! #line 3187 "objc-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} ! case 722: ! #line 3196 "objc-parse.y" { yyval.ttype = groktypename (yyvsp[-1].ttype); ; *************** yyerrhandle: *** 5026,5032 **** } return 1; } ! #line 2799 "objc-parse.y" /* yylex() is a thin wrapper around c_lex(), all it does is translate --- 5689,5695 ---- } return 1; } ! #line 3201 "objc-parse.y" /* yylex() is a thin wrapper around c_lex(), all it does is translate *************** static const struct resword reswords[] = *** 5054,5059 **** --- 5717,5724 ---- { { "_Bool", RID_BOOL, 0 }, { "_Complex", RID_COMPLEX, 0 }, + { "__FUNCTION__", RID_FUNCTION_NAME, 0 }, + { "__PRETTY_FUNCTION__", RID_PRETTY_FUNCTION_NAME, 0 }, { "__alignof", RID_ALIGNOF, 0 }, { "__alignof__", RID_ALIGNOF, 0 }, { "__asm", RID_ASM, 0 }, *************** static const struct resword reswords[] = *** 5062,5073 **** --- 5727,5741 ---- { "__attribute__", RID_ATTRIBUTE, 0 }, { "__bounded", RID_BOUNDED, 0 }, { "__bounded__", RID_BOUNDED, 0 }, + { "__builtin_choose_expr", RID_CHOOSE_EXPR, 0 }, + { "__builtin_types_compatible_p", RID_TYPES_COMPATIBLE_P, 0 }, { "__builtin_va_arg", RID_VA_ARG, 0 }, { "__complex", RID_COMPLEX, 0 }, { "__complex__", RID_COMPLEX, 0 }, { "__const", RID_CONST, 0 }, { "__const__", RID_CONST, 0 }, { "__extension__", RID_EXTENSION, 0 }, + { "__func__", RID_C99_FUNCTION_NAME, 0 }, { "__imag", RID_IMAGPART, 0 }, { "__imag__", RID_IMAGPART, 0 }, { "__inline", RID_INLINE, 0 }, *************** static const struct resword reswords[] = *** 5127,5145 **** { "void", RID_VOID, 0 }, { "volatile", RID_VOLATILE, D_TRAD }, { "while", RID_WHILE, 0 }, - { "@class", RID_AT_CLASS, D_OBJC }, - { "@compatibility_alias", RID_AT_ALIAS, D_OBJC }, - { "@defs", RID_AT_DEFS, D_OBJC }, - { "@encode", RID_AT_ENCODE, D_OBJC }, - { "@end", RID_AT_END, D_OBJC }, - { "@implementation", RID_AT_IMPLEMENTATION, D_OBJC }, - { "@interface", RID_AT_INTERFACE, D_OBJC }, - { "@private", RID_AT_PRIVATE, D_OBJC }, - { "@protected", RID_AT_PROTECTED, D_OBJC }, - { "@protocol", RID_AT_PROTOCOL, D_OBJC }, - { "@public", RID_AT_PUBLIC, D_OBJC }, - { "@selector", RID_AT_SELECTOR, D_OBJC }, { "id", RID_ID, D_OBJC }, { "bycopy", RID_BYCOPY, D_OBJC }, { "byref", RID_BYREF, D_OBJC }, { "in", RID_IN, D_OBJC }, --- 5795,5819 ---- { "void", RID_VOID, 0 }, { "volatile", RID_VOLATILE, D_TRAD }, { "while", RID_WHILE, 0 }, { "id", RID_ID, D_OBJC }, + + /* These objc keywords are recognized only immediately after + an '@'. */ + { "class", RID_AT_CLASS, D_OBJC }, + { "compatibility_alias", RID_AT_ALIAS, D_OBJC }, + { "defs", RID_AT_DEFS, D_OBJC }, + { "encode", RID_AT_ENCODE, D_OBJC }, + { "end", RID_AT_END, D_OBJC }, + { "implementation", RID_AT_IMPLEMENTATION, D_OBJC }, + { "interface", RID_AT_INTERFACE, D_OBJC }, + { "private", RID_AT_PRIVATE, D_OBJC }, + { "protected", RID_AT_PROTECTED, D_OBJC }, + { "protocol", RID_AT_PROTOCOL, D_OBJC }, + { "public", RID_AT_PUBLIC, D_OBJC }, + { "selector", RID_AT_SELECTOR, D_OBJC }, + + /* These are recognized only in protocol-qualifier context + (see above) */ { "bycopy", RID_BYCOPY, D_OBJC }, { "byref", RID_BYREF, D_OBJC }, { "in", RID_IN, D_OBJC }, *************** static const short rid_to_yy[RID_MAX] = *** 5225,5230 **** --- 5899,5911 ---- /* RID_PTREXTENT */ PTR_EXTENT, /* RID_PTRVALUE */ PTR_VALUE, + /* RID_CHOOSE_EXPR */ CHOOSE_EXPR, + /* RID_TYPES_COMPATIBLE_P */ TYPES_COMPATIBLE_P, + + /* RID_FUNCTION_NAME */ STRING_FUNC_NAME, + /* RID_PRETTY_FUNCTION_NAME */ STRING_FUNC_NAME, + /* RID_C99_FUNCTION_NAME */ VAR_FUNC_NAME, + /* C++ */ /* RID_BOOL */ TYPESPEC, /* RID_WCHAR */ 0, *************** static const short rid_to_yy[RID_MAX] = *** 5266,5272 **** /* RID_BITAND */ 0, /* RID_BITOR */ 0, /* RID_COMPL */ 0, ! /* Objective C */ /* RID_ID */ OBJECTNAME, /* RID_AT_ENCODE */ ENCODE, --- 5947,5953 ---- /* RID_BITAND */ 0, /* RID_BITOR */ 0, /* RID_COMPL */ 0, ! /* Objective C */ /* RID_ID */ OBJECTNAME, /* RID_AT_ENCODE */ ENCODE, *************** static const short rid_to_yy[RID_MAX] = *** 5283,5302 **** /* RID_AT_IMPLEMENTATION */ IMPLEMENTATION }; - /* Lookup table for ObjC keywords beginning with '@'. Crude but - hopefully effective. */ - #define N_at_reswords ((int) RID_AT_IMPLEMENTATION - (int)RID_AT_ENCODE + 1) - static tree objc_rid_sans_at[N_at_reswords]; - static void init_reswords () { unsigned int i; tree id; ! int mask = ((doing_objc_thang ? 0 : D_OBJC) ! | (flag_isoc99 ? 0 : D_C89) | (flag_traditional ? D_TRAD : 0) ! | (flag_no_asm ? (flag_isoc99 ? D_EXT : D_EXT|D_EXT89) : 0)); /* It is not necessary to register ridpointers as a GC root, because all the trees it points to are permanently interned in the --- 5964,5980 ---- /* RID_AT_IMPLEMENTATION */ IMPLEMENTATION }; static void init_reswords () { unsigned int i; tree id; ! int mask = (flag_isoc99 ? 0 : D_C89) | (flag_traditional ? D_TRAD : 0) ! | (flag_no_asm ? (flag_isoc99 ? D_EXT : D_EXT|D_EXT89) : 0); ! ! if (c_language != clk_objective_c) ! mask |= D_OBJC; /* It is not necessary to register ridpointers as a GC root, because all the trees it points to are permanently interned in the *************** init_reswords () *** 5313,5351 **** C_RID_CODE (id) = reswords[i].rid; C_IS_RESERVED_WORD (id) = 1; ridpointers [(int) reswords[i].rid] = id; - - /* Enter ObjC @-prefixed keywords into the "sans" table - _without_ their leading at-sign. Again, all these - identifiers are reachable by the get_identifer table, so it's - not necessary to make objc_rid_sans_at a GC root. */ - if (reswords[i].word[0] == '@') - objc_rid_sans_at[(int) reswords[i].rid - (int) RID_AT_ENCODE] - = get_identifier (reswords[i].word + 1); } - save_and_forget_protocol_qualifiers (); - } - - const char * - init_parse (filename) - const char *filename; - { - add_c_tree_codes (); - - /* Make identifier nodes long enough for the language-specific slots. */ - set_identifier_size (sizeof (struct lang_identifier)); - - init_reswords (); - init_pragma (); - - return init_c_lex (filename); - } - - void - finish_parse () - { - cpp_finish (parse_in); - /* Call to cpp_destroy () omitted for performance reasons. */ - errorcount += cpp_errors (parse_in); } #define NAME(type) cpp_type2name (type) --- 5991,5997 ---- *************** yyerror (msgid) *** 5361,5367 **** else if (last_token == CPP_CHAR || last_token == CPP_WCHAR) { unsigned int val = TREE_INT_CST_LOW (yylval.ttype); ! const char *ell = (last_token == CPP_CHAR) ? "" : "L"; if (val <= UCHAR_MAX && ISGRAPH (val)) error ("%s before %s'%c'", string, ell, val); else --- 6007,6013 ---- else if (last_token == CPP_CHAR || last_token == CPP_WCHAR) { unsigned int val = TREE_INT_CST_LOW (yylval.ttype); ! const char *const ell = (last_token == CPP_CHAR) ? "" : "L"; if (val <= UCHAR_MAX && ISGRAPH (val)) error ("%s before %s'%c'", string, ell, val); else *************** yyerror (msgid) *** 5370,5378 **** else if (last_token == CPP_STRING || last_token == CPP_WSTRING) error ("%s before string constant", string); ! else if (last_token == CPP_NUMBER ! || last_token == CPP_INT ! || last_token == CPP_FLOAT) error ("%s before numeric constant", string); else if (last_token == CPP_NAME) error ("%s before \"%s\"", string, IDENTIFIER_POINTER (yylval.ttype)); --- 6016,6022 ---- else if (last_token == CPP_STRING || last_token == CPP_WSTRING) error ("%s before string constant", string); ! else if (last_token == CPP_NUMBER) error ("%s before numeric constant", string); else if (last_token == CPP_NAME) error ("%s before \"%s\"", string, IDENTIFIER_POINTER (yylval.ttype)); *************** static int *** 5384,5396 **** yylexname () { tree decl; ! if (C_IS_RESERVED_WORD (yylval.ttype)) { enum rid rid_code = C_RID_CODE (yylval.ttype); ! /* Return the canonical spelling for this keyword. */ ! yylval.ttype = ridpointers[(int) rid_code]; ! return rid_to_yy[(int) rid_code]; } decl = lookup_name (yylval.ttype); --- 6028,6070 ---- yylexname () { tree decl; ! ! int objc_force_identifier = objc_need_raw_identifier; ! OBJC_NEED_RAW_IDENTIFIER (0); ! if (C_IS_RESERVED_WORD (yylval.ttype)) { 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)) ! { ! int yycode = rid_to_yy[(int) rid_code]; ! if (yycode == STRING_FUNC_NAME) ! { ! /* __FUNCTION__ and __PRETTY_FUNCTION__ get converted ! to string constants. */ ! const char *name = fname_string (rid_code); ! ! yylval.ttype = build_string (strlen (name) + 1, name); ! C_ARTIFICIAL_STRING_P (yylval.ttype) = 1; ! last_token = CPP_STRING; /* so yyerror won't choke */ ! return STRING; ! } ! ! /* Return the canonical spelling for this keyword. */ ! yylval.ttype = ridpointers[(int) rid_code]; ! return yycode; ! } } decl = lookup_name (yylval.ttype); *************** yylexname () *** 5398,5429 **** { if (TREE_CODE (decl) == TYPE_DECL) return TYPENAME; - /* A user-invisible read-only initialized variable - should be replaced by its value. - We handle only strings since that's the only case used in C. */ - else if (TREE_CODE (decl) == VAR_DECL - && DECL_IGNORED_P (decl) - && TREE_READONLY (decl) - && DECL_INITIAL (decl) != 0 - && TREE_CODE (DECL_INITIAL (decl)) == STRING_CST) - { - tree stringval = DECL_INITIAL (decl), str; - - /* Copy the string value so that we won't clobber anything - if we put something in the TREE_CHAIN of this one. */ - str = build_string (TREE_STRING_LENGTH (stringval), - TREE_STRING_POINTER (stringval)); - if (yylval.ttype != func_id_node) - C_ARTIFICIAL_STRING_P (str) = 1; - yylval.ttype = str; - return STRING; - } } ! else if (doing_objc_thang) { tree objc_interface_decl = is_class_name (yylval.ttype); ! ! if (objc_interface_decl) { yylval.ttype = objc_interface_decl; return CLASSNAME; --- 6072,6086 ---- { if (TREE_CODE (decl) == TYPE_DECL) return TYPENAME; } ! 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 ! && (global_bindings_p () ! || (!objc_force_identifier && !decl))) { yylval.ttype = objc_interface_decl; return CLASSNAME; *************** _yylex () *** 5439,5445 **** { get_next: last_token = c_lex (&yylval.ttype); - reconsider: switch (last_token) { case CPP_EQ: return '='; --- 6096,6101 ---- *************** _yylex () *** 5461,5470 **** case CPP_AND_AND: return ANDAND; case CPP_OR_OR: return OROR; case CPP_QUERY: return '?'; - case CPP_COLON: return ':'; - case CPP_COMMA: return ','; case CPP_OPEN_PAREN: return '('; - case CPP_CLOSE_PAREN: return ')'; case CPP_EQ_EQ: yylval.code = EQ_EXPR; return EQCOMPARE; case CPP_NOT_EQ: yylval.code = NE_EXPR; return EQCOMPARE; case CPP_GREATER_EQ:yylval.code = GE_EXPR; return ARITHCOMPARE; --- 6117,6123 ---- *************** _yylex () *** 5485,5491 **** case CPP_CLOSE_SQUARE: return ']'; case CPP_OPEN_BRACE: return '{'; case CPP_CLOSE_BRACE: return '}'; - case CPP_SEMICOLON: return ';'; case CPP_ELLIPSIS: return ELLIPSIS; case CPP_PLUS_PLUS: return PLUSPLUS; --- 6138,6143 ---- *************** _yylex () *** 5493,5508 **** case CPP_DEREF: return POINTSAT; case CPP_DOT: return '.'; case CPP_EOF: ! if (cpp_pop_buffer (parse_in) == 0) ! return 0; ! goto get_next; case CPP_NAME: return yylexname (); - case CPP_INT: - case CPP_FLOAT: case CPP_NUMBER: case CPP_CHAR: case CPP_WCHAR: --- 6145,6163 ---- case CPP_DEREF: return POINTSAT; case CPP_DOT: return '.'; + /* The following tokens may affect the interpretation of any + identifiers following, if doing Objective-C. */ + case CPP_COLON: OBJC_NEED_RAW_IDENTIFIER (0); return ':'; + case CPP_COMMA: OBJC_NEED_RAW_IDENTIFIER (0); return ','; + case CPP_CLOSE_PAREN: OBJC_NEED_RAW_IDENTIFIER (0); return ')'; + case CPP_SEMICOLON: OBJC_NEED_RAW_IDENTIFIER (0); return ';'; + case CPP_EOF: ! return 0; case CPP_NAME: return yylexname (); case CPP_NUMBER: case CPP_CHAR: case CPP_WCHAR: *************** _yylex () *** 5512,5536 **** case CPP_WSTRING: return STRING; ! /* This token is Objective-C specific. It gives the next ! token special significance. */ case CPP_ATSIGN: ! last_token = c_lex (&yylval.ttype); ! if (last_token == CPP_STRING) ! return OBJC_STRING; ! else if (last_token == CPP_NAME) ! { ! int i; ! for (i = 0; i < N_at_reswords; i++) ! if (objc_rid_sans_at[i] == yylval.ttype) ! { ! int rid_code = i + (int) RID_AT_ENCODE; ! yylval.ttype = ridpointers[rid_code]; ! return rid_to_yy[rid_code]; ! } ! } ! error ("syntax error at '@' token"); ! goto reconsider; /* These tokens are C++ specific (and will not be generated in C mode, but let's be cautious). */ case CPP_SCOPE: --- 6167,6193 ---- case CPP_WSTRING: return STRING; ! /* This token is Objective-C specific. It gives the next token ! special significance. */ case CPP_ATSIGN: ! { ! tree after_at; ! enum cpp_ttype after_at_type; ! ! after_at_type = c_lex (&after_at); ! ! if (after_at_type == CPP_NAME ! && C_IS_RESERVED_WORD (after_at) ! && OBJC_IS_AT_KEYWORD (C_RID_CODE (after_at))) ! { ! yylval.ttype = after_at; ! last_token = after_at_type; ! return rid_to_yy [(int) C_RID_CODE (after_at)]; ! } ! _cpp_backup_tokens (parse_in, 1); ! return '@'; ! } ! /* These tokens are C++ specific (and will not be generated in C mode, but let's be cautious). */ case CPP_SCOPE: *************** yylex() *** 5567,5579 **** in order to build the compiler. */ void ! set_yydebug (value) int value; { #if YYDEBUG != 0 yydebug = value; #else ! warning ("YYDEBUG not defined."); #endif } --- 6224,6236 ---- in order to build the compiler. */ void ! c_set_yydebug (value) int value; { #if YYDEBUG != 0 yydebug = value; #else ! warning ("YYDEBUG not defined"); #endif } *************** yyprint (file, yychar, yyl) *** 5632,5646 **** /* Return something to represent absolute declarators containing a *. TARGET is the absolute declarator that the * contains. ! TYPE_QUALS is a list of modifiers such as const or volatile ! to apply to the pointer type, represented as identifiers. ! We return an INDIRECT_REF whose "contents" are TARGET ! and whose type is the modifier list. */ tree ! make_pointer_declarator (type_quals, target) ! tree type_quals, target; { ! return build1 (INDIRECT_REF, type_quals, target); } --- 6289,6309 ---- /* Return something to represent absolute declarators containing a *. TARGET is the absolute declarator that the * contains. ! TYPE_QUALS_ATTRS is a list of modifiers such as const or volatile ! to apply to the pointer type, represented as identifiers, possible mixed ! with attributes. ! We return an INDIRECT_REF whose "contents" are TARGET (inside a TREE_LIST, ! if attributes are present) and whose type is the modifier list. */ tree ! make_pointer_declarator (type_quals_attrs, target) ! tree type_quals_attrs, target; { ! tree quals, attrs; ! tree itarget = target; ! split_specs_attrs (type_quals_attrs, &quals, &attrs); ! if (attrs != NULL_TREE) ! itarget = tree_cons (attrs, target, NULL_TREE); ! return build1 (INDIRECT_REF, quals, itarget); } diff -Nrc3pad gcc-3.0.4/gcc/objc/objc-parse.y gcc-3.1/gcc/objc/objc-parse.y *** gcc-3.0.4/gcc/objc/objc-parse.y Wed Feb 20 19:42:15 2002 --- gcc-3.1/gcc/objc/objc-parse.y Wed May 15 03:01:00 2002 *************** *** 3,24 **** Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. ! This file is part of GNU CC. ! GNU CC 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 CC 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 CC; see the file COPYING. If not, write to ! the Free Software Foundation, 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ /* This file defines the grammar of C and that of Objective C. ifobjc ... end ifobjc conditionals contain code for Objective C only. --- 3,24 ---- Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 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. */ /* This file defines the grammar of C and that of Objective C. ifobjc ... end ifobjc conditionals contain code for Objective C only. *************** Boston, MA 02111-1307, USA. */ *** 29,40 **** /* To whomever it may concern: I have heard that such a thing was once written by AT&T, but I have never seen it. */ ! %expect 74 %{ #include "config.h" #include "system.h" - #include #include "tree.h" #include "input.h" #include "cpplib.h" --- 29,39 ---- /* To whomever it may concern: I have heard that such a thing was once written by AT&T, but I have never seen it. */ ! %expect 31 /* shift/reduce conflicts, and 1 reduce/reduce conflict. */ %{ #include "config.h" #include "system.h" #include "tree.h" #include "input.h" #include "cpplib.h" *************** Boston, MA 02111-1307, USA. */ *** 54,63 **** #include "objc-act.h" - /* Since parsers are distinct for each language, put the language string - definition here. */ - const char * const language_string = "GNU Objective-C"; - /* Like YYERROR but do call yyerror. */ #define YYERROR1 { yyerror ("syntax error"); YYERROR; } --- 53,58 ---- *************** const char * const language_string = "GN *** 110,118 **** %token SIZEOF ENUM STRUCT UNION IF ELSE WHILE DO FOR SWITCH CASE DEFAULT %token BREAK CONTINUE RETURN GOTO ASM_KEYWORD TYPEOF ALIGNOF %token ATTRIBUTE EXTENSION LABEL ! %token REALPART IMAGPART VA_ARG %token PTR_VALUE PTR_BASE PTR_EXTENT /* Add precedence rules to solve dangling else s/r conflict */ %nonassoc IF %nonassoc ELSE --- 105,116 ---- %token SIZEOF ENUM STRUCT UNION IF ELSE WHILE DO FOR SWITCH CASE DEFAULT %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 + /* function name can be a string const or a var decl. */ + %token STRING_FUNC_NAME VAR_FUNC_NAME + /* Add precedence rules to solve dangling else s/r conflict */ %nonassoc IF %nonassoc ELSE *************** const char * const language_string = "GN *** 142,164 **** %token INTERFACE IMPLEMENTATION END SELECTOR DEFS ENCODE %token CLASSNAME PUBLIC PRIVATE PROTECTED PROTOCOL OBJECTNAME CLASS ALIAS - /* Objective-C string constants in raw form. - yylval is an STRING_CST node. */ - %token OBJC_STRING - - %type unop %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 STRING ! %type typed_declspecs reserved_declspecs ! %type typed_typespecs reserved_typespecquals ! %type declmods typespec typespecqual_reserved ! %type typed_declspecs_no_prefix_attr reserved_declspecs_no_prefix_attr ! %type declmods_no_prefix_attr ! %type SCSPEC TYPESPEC TYPE_QUAL nonempty_type_quals maybe_type_qual %type initdecls notype_initdecls initdcl notype_initdcl %type init maybeasm %type asm_operands nonnull_asm_operands asm_operand asm_clobbers --- 140,167 ---- %token INTERFACE IMPLEMENTATION END SELECTOR DEFS ENCODE %token CLASSNAME PUBLIC PRIVATE PROTECTED PROTOCOL OBJECTNAME CLASS ALIAS %type unop %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 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 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 *************** const char * const language_string = "GN *** 172,190 **** %type declarator %type notype_declarator after_type_declarator %type parm_declarator ! %type structsp component_decl_list component_decl_list2 ! %type component_decl components component_declarator %type enumlist enumerator %type struct_head union_head enum_head ! %type typename absdcl absdcl1 type_quals ! %type xexpr parms parm identifiers %type parmlist parmlist_1 parmlist_2 %type parmlist_or_identifiers parmlist_or_identifiers_1 %type identifiers_or_typenames ! %type setspecs %type save_filename %type save_lineno --- 175,198 ---- %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 %type save_filename %type save_lineno *************** const char * const language_string = "GN *** 199,205 **** %type selectorarg keywordnamelist keywordname objcencodeexpr %type objc_string non_empty_protocolrefs protocolrefs identifier_list objcprotocolexpr ! %type CLASSNAME OBJC_STRING OBJECTNAME %{ /* Number of statements (loosely speaking) and compound statements --- 207,213 ---- %type selectorarg keywordnamelist keywordname objcencodeexpr %type objc_string non_empty_protocolrefs protocolrefs identifier_list objcprotocolexpr ! %type CLASSNAME OBJECTNAME %{ /* Number of statements (loosely speaking) and compound statements *************** static int if_stmt_line; *** 216,245 **** static tree current_declspecs = NULL_TREE; static tree prefix_attributes = NULL_TREE; ! /* Stack of saved values of current_declspecs and prefix_attributes. */ static tree declspec_stack; /* For __extension__, save/restore the warning flags which are controlled by __extension__. */ ! #define SAVE_WARN_FLAGS() \ ! size_int (pedantic | (warn_pointer_arith << 1)) ! #define RESTORE_WARN_FLAGS(tval) \ ! do { \ ! int val = tree_low_cst (tval, 0); \ ! pedantic = val & 1; \ ! warn_pointer_arith = (val >> 1) & 1; \ } while (0) ! /* Objective-C specific information */ ! tree objc_interface_context; ! tree objc_implementation_context; ! tree objc_method_context; ! tree objc_ivar_chain; ! tree objc_ivar_context; ! enum tree_code objc_inherit_code; ! int objc_receiver_context; ! int objc_public_flag; /* Tell yyparse how to print a token's value, if yydebug is set. */ --- 224,282 ---- static tree current_declspecs = NULL_TREE; static tree prefix_attributes = NULL_TREE; ! /* List of all the attributes applying to the identifier currently being ! declared; includes prefix_attributes and possibly some more attributes ! just after a comma. */ ! static tree all_prefix_attributes = NULL_TREE; ! ! /* Stack of saved values of current_declspecs, prefix_attributes and ! all_prefix_attributes. */ static 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 controlled by __extension__. */ ! #define SAVE_WARN_FLAGS() \ ! size_int (pedantic \ ! | (warn_pointer_arith << 1) \ ! | (warn_traditional << 2)) ! ! #define RESTORE_WARN_FLAGS(tval) \ ! do { \ ! int val = tree_low_cst (tval, 0); \ ! pedantic = val & 1; \ ! warn_pointer_arith = (val >> 1) & 1; \ ! warn_traditional = (val >> 2) & 1; \ } while (0) ! /* 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 ! an identifier to an ObjC class, even if a class with that name ! exists. */ ! static int objc_need_raw_identifier; ! #define OBJC_NEED_RAW_IDENTIFIER(VAL) objc_need_raw_identifier = VAL /* Tell yyparse how to print a token's value, if yydebug is set. */ *************** static void init_reswords PARAMS ((void) *** 257,270 **** void c_parse_init () { ggc_add_tree_root (&declspec_stack, 1); ggc_add_tree_root (¤t_declspecs, 1); ggc_add_tree_root (&prefix_attributes, 1); ! ggc_add_tree_root (&objc_interface_context, 1); ! ggc_add_tree_root (&objc_implementation_context, 1); ! ggc_add_tree_root (&objc_method_context, 1); ! ggc_add_tree_root (&objc_ivar_chain, 1); ! ggc_add_tree_root (&objc_ivar_context, 1); } %} --- 294,305 ---- void c_parse_init () { + init_reswords (); + ggc_add_tree_root (&declspec_stack, 1); ggc_add_tree_root (¤t_declspecs, 1); ggc_add_tree_root (&prefix_attributes, 1); ! ggc_add_tree_root (&all_prefix_attributes, 1); } %} *************** program: /* empty */ *** 281,287 **** get us back to the global binding level. */ while (! global_bindings_p ()) poplevel (0, 0, 0); ! finish_file (); } ; --- 316,322 ---- get us back to the global binding level. */ while (! global_bindings_p ()) poplevel (0, 0, 0); ! finish_file (); } ; *************** datadef: *** 317,336 **** else if (!flag_traditional) warning ("data definition has no type or storage class"); ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); } ! | declmods setspecs notype_initdecls ';' ! { current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); } ! | typed_declspecs setspecs initdecls ';' ! { current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); } ! | declmods ';' ! { pedwarn ("empty declaration"); } ! | typed_declspecs ';' { shadow_tag ($1); } | error ';' | error '}' --- 352,363 ---- else if (!flag_traditional) 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 '}' *************** datadef: *** 340,348 **** ; fndef: ! typed_declspecs setspecs declarator { if (! start_function (current_declspecs, $3, ! prefix_attributes, NULL_TREE)) YYERROR1; } old_style_parm_decls --- 367,375 ---- ; fndef: ! declspecs_ts setspecs declarator { if (! start_function (current_declspecs, $3, ! all_prefix_attributes)) YYERROR1; } old_style_parm_decls *************** fndef: *** 350,366 **** save_filename save_lineno compstmt_or_error { DECL_SOURCE_FILE (current_function_decl) = $7; DECL_SOURCE_LINE (current_function_decl) = $8; ! finish_function (0); ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); } ! | typed_declspecs setspecs declarator error ! { current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); } ! | declmods setspecs notype_declarator { if (! start_function (current_declspecs, $3, ! prefix_attributes, NULL_TREE)) YYERROR1; } old_style_parm_decls --- 377,389 ---- save_filename save_lineno compstmt_or_error { DECL_SOURCE_FILE (current_function_decl) = $7; DECL_SOURCE_LINE (current_function_decl) = $8; ! finish_function (0, 1); ! POP_DECLSPEC_STACK; } ! | 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 *************** fndef: *** 368,384 **** save_filename save_lineno compstmt_or_error { DECL_SOURCE_FILE (current_function_decl) = $7; DECL_SOURCE_LINE (current_function_decl) = $8; ! finish_function (0); ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); } ! | declmods setspecs notype_declarator error ! { current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); } | setspecs notype_declarator { if (! start_function (NULL_TREE, $2, ! prefix_attributes, NULL_TREE)) YYERROR1; } old_style_parm_decls --- 391,403 ---- save_filename save_lineno compstmt_or_error { DECL_SOURCE_FILE (current_function_decl) = $7; DECL_SOURCE_LINE (current_function_decl) = $8; ! finish_function (0, 1); ! POP_DECLSPEC_STACK; } ! | 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 *************** fndef: *** 386,406 **** save_filename save_lineno compstmt_or_error { DECL_SOURCE_FILE (current_function_decl) = $6; DECL_SOURCE_LINE (current_function_decl) = $7; ! finish_function (0); ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); } | setspecs notype_declarator error ! { current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); } ; identifier: IDENTIFIER | TYPENAME | OBJECTNAME ! | CLASSNAME ; unop: '&' --- 405,421 ---- save_filename save_lineno compstmt_or_error { DECL_SOURCE_FILE (current_function_decl) = $6; DECL_SOURCE_LINE (current_function_decl) = $7; ! finish_function (0, 1); ! POP_DECLSPEC_STACK; } | setspecs notype_declarator error ! { POP_DECLSPEC_STACK; } ; identifier: IDENTIFIER | TYPENAME | OBJECTNAME ! | CLASSNAME ; unop: '&' *************** unary_expr: *** 450,467 **** overflow_warning ($$); } /* Refer to the address of a label as a pointer. */ | ANDAND identifier ! { tree label = lookup_label ($2); ! if (pedantic) ! pedwarn ("ISO C forbids `&&'"); ! if (label == 0) ! $$ = null_pointer_node; ! else ! { ! TREE_USED (label) = 1; ! $$ = build1 (ADDR_EXPR, ptr_type_node, label); ! TREE_CONSTANT ($$) = 1; ! } ! } /* This seems to be impossible on some machines, so let's turn it off. You can use __builtin_next_arg to find the anonymous stack args. | '&' ELLIPSIS --- 465,471 ---- overflow_warning ($$); } /* Refer to the address of a label as a pointer. */ | ANDAND identifier ! { $$ = finish_label_address_expr ($2); } /* This seems to be impossible on some machines, so let's turn it off. You can use __builtin_next_arg to find the anonymous stack args. | '&' ELLIPSIS *************** alignof: *** 509,523 **** cast_expr: unary_expr | '(' typename ')' cast_expr %prec UNARY ! { tree type; ! int SAVED_warn_strict_prototypes = warn_strict_prototypes; ! /* This avoids warnings about unprototyped casts on ! integers. E.g. "#define SIG_DFL (void(*)())0". */ ! if (TREE_CODE ($4) == INTEGER_CST) ! warn_strict_prototypes = 0; ! type = groktypename ($2); ! warn_strict_prototypes = SAVED_warn_strict_prototypes; ! $$ = build_c_cast (type, $4); } ; expr_no_commas: --- 513,519 ---- cast_expr: unary_expr | '(' typename ')' cast_expr %prec UNARY ! { $$ = c_cast_expr ($2, $4); } ; expr_no_commas: *************** expr_no_commas: *** 581,588 **** { char class; $$ = build_modify_expr ($1, NOP_EXPR, $3); class = TREE_CODE_CLASS (TREE_CODE ($$)); ! if (class == 'e' || class == '1' ! || class == '2' || class == '<') C_SET_EXP_ORIGINAL_CODE ($$, MODIFY_EXPR); } | expr_no_commas ASSIGN expr_no_commas --- 577,583 ---- { 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 *************** expr_no_commas: *** 590,597 **** $$ = build_modify_expr ($1, $2, $3); /* This inhibits warnings in truthvalue_conversion. */ class = TREE_CODE_CLASS (TREE_CODE ($$)); ! if (class == 'e' || class == '1' ! || class == '2' || class == '<') C_SET_EXP_ORIGINAL_CODE ($$, ERROR_MARK); } ; --- 585,591 ---- $$ = build_modify_expr ($1, $2, $3); /* This inhibits warnings in truthvalue_conversion. */ class = TREE_CODE_CLASS (TREE_CODE ($$)); ! if (IS_EXPR_CODE_CLASS (class)) C_SET_EXP_ORIGINAL_CODE ($$, ERROR_MARK); } ; *************** primary: *** 606,644 **** | CONSTANT | string { $$ = combine_strings ($1); } | '(' typename ')' '{' { start_init (NULL_TREE, NULL, 0); $2 = groktypename ($2); really_start_incremental_init ($2); } initlist_maybe_comma '}' %prec UNARY ! { const char *name; ! tree result = pop_init_level (0); tree type = $2; finish_init (); if (pedantic && ! flag_isoc99) pedwarn ("ISO C89 forbids compound literals"); ! if (TYPE_NAME (type) != 0) ! { ! if (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE) ! name = IDENTIFIER_POINTER (TYPE_NAME (type)); ! else ! name = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type))); ! } ! else ! name = ""; ! $$ = result; ! if (TREE_CODE (type) == ARRAY_TYPE && !COMPLETE_TYPE_P (type)) ! { ! int failure = complete_array_type (type, $$, 1); ! if (failure) ! abort (); ! } } | '(' expr ')' { char class = TREE_CODE_CLASS (TREE_CODE ($2)); ! if (class == 'e' || class == '1' ! || class == '2' || class == '<') C_SET_EXP_ORIGINAL_CODE ($2, ERROR_MARK); $$ = $2; } | '(' error ')' --- 600,623 ---- | CONSTANT | string { $$ = combine_strings ($1); } + | VAR_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 C89 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 ')' *************** primary: *** 670,702 **** { $$ = build_function_call ($1, $3); } | VA_ARG '(' expr_no_commas ',' typename ')' { $$ = build_va_arg ($3, groktypename ($5)); } | primary '[' expr ']' %prec '.' { $$ = build_array_ref ($1, $3); } | primary '.' identifier { ! if (doing_objc_thang) ! { ! if (is_public ($1, $3)) ! $$ = build_component_ref ($1, $3); ! else ! $$ = error_mark_node; ! } ! else ! $$ = build_component_ref ($1, $3); } | primary POINTSAT identifier { tree expr = build_indirect_ref ($1, "->"); ! if (doing_objc_thang) ! { ! if (is_public (expr, $3)) ! $$ = build_component_ref (expr, $3); ! else $$ = error_mark_node; ! } ! else ! $$ = build_component_ref (expr, $3); } | primary PLUSPLUS { $$ = build_unary_op (POSTINCREMENT_EXPR, $1, 0); } --- 649,692 ---- { $$ = 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) + ? 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); } *************** string: *** 726,734 **** /* Produces an STRING_CST with perhaps more STRING_CSTs chained onto it, which is to be read as an ObjC string object. */ objc_string: ! OBJC_STRING ! | objc_string OBJC_STRING ! { $$ = chainon ($1, $2); } ; old_style_parm_decls: --- 716,725 ---- /* Produces an STRING_CST with perhaps more STRING_CSTs chained onto it, which is to be read as an ObjC string object. */ objc_string: ! '@' STRING ! { $$ = $2; } ! | objc_string '@' STRING ! { $$ = chainon ($1, $3); } ; old_style_parm_decls: *************** datadecls: *** 761,778 **** attribute suffix, or function defn with attribute prefix on first old style parm. */ datadecl: ! typed_declspecs_no_prefix_attr setspecs initdecls ';' ! { current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); } ! | declmods_no_prefix_attr setspecs notype_initdecls ';' ! { current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); } ! | typed_declspecs_no_prefix_attr ';' { shadow_tag_warned ($1, 1); pedwarn ("empty declaration"); } ! | declmods_no_prefix_attr ';' { pedwarn ("empty declaration"); } ; --- 752,765 ---- attribute suffix, or function defn with attribute prefix on first old style parm. */ datadecl: ! declspecs_ts_nosa setspecs initdecls ';' ! { POP_DECLSPEC_STACK; } ! | 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"); } ; *************** lineno_decl: *** 791,903 **** for the sake of parm declarations nested in function declarators. */ setspecs: /* empty */ { pending_xref_error (); ! declspec_stack = tree_cons (prefix_attributes, ! current_declspecs, ! declspec_stack); split_specs_attrs ($0, ! ¤t_declspecs, &prefix_attributes); } ; ! /* ??? Yuck. See after_type_declarator. */ ! setattrs: /* empty */ ! { prefix_attributes = chainon (prefix_attributes, $0); } ; decl: ! typed_declspecs setspecs initdecls ';' ! { current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); } ! | declmods setspecs notype_initdecls ';' ! { current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); } ! | typed_declspecs setspecs nested_function ! { current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); } ! | declmods setspecs notype_nested_function ! { current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); } ! | typed_declspecs ';' { shadow_tag ($1); } - | declmods ';' - { pedwarn ("empty declaration"); } | extension decl { RESTORE_WARN_FLAGS ($1); } ; /* 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. */ ! typed_declspecs: ! typespec reserved_declspecs ! { $$ = tree_cons (NULL_TREE, $1, $2); } ! | declmods typespec reserved_declspecs ! { $$ = chainon ($3, tree_cons (NULL_TREE, $2, $1)); } ; ! reserved_declspecs: /* empty */ ! { $$ = NULL_TREE; } ! | reserved_declspecs typespecqual_reserved ! { $$ = tree_cons (NULL_TREE, $2, $1); } ! | reserved_declspecs SCSPEC ! { if (extra_warnings) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); ! $$ = tree_cons (NULL_TREE, $2, $1); } ! | reserved_declspecs attributes ! { $$ = tree_cons ($2, NULL_TREE, $1); } ; ! typed_declspecs_no_prefix_attr: ! typespec reserved_declspecs_no_prefix_attr ! { $$ = tree_cons (NULL_TREE, $1, $2); } ! | declmods_no_prefix_attr typespec reserved_declspecs_no_prefix_attr ! { $$ = chainon ($3, tree_cons (NULL_TREE, $2, $1)); } ; ! reserved_declspecs_no_prefix_attr: ! /* empty */ ! { $$ = NULL_TREE; } ! | reserved_declspecs_no_prefix_attr typespecqual_reserved ! { $$ = tree_cons (NULL_TREE, $2, $1); } ! | reserved_declspecs_no_prefix_attr SCSPEC ! { if (extra_warnings) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); ! $$ = tree_cons (NULL_TREE, $2, $1); } ; ! /* List of just storage classes, type modifiers, and prefix attributes. ! A declaration can start with just this, but then it cannot be used ! to redeclare a typedef-name. ! Declspecs have a non-NULL TREE_VALUE, attributes do not. */ ! declmods: ! declmods_no_prefix_attr ! { $$ = $1; } ! | attributes ! { $$ = tree_cons ($1, NULL_TREE, NULL_TREE); } ! | declmods declmods_no_prefix_attr ! { $$ = chainon ($2, $1); } ! | declmods attributes ! { $$ = tree_cons ($2, NULL_TREE, $1); } ; ! declmods_no_prefix_attr: ! TYPE_QUAL ! { $$ = tree_cons (NULL_TREE, $1, NULL_TREE); TREE_STATIC ($$) = 1; } ! | SCSPEC ! { $$ = tree_cons (NULL_TREE, $1, NULL_TREE); } ! | declmods_no_prefix_attr TYPE_QUAL { $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = 1; } ! | declmods_no_prefix_attr SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); --- 778,1165 ---- for the sake of parm declarations nested in function declarators. */ setspecs: /* empty */ { pending_xref_error (); ! PUSH_DECLSPEC_STACK; split_specs_attrs ($0, ! ¤t_declspecs, &prefix_attributes); ! all_prefix_attributes = prefix_attributes; } ; ! /* Possibly attributes after a comma, which should reset all_prefix_attributes ! to prefix_attributes with these ones chained on the front. */ ! maybe_resetattrs: ! maybe_attribute ! { all_prefix_attributes = chainon ($1, prefix_attributes); } ; decl: ! declspecs_ts setspecs initdecls ';' ! { POP_DECLSPEC_STACK; } ! | declspecs_nots setspecs notype_initdecls ';' ! { POP_DECLSPEC_STACK; } ! | declspecs_ts setspecs nested_function ! { POP_DECLSPEC_STACK; } ! | declspecs_nots setspecs notype_nested_function ! { POP_DECLSPEC_STACK; } ! | declspecs ';' { shadow_tag ($1); } | extension decl { RESTORE_WARN_FLAGS ($1); } ; + /* A list of declaration specifiers. These are: + + - Storage class specifiers (SCSPEC), which for GCC currently include + function specifiers ("inline"). + + - Type specifiers (typespec_*). + + - Type qualifiers (TYPE_QUAL). + + - 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 + places in the grammar disallow storage class specifiers (_sc or _nosc). + + (b) Whether a type specifier has been seen; after a type specifier, + a typedef name is an identifier to redeclare (_ts or _nots). + + (c) Whether the list starts with an attribute; in certain places, + the grammar requires specifiers that don't start with an attribute + (_sa or _nosa). + + (d) Whether the list ends with an attribute (or a specifier such that + any following attribute would have been parsed as part of that specifier); + this avoids shift-reduce conflicts in the parsing of attributes + (_ea or _noea). + + TODO: + + (i) Distinguish between function specifiers and storage class specifiers, + at least for the purpose of warnings about obsolescent usage. + + (ii) Halve the number of productions here by eliminating the _sc/_nosc + distinction and instead checking where required that storage class + specifiers aren't present. */ + /* 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)); *************** declmods_no_prefix_attr: *** 905,935 **** TREE_STATIC ($$) = TREE_STATIC ($1); } ; ! /* Used instead of declspecs where storage classes are not allowed ! (that is, for typenames and structure components). ! Don't accept a typedef-name if anything but a modifier precedes it. */ ! typed_typespecs: ! typespec reserved_typespecquals ! { $$ = tree_cons (NULL_TREE, $1, $2); } ! | nonempty_type_quals typespec reserved_typespecquals ! { $$ = chainon ($3, tree_cons (NULL_TREE, $2, $1)); } ; ! reserved_typespecquals: /* empty */ { $$ = NULL_TREE; } ! | reserved_typespecquals typespecqual_reserved ! { $$ = tree_cons (NULL_TREE, $2, $1); } ; ! /* A typespec (but not a type qualifier). Once we have seen one of these in a declaration, ! if a typedef name appears then it is being redeclared. */ ! typespec: TYPESPEC ! | structsp ! | TYPENAME { /* For a typedef name, record the meaning, not the name. In case of `foo foo, bar;'. */ $$ = lookup_name ($1); } --- 1167,1321 ---- 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. */ ! declspecs_ts: ! declspecs_nosc_ts_nosa_noea ! | declspecs_nosc_ts_nosa_ea ! | declspecs_nosc_ts_sa_noea ! | declspecs_nosc_ts_sa_ea ! | declspecs_sc_ts_nosa_noea ! | declspecs_sc_ts_nosa_ea ! | declspecs_sc_ts_sa_noea ! | declspecs_sc_ts_sa_ea ! ; ! declspecs_nots: ! declspecs_nosc_nots_nosa_noea ! | declspecs_nosc_nots_nosa_ea ! | declspecs_nosc_nots_sa_noea ! | declspecs_nosc_nots_sa_ea ! | declspecs_sc_nots_nosa_noea ! | declspecs_sc_nots_nosa_ea ! | declspecs_sc_nots_sa_noea ! | declspecs_sc_nots_sa_ea ; ! declspecs_ts_nosa: ! declspecs_nosc_ts_nosa_noea ! | declspecs_nosc_ts_nosa_ea ! | declspecs_sc_ts_nosa_noea ! | declspecs_sc_ts_nosa_ea ! ; ! ! declspecs_nots_nosa: ! declspecs_nosc_nots_nosa_noea ! | declspecs_nosc_nots_nosa_ea ! | declspecs_sc_nots_nosa_noea ! | declspecs_sc_nots_nosa_ea ! ; ! ! declspecs_nosc_ts: ! declspecs_nosc_ts_nosa_noea ! | declspecs_nosc_ts_nosa_ea ! | declspecs_nosc_ts_sa_noea ! | declspecs_nosc_ts_sa_ea ! ; ! ! declspecs_nosc_nots: ! declspecs_nosc_nots_nosa_noea ! | declspecs_nosc_nots_nosa_ea ! | declspecs_nosc_nots_sa_noea ! | declspecs_nosc_nots_sa_ea ! ; ! ! declspecs_nosc: ! declspecs_nosc_ts_nosa_noea ! | declspecs_nosc_ts_nosa_ea ! | declspecs_nosc_ts_sa_noea ! | declspecs_nosc_ts_sa_ea ! | declspecs_nosc_nots_nosa_noea ! | declspecs_nosc_nots_nosa_ea ! | declspecs_nosc_nots_sa_noea ! | declspecs_nosc_nots_sa_ea ! ; ! ! declspecs: ! 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 ! | declspecs_sc_nots_nosa_noea ! | declspecs_sc_nots_nosa_ea ! | declspecs_sc_nots_sa_noea ! | declspecs_sc_nots_sa_ea ! | declspecs_sc_ts_nosa_noea ! | declspecs_sc_ts_nosa_ea ! | declspecs_sc_ts_sa_noea ! | declspecs_sc_ts_sa_ea ! ; ! ! /* A (possibly empty) sequence of type qualifiers and attributes. */ ! maybe_type_quals_attrs: ! /* empty */ { $$ = NULL_TREE; } ! | declspecs_nosc_nots ! { $$ = $1; } ; ! /* A type specifier (but not a type qualifier). Once we have seen one of these in a declaration, ! if a typedef name appears then it is being redeclared. ! The _reserved versions start with a reserved word and may appear anywhere ! in the declaration specifiers; the _nonreserved versions may only ! appear before any other type specifiers, and after that are (if names) ! being redeclared. ! ! FIXME: should the _nonreserved version be restricted to names being ! redeclared only? The other entries there relate only the GNU extensions ! and Objective C, and are historically parsed thus, and don't make sense ! after other type specifiers, but it might be cleaner to count them as ! _reserved. ! ! _attr means: specifiers that either end with attributes, ! or are such that any following attributes would ! be parsed as part of the specifier. ! ! _nonattr: specifiers. */ ! ! typespec_nonattr: ! typespec_reserved_nonattr ! | typespec_nonreserved_nonattr ! ; ! ! typespec_attr: ! typespec_reserved_attr ! ; ! ! typespec_reserved_nonattr: ! TYPESPEC ! { OBJC_NEED_RAW_IDENTIFIER (1); } ! | structsp_nonattr ! ; ! ! typespec_reserved_attr: ! structsp_attr ! ; ! ! typespec_nonreserved_nonattr: ! TYPENAME { /* For a typedef name, record the meaning, not the name. In case of `foo foo, bar;'. */ $$ = lookup_name ($1); } *************** typespec: TYPESPEC *** 948,968 **** { $$ = groktypename ($3); } ; ! /* A typespec that is a reserved word, or a type qualifier. */ ! ! typespecqual_reserved: TYPESPEC ! | TYPE_QUAL ! | structsp ! ; initdecls: initdcl ! | initdecls ',' initdcl ; notype_initdecls: notype_initdcl ! | notype_initdecls ',' initdcl ; maybeasm: --- 1334,1349 ---- { $$ = groktypename ($3); } ; ! /* typespec_nonreserved_attr does not exist. */ initdecls: initdcl ! | initdecls ',' maybe_resetattrs initdcl ; notype_initdecls: notype_initdcl ! | notype_initdecls ',' maybe_resetattrs notype_initdcl ; maybeasm: *************** maybeasm: *** 977,983 **** initdcl: declarator maybeasm maybe_attribute '=' { $$ = start_decl ($1, current_declspecs, 1, ! $3, prefix_attributes); start_init ($$, $2, global_bindings_p ()); } init /* Note how the declaration of the variable is in effect while its init is parsed! */ --- 1358,1364 ---- 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! */ *************** initdcl: *** 985,991 **** finish_decl ($5, $6, $2); } | declarator maybeasm maybe_attribute { tree d = start_decl ($1, current_declspecs, 0, ! $3, prefix_attributes); finish_decl (d, NULL_TREE, $2); } ; --- 1366,1372 ---- 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); } ; *************** initdcl: *** 993,1008 **** notype_initdcl: notype_declarator maybeasm maybe_attribute '=' { $$ = start_decl ($1, current_declspecs, 1, ! $3, 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 (); - decl_attributes ($5, $3, prefix_attributes); finish_decl ($5, $6, $2); } | notype_declarator maybeasm maybe_attribute { tree d = start_decl ($1, current_declspecs, 0, ! $3, prefix_attributes); finish_decl (d, NULL_TREE, $2); } ; /* the * rules are dummies to accept the Apollo extended syntax --- 1374,1388 ---- 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 *************** nested_function: *** 1128,1134 **** push_function_context (); if (! start_function (current_declspecs, $1, ! prefix_attributes, NULL_TREE)) { pop_function_context (); YYERROR1; --- 1508,1514 ---- push_function_context (); if (! start_function (current_declspecs, $1, ! all_prefix_attributes)) { pop_function_context (); YYERROR1; *************** nested_function: *** 1146,1152 **** { tree decl = current_function_decl; DECL_SOURCE_FILE (decl) = $5; DECL_SOURCE_LINE (decl) = $6; ! finish_function (1); pop_function_context (); add_decl_stmt (decl); } ; --- 1526,1532 ---- { tree decl = current_function_decl; DECL_SOURCE_FILE (decl) = $5; DECL_SOURCE_LINE (decl) = $6; ! finish_function (1, 1); pop_function_context (); add_decl_stmt (decl); } ; *************** notype_nested_function: *** 1158,1164 **** push_function_context (); if (! start_function (current_declspecs, $1, ! prefix_attributes, NULL_TREE)) { pop_function_context (); YYERROR1; --- 1538,1544 ---- push_function_context (); if (! start_function (current_declspecs, $1, ! all_prefix_attributes)) { pop_function_context (); YYERROR1; *************** notype_nested_function: *** 1176,1182 **** { tree decl = current_function_decl; DECL_SOURCE_FILE (decl) = $5; DECL_SOURCE_LINE (decl) = $6; ! finish_function (1); pop_function_context (); add_decl_stmt (decl); } ; --- 1556,1562 ---- { tree decl = current_function_decl; DECL_SOURCE_FILE (decl) = $5; DECL_SOURCE_LINE (decl) = $6; ! finish_function (1, 1); pop_function_context (); add_decl_stmt (decl); } ; *************** declarator: *** 1192,1217 **** /* A declarator that is allowed only after an explicit typespec. */ after_type_declarator: ! '(' after_type_declarator ')' ! { $$ = $2; } | 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 '[' expr ']' %prec '.' ! { $$ = build_nt (ARRAY_REF, $1, $3); } ! | after_type_declarator '[' ']' %prec '.' ! { $$ = build_nt (ARRAY_REF, $1, NULL_TREE); } ! | '*' type_quals after_type_declarator %prec UNARY { $$ = make_pointer_declarator ($2, $3); } - /* ??? Yuck. setattrs is a quick hack. We can't use - prefix_attributes because $1 only applies to this - declarator. We assume setspecs has already been done. - setattrs also avoids 5 reduce/reduce conflicts (otherwise multiple - attributes could be recognized here or in `attributes'). */ - | attributes setattrs after_type_declarator - { $$ = $3; } | TYPENAME | OBJECTNAME ; --- 1572,1588 ---- /* A declarator that is allowed only after an explicit typespec. */ 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 ; *************** after_type_declarator: *** 1220,1246 **** in addition to notype_declarator. This is like after_type_declarator but does not allow a typedef name in parentheses as an identifier (because it would conflict with a function with that typedef as arg). */ - parm_declarator: ! parm_declarator '(' parmlist_or_identifiers %prec '.' { $$ = build_nt (CALL_EXPR, $1, $3, NULL_TREE); } ! /* | parm_declarator '(' error ')' %prec '.' { $$ = build_nt (CALL_EXPR, $1, NULL_TREE, NULL_TREE); poplevel (0, 0, 0); } */ ! | parm_declarator '[' expr ']' %prec '.' ! { $$ = build_nt (ARRAY_REF, $1, $3); } ! | parm_declarator '[' ']' %prec '.' ! { $$ = build_nt (ARRAY_REF, $1, NULL_TREE); } ! | '*' type_quals parm_declarator %prec UNARY ! { $$ = make_pointer_declarator ($2, $3); } ! /* ??? Yuck. setattrs is a quick hack. We can't use ! prefix_attributes because $1 only applies to this ! declarator. We assume setspecs has already been done. ! setattrs also avoids 5 reduce/reduce conflicts (otherwise multiple ! attributes could be recognized here or in `attributes'). */ ! | attributes setattrs parm_declarator ! { $$ = $3; } | TYPENAME ; /* A declarator allowed whether or not there has been --- 1591,1627 ---- in addition to notype_declarator. This is like after_type_declarator but does not allow a typedef name in parentheses as an identifier (because it would conflict with a function with that typedef as arg). */ parm_declarator: ! parm_declarator_starttypename ! | parm_declarator_nostarttypename ! ; ! ! 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 *************** notype_declarator: *** 1252,1272 **** /* | notype_declarator '(' error ')' %prec '.' { $$ = build_nt (CALL_EXPR, $1, NULL_TREE, NULL_TREE); poplevel (0, 0, 0); } */ ! | '(' notype_declarator ')' ! { $$ = $2; } ! | '*' type_quals notype_declarator %prec UNARY { $$ = make_pointer_declarator ($2, $3); } ! | notype_declarator '[' expr ']' %prec '.' ! { $$ = build_nt (ARRAY_REF, $1, $3); } ! | notype_declarator '[' ']' %prec '.' ! { $$ = build_nt (ARRAY_REF, $1, NULL_TREE); } ! /* ??? Yuck. setattrs is a quick hack. We can't use ! prefix_attributes because $1 only applies to this ! declarator. We assume setspecs has already been done. ! setattrs also avoids 5 reduce/reduce conflicts (otherwise multiple ! attributes could be recognized here or in `attributes'). */ ! | attributes setattrs notype_declarator ! { $$ = $3; } | IDENTIFIER ; --- 1633,1644 ---- /* | 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 ; *************** enum_head: *** 1291,1297 **** { $$ = $2; } ; ! structsp: struct_head identifier '{' { $$ = start_struct (RECORD_TYPE, $2); /* Start scope of tag before parsing components. */ --- 1663,1675 ---- { $$ = $2; } ; ! /* structsp_attr: struct/union/enum specifiers that either ! end with attributes, or are such that any following attributes would ! be parsed as part of the struct/union/enum specifier. ! ! structsp_nonattr: other struct/union/enum specifiers. */ ! ! structsp_attr: struct_head identifier '{' { $$ = start_struct (RECORD_TYPE, $2); /* Start scope of tag before parsing components. */ *************** structsp: *** 1302,1309 **** { $$ = finish_struct (start_struct (RECORD_TYPE, NULL_TREE), $3, chainon ($1, $5)); } - | struct_head identifier - { $$ = xref_tag (RECORD_TYPE, $2); } | union_head identifier '{' { $$ = start_struct (UNION_TYPE, $2); } component_decl_list '}' maybe_attribute --- 1680,1685 ---- *************** structsp: *** 1312,1319 **** { $$ = finish_struct (start_struct (UNION_TYPE, NULL_TREE), $3, chainon ($1, $5)); } - | union_head identifier - { $$ = xref_tag (UNION_TYPE, $2); } | enum_head identifier '{' { $$ = start_enum ($2); } enumlist maybecomma_warn '}' maybe_attribute --- 1688,1693 ---- *************** structsp: *** 1324,1329 **** --- 1698,1710 ---- 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 *************** component_decl_list2: /* empty */ *** 1368,1396 **** $$ = get_class_ivars (interface); else { ! error ("Cannot find interface declaration for `%s'", IDENTIFIER_POINTER ($3)); $$ = NULL_TREE; } } ; - /* 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. */ - component_decl: ! typed_typespecs setspecs components { $$ = $3; ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); } ! | typed_typespecs setspecs save_filename save_lineno maybe_attribute { /* Support for unnamed structs or unions as members of structs or unions (which is [a] useful and [b] supports --- 1749,1766 ---- $$ = get_class_ivars (interface); else { ! error ("cannot find interface declaration for `%s'", IDENTIFIER_POINTER ($3)); $$ = NULL_TREE; } } ; component_decl: ! declspecs_nosc_ts setspecs components { $$ = $3; ! POP_DECLSPEC_STACK; } ! | declspecs_nosc_ts setspecs save_filename save_lineno { /* Support for unnamed structs or unions as members of structs or unions (which is [a] useful and [b] supports *************** component_decl: *** 1399,1414 **** pedwarn ("ISO C doesn't support unnamed structs/unions"); $$ = grokfield($3, $4, NULL, current_declspecs, NULL_TREE); ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); ! } ! | nonempty_type_quals setspecs components { $$ = $3; ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); } ! | nonempty_type_quals { if (pedantic) pedwarn ("ISO C forbids member declarations with no members"); shadow_tag($1); --- 1769,1779 ---- pedwarn ("ISO C doesn't support unnamed structs/unions"); $$ = grokfield($3, $4, NULL, current_declspecs, NULL_TREE); ! POP_DECLSPEC_STACK; } ! | declspecs_nosc_nots setspecs components_notype { $$ = $3; ! POP_DECLSPEC_STACK; } ! | declspecs_nosc_nots { if (pedantic) pedwarn ("ISO C forbids member declarations with no members"); shadow_tag($1); *************** component_decl: *** 1422,1442 **** components: component_declarator ! | components ',' component_declarator ! { $$ = chainon ($1, $3); } ; component_declarator: save_filename save_lineno declarator maybe_attribute { $$ = grokfield ($1, $2, $3, current_declspecs, NULL_TREE); ! decl_attributes ($$, $4, prefix_attributes); } | save_filename save_lineno declarator ':' expr_no_commas maybe_attribute { $$ = grokfield ($1, $2, $3, current_declspecs, $5); ! decl_attributes ($$, $6, prefix_attributes); } | save_filename save_lineno ':' expr_no_commas maybe_attribute { $$ = grokfield ($1, $2, NULL_TREE, current_declspecs, $4); ! decl_attributes ($$, $5, prefix_attributes); } ; /* We chain the enumerators in reverse order. --- 1787,1826 ---- components: component_declarator ! | components ',' maybe_resetattrs component_declarator ! { $$ = chainon ($1, $4); } ! ; ! ! components_notype: ! component_notype_declarator ! | components_notype ',' maybe_resetattrs component_notype_declarator ! { $$ = chainon ($1, $4); } ; component_declarator: save_filename save_lineno declarator maybe_attribute { $$ = grokfield ($1, $2, $3, current_declspecs, NULL_TREE); ! decl_attributes (&$$, chainon ($4, all_prefix_attributes), 0); } | save_filename save_lineno declarator ':' expr_no_commas maybe_attribute { $$ = grokfield ($1, $2, $3, current_declspecs, $5); ! decl_attributes (&$$, chainon ($6, all_prefix_attributes), 0); } | save_filename save_lineno ':' expr_no_commas maybe_attribute { $$ = grokfield ($1, $2, NULL_TREE, current_declspecs, $4); ! decl_attributes (&$$, chainon ($5, all_prefix_attributes), 0); } ! ; ! ! component_notype_declarator: ! save_filename save_lineno notype_declarator maybe_attribute ! { $$ = grokfield ($1, $2, $3, current_declspecs, NULL_TREE); ! decl_attributes (&$$, chainon ($4, all_prefix_attributes), 0); } ! | save_filename save_lineno ! notype_declarator ':' expr_no_commas maybe_attribute ! { $$ = grokfield ($1, $2, $3, current_declspecs, $5); ! decl_attributes (&$$, chainon ($6, all_prefix_attributes), 0); } ! | save_filename save_lineno ':' expr_no_commas maybe_attribute ! { $$ = grokfield ($1, $2, NULL_TREE, current_declspecs, $4); ! decl_attributes (&$$, chainon ($5, all_prefix_attributes), 0); } ; /* We chain the enumerators in reverse order. *************** enumerator: *** 1464,1475 **** ; typename: ! typed_typespecs ! { pending_xref_error (); } absdcl ! { $$ = build_tree_list ($1, $3); } ! | nonempty_type_quals absdcl ! { $$ = build_tree_list ($1, $2); } ; absdcl: /* an absolute declarator */ --- 1848,1858 ---- ; typename: ! declspecs_nosc ! { pending_xref_error (); ! $$ = $1; } absdcl ! { $$ = build_tree_list ($2, $3); } ; absdcl: /* an absolute declarator */ *************** absdcl: /* an absolute declarator */ *** 1478,1521 **** | absdcl1 ; ! nonempty_type_quals: ! TYPE_QUAL ! { $$ = tree_cons (NULL_TREE, $1, NULL_TREE); } ! | nonempty_type_quals TYPE_QUAL ! { $$ = tree_cons (NULL_TREE, $2, $1); } ; ! type_quals: ! /* empty */ ! { $$ = NULL_TREE; } ! | type_quals TYPE_QUAL ! { $$ = tree_cons (NULL_TREE, $2, $1); } ; ! absdcl1: /* a nonempty absolute declarator */ ! '(' absdcl1 ')' ! { $$ = $2; } ! /* `(typedef)1' is `int'. */ ! | '*' type_quals absdcl1 %prec UNARY { $$ = make_pointer_declarator ($2, $3); } ! | '*' type_quals %prec UNARY { $$ = make_pointer_declarator ($2, NULL_TREE); } ! | absdcl1 '(' parmlist %prec '.' { $$ = build_nt (CALL_EXPR, $1, $3, NULL_TREE); } ! | absdcl1 '[' expr ']' %prec '.' ! { $$ = build_nt (ARRAY_REF, $1, $3); } ! | absdcl1 '[' ']' %prec '.' ! { $$ = build_nt (ARRAY_REF, $1, NULL_TREE); } ! | '(' parmlist %prec '.' { $$ = build_nt (CALL_EXPR, NULL_TREE, $2, NULL_TREE); } ! | '[' expr ']' %prec '.' ! { $$ = build_nt (ARRAY_REF, NULL_TREE, $2); } ! | '[' ']' %prec '.' ! { $$ = build_nt (ARRAY_REF, NULL_TREE, NULL_TREE); } ! /* ??? It appears we have to support attributes here, however ! using prefix_attributes is wrong. */ ! | attributes setattrs absdcl1 ! { $$ = $3; } ; /* A nonempty series of declarations and statements (possibly followed by --- 1861,1939 ---- | 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 */ ! absdcl1_ea ! | absdcl1_noea ; ! absdcl1_noea: ! direct_absdcl1 ! | '*' maybe_type_quals_attrs absdcl1_noea { $$ = make_pointer_declarator ($2, $3); } ! ; ! ! 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: ! '[' expr ']' ! { $$ = build_array_declarator ($2, NULL_TREE, 0, 0); } ! | '[' declspecs_nosc expr ']' ! { $$ = build_array_declarator ($3, $2, 0, 0); } ! | '[' ']' ! { $$ = build_array_declarator (NULL_TREE, NULL_TREE, 0, 0); } ! | '[' declspecs_nosc ']' ! { $$ = build_array_declarator (NULL_TREE, $2, 0, 0); } ! | '[' '*' ']' ! { $$ = build_array_declarator (NULL_TREE, NULL_TREE, 0, 1); } ! | '[' declspecs_nosc '*' ']' ! { $$ = build_array_declarator (NULL_TREE, $2, 0, 1); } ! | '[' SCSPEC expr ']' ! { if (C_RID_CODE ($2) != RID_STATIC) ! error ("storage class specifier in array declarator"); ! $$ = build_array_declarator ($3, NULL_TREE, 1, 0); } ! | '[' SCSPEC declspecs_nosc expr ']' ! { if (C_RID_CODE ($2) != RID_STATIC) ! error ("storage class specifier in array declarator"); ! $$ = build_array_declarator ($4, $3, 1, 0); } ! | '[' declspecs_nosc SCSPEC expr ']' ! { if (C_RID_CODE ($3) != RID_STATIC) ! error ("storage class specifier in array declarator"); ! $$ = build_array_declarator ($4, $2, 1, 0); } ; /* A nonempty series of declarations and statements (possibly followed by *************** pushlevel: /* empty */ *** 1585,1590 **** --- 2003,2009 ---- poplevel: /* empty */ { $$ = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0); } + ; /* Start and end blocks created for the new scopes of C99. */ c99_block_start: /* empty */ *************** compstmt_or_error: *** 1653,1659 **** ; compstmt_start: '{' { compstmt_count++; ! $$ = c_begin_compound_stmt (); } compstmt_nostart: '}' { $$ = convert (void_type_node, integer_zero_node); } --- 2072,2079 ---- ; compstmt_start: '{' { compstmt_count++; ! $$ = c_begin_compound_stmt (); } ! ; compstmt_nostart: '}' { $$ = convert (void_type_node, integer_zero_node); } *************** compstmt_primary_start: *** 1685,1693 **** --- 2105,2115 ---- compstmt_count++; $$ = add_stmt (build_stmt (COMPOUND_STMT, last_tree)); } + ; compstmt: compstmt_start compstmt_nostart { RECHAIN_STMTS ($1, COMPOUND_BODY ($1)); + last_expr_type = NULL_TREE; $$ = $1; } ; *************** lineno_stmt: *** 1775,1781 **** /* ??? 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 ocurr when doing inlining at the tree level. */ } } --- 2197,2203 ---- /* ??? 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. */ } } *************** stmt: *** 1889,1914 **** $$ = c_expand_return ($2); } | ASM_KEYWORD maybe_type_qual '(' expr ')' ';' { stmt_count++; ! STRIP_NOPS ($4); ! if ((TREE_CODE ($4) == ADDR_EXPR ! && TREE_CODE (TREE_OPERAND ($4, 0)) == STRING_CST) ! || TREE_CODE ($4) == STRING_CST) ! { ! if (TREE_CODE ($4) == ADDR_EXPR) ! $4 = TREE_OPERAND ($4, 0); ! if (TREE_CHAIN ($4)) ! $4 = combine_strings ($4); ! $$ = add_stmt (build_stmt (ASM_STMT, NULL_TREE, $4, ! NULL_TREE, NULL_TREE, ! NULL_TREE)); ! ASM_INPUT_P ($$) = 1; ! } ! else ! { ! error ("argument of `asm' is not a constant string"); ! $$ = NULL_TREE; ! } ! } /* This is the case with just output operands. */ | ASM_KEYWORD maybe_type_qual '(' expr ':' asm_operands ')' ';' { stmt_count++; --- 2311,2317 ---- $$ = 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++; *************** label: CASE expr_no_commas ':' *** 1963,1969 **** stmt_count++; if (label) { ! decl_attributes (label, $5, NULL_TREE); $$ = add_stmt (build_stmt (LABEL_STMT, label)); } else --- 2366,2372 ---- stmt_count++; if (label) { ! decl_attributes (&label, $5, 0); $$ = add_stmt (build_stmt (LABEL_STMT, label)); } else *************** nonnull_asm_operands: *** 2002,2008 **** asm_operand: STRING '(' expr ')' ! { $$ = build_tree_list ($1, $3); } ; asm_clobbers: --- 2405,2413 ---- asm_operand: STRING '(' expr ')' ! { $$ = build_tree_list (build_tree_list (NULL_TREE, $1), $3); } ! | '[' identifier ']' STRING '(' expr ')' ! { $$ = build_tree_list (build_tree_list ($2, $4), $6); } ; asm_clobbers: *************** asm_clobbers: *** 2013,2025 **** ; /* This is what appears inside the parens in a function declarator. ! Its value is a list of ..._TYPE nodes. */ parmlist: { pushlevel (0); clear_parm_order (); declare_parm_level (0); } parmlist_1 ! { $$ = $2; parmlist_tags_warning (); poplevel (0, 0, 0); } ; --- 2418,2434 ---- ; /* This is what appears inside the parens in a function declarator. ! Its value is a list of ..._TYPE nodes. Attributes must appear here ! to avoid a conflict with their appearance after an open parenthesis ! in an abstract declarator, as in ! "void bar (int (__attribute__((__mode__(SI))) int foo));". */ parmlist: + maybe_attribute { pushlevel (0); clear_parm_order (); declare_parm_level (0); } parmlist_1 ! { $$ = $3; parmlist_tags_warning (); poplevel (0, 0, 0); } ; *************** parmlist_1: *** 2034,2041 **** for (parm = getdecls (); parm; parm = TREE_CHAIN (parm)) TREE_ASM_WRITTEN (parm) = 1; clear_parm_order (); } parmlist_1 ! { $$ = $4; } | error ')' { $$ = tree_cons (NULL_TREE, NULL_TREE, NULL_TREE); } ; --- 2443,2453 ---- for (parm = getdecls (); parm; parm = TREE_CHAIN (parm)) TREE_ASM_WRITTEN (parm) = 1; clear_parm_order (); } + maybe_attribute + { /* Dummy action so attributes are in known place + on parser stack. */ } parmlist_1 ! { $$ = $6; } | error ')' { $$ = tree_cons (NULL_TREE, NULL_TREE, NULL_TREE); } ; *************** parmlist_2: /* empty */ *** 2061,2067 **** ; parms: ! parm { push_parm_decl ($1); } | parms ',' parm { push_parm_decl ($3); } --- 2473,2479 ---- ; parms: ! firstparm { push_parm_decl ($1); } | parms ',' parm { push_parm_decl ($3); } *************** parms: *** 2070,2127 **** /* A single parameter declaration or parameter type name, as found in a parmlist. */ parm: ! typed_declspecs setspecs parm_declarator maybe_attribute { $$ = build_tree_list (build_tree_list (current_declspecs, $3), ! build_tree_list (prefix_attributes, ! $4)); ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); } ! | typed_declspecs setspecs notype_declarator maybe_attribute { $$ = build_tree_list (build_tree_list (current_declspecs, $3), ! build_tree_list (prefix_attributes, ! $4)); ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); } ! | typed_declspecs setspecs absdcl maybe_attribute { $$ = build_tree_list (build_tree_list (current_declspecs, $3), ! build_tree_list (prefix_attributes, ! $4)); ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); } ! | declmods setspecs notype_declarator maybe_attribute { $$ = build_tree_list (build_tree_list (current_declspecs, $3), ! build_tree_list (prefix_attributes, ! $4)); ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); } ! ! | declmods setspecs absdcl maybe_attribute { $$ = build_tree_list (build_tree_list (current_declspecs, $3), ! build_tree_list (prefix_attributes, ! $4)); ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); } ; /* This is used in a function definition where either a parmlist or an identifier list is ok. Its value is a list of ..._TYPE nodes or a list of identifiers. */ parmlist_or_identifiers: { pushlevel (0); clear_parm_order (); declare_parm_level (1); } parmlist_or_identifiers_1 ! { $$ = $2; parmlist_tags_warning (); poplevel (0, 0, 0); } ; --- 2482,2554 ---- /* A single parameter declaration or parameter type name, 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 ! { $$ = $3; ! POP_DECLSPEC_STACK; } ! ; ! ! /* The first parm, which must suck attributes from off the top of the parser ! 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 ! { $$ = $3; ! POP_DECLSPEC_STACK; } ! ; ! ! setspecs_fp: ! setspecs ! { prefix_attributes = chainon (prefix_attributes, $-2); ! all_prefix_attributes = prefix_attributes; } ; /* This is used in a function definition where either a parmlist or an identifier list is ok. Its value is a list of ..._TYPE nodes or a list of identifiers. */ parmlist_or_identifiers: + maybe_attribute { pushlevel (0); clear_parm_order (); declare_parm_level (1); } parmlist_or_identifiers_1 ! { $$ = $3; parmlist_tags_warning (); poplevel (0, 0, 0); } ; *************** parmlist_or_identifiers_1: *** 2133,2139 **** 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); } ; /* A nonempty list of identifiers. */ --- 2560,2574 ---- 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; ! } ; /* A nonempty list of identifiers. */ *************** extension: *** 2156,2162 **** EXTENSION { $$ = SAVE_WARN_FLAGS(); pedantic = 0; ! warn_pointer_arith = 0; } ; /* Objective-C productions. */ --- 2591,2598 ---- EXTENSION { $$ = SAVE_WARN_FLAGS(); pedantic = 0; ! warn_pointer_arith = 0; ! warn_traditional = 0; } ; /* Objective-C productions. */ *************** classdef: *** 2326,2341 **** protocoldef: PROTOCOL identifier protocolrefs { ! remember_protocol_qualifiers (); objc_interface_context = start_protocol(PROTOCOL_INTERFACE_TYPE, $2, $3); } methodprotolist END { ! forget_protocol_qualifiers(); finish_protocol(objc_interface_context); objc_interface_context = NULL_TREE; } ; protocolrefs: --- 2762,2784 ---- 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); + } ; protocolrefs: *************** ivar_decls: *** 2391,2406 **** But I am being cautious and not trying it. */ ivar_decl: ! typed_typespecs setspecs ivars { $$ = $3; ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); } ! | nonempty_type_quals setspecs ivars { $$ = $3; ! current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); } | error { $$ = NULL_TREE; } ; --- 2834,2845 ---- 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: *** 2409,2415 **** /* empty */ { $$ = NULL_TREE; } | ivar_declarator ! | ivars ',' ivar_declarator ; ivar_declarator: --- 2848,2854 ---- /* empty */ { $$ = NULL_TREE; } | ivar_declarator ! | ivars ',' maybe_resetattrs ivar_declarator ; ivar_declarator: *************** ivar_declarator: *** 2435,2480 **** } ; ! methoddef: '+' ! { ! remember_protocol_qualifiers (); ! if (objc_implementation_context) ! objc_inherit_code = CLASS_METHOD_DECL; ! else ! fatal_error ("method definition not in class context"); ! } ! methoddecl ! { ! forget_protocol_qualifiers (); ! add_class_method (objc_implementation_context, $3); ! start_method_def ($3); ! objc_method_context = $3; ! } ! optarglist ! { ! continue_method_def (); ! } ! compstmt_or_error ! { ! finish_method_def (); ! objc_method_context = NULL_TREE; ! } ! | '-' { ! remember_protocol_qualifiers (); ! if (objc_implementation_context) ! objc_inherit_code = INSTANCE_METHOD_DECL; ! else fatal_error ("method definition not in class context"); } methoddecl { ! forget_protocol_qualifiers (); ! add_instance_method (objc_implementation_context, $3); start_method_def ($3); - objc_method_context = $3; } optarglist { --- 2874,2901 ---- } ; ! 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; ! if (objc_inherit_code == CLASS_METHOD_DECL) ! add_class_method (objc_implementation_context, $3); ! else ! add_instance_method (objc_implementation_context, $3); start_method_def ($3); } optarglist { *************** methoddef: *** 2483,2489 **** compstmt_or_error { finish_method_def (); - objc_method_context = NULL_TREE; } ; --- 2904,2909 ---- *************** semi_or_error: *** 2509,2539 **** ; methodproto: ! '+' ! { ! /* Remember protocol qualifiers in prototypes. */ ! remember_protocol_qualifiers (); ! objc_inherit_code = CLASS_METHOD_DECL; ! } ! methoddecl ! { ! /* Forget protocol qualifiers here. */ ! forget_protocol_qualifiers (); ! add_class_method (objc_interface_context, $3); ! } ! semi_or_error ! ! | '-' { /* Remember protocol qualifiers in prototypes. */ ! remember_protocol_qualifiers (); ! objc_inherit_code = INSTANCE_METHOD_DECL; } methoddecl { /* Forget protocol qualifiers here. */ ! forget_protocol_qualifiers (); ! add_instance_method (objc_interface_context, $3); } semi_or_error ; --- 2929,2947 ---- ; methodproto: ! methodtype { /* Remember protocol qualifiers in prototypes. */ ! objc_pq_context = 1; } methoddecl { /* Forget protocol qualifiers here. */ ! objc_pq_context = 0; ! if (objc_inherit_code == CLASS_METHOD_DECL) ! add_class_method (objc_interface_context, $3); ! else ! add_instance_method (objc_interface_context, $3); } semi_or_error ; *************** mydecls: *** 2584,2596 **** ; mydecl: ! typed_declspecs setspecs myparms ';' ! { current_declspecs = TREE_VALUE (declspec_stack); ! prefix_attributes = TREE_PURPOSE (declspec_stack); ! declspec_stack = TREE_CHAIN (declspec_stack); } ! | typed_declspecs ';' { shadow_tag ($1); } ! | declmods ';' { pedwarn ("empty declaration"); } ; --- 2992,3002 ---- ; mydecl: ! declspecs_ts setspecs myparms ';' ! { POP_DECLSPEC_STACK; } ! | declspecs_ts ';' { shadow_tag ($1); } ! | declspecs_nots ';' { pedwarn ("empty declaration"); } ; *************** myparm: *** 2608,2625 **** parm_declarator maybe_attribute { $$ = build_tree_list (build_tree_list (current_declspecs, $1), ! build_tree_list (prefix_attributes, ! $2)); } | notype_declarator maybe_attribute { $$ = build_tree_list (build_tree_list (current_declspecs, $1), ! build_tree_list (prefix_attributes, ! $2)); } ! | absdcl maybe_attribute ! { $$ = build_tree_list (build_tree_list (current_declspecs, ! $1), ! build_tree_list (prefix_attributes, ! $2)); } ; optparmlist: --- 3014,3026 ---- 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: *************** keywordselector: *** 2659,2666 **** selector: IDENTIFIER ! | TYPENAME ! | OBJECTNAME | reservedwords ; --- 3060,3068 ---- selector: IDENTIFIER ! | TYPENAME ! | CLASSNAME ! | OBJECTNAME | reservedwords ; *************** static const struct resword reswords[] = *** 2823,2828 **** --- 3225,3232 ---- { { "_Bool", RID_BOOL, 0 }, { "_Complex", RID_COMPLEX, 0 }, + { "__FUNCTION__", RID_FUNCTION_NAME, 0 }, + { "__PRETTY_FUNCTION__", RID_PRETTY_FUNCTION_NAME, 0 }, { "__alignof", RID_ALIGNOF, 0 }, { "__alignof__", RID_ALIGNOF, 0 }, { "__asm", RID_ASM, 0 }, *************** static const struct resword reswords[] = *** 2831,2842 **** --- 3235,3249 ---- { "__attribute__", RID_ATTRIBUTE, 0 }, { "__bounded", RID_BOUNDED, 0 }, { "__bounded__", RID_BOUNDED, 0 }, + { "__builtin_choose_expr", RID_CHOOSE_EXPR, 0 }, + { "__builtin_types_compatible_p", RID_TYPES_COMPATIBLE_P, 0 }, { "__builtin_va_arg", RID_VA_ARG, 0 }, { "__complex", RID_COMPLEX, 0 }, { "__complex__", RID_COMPLEX, 0 }, { "__const", RID_CONST, 0 }, { "__const__", RID_CONST, 0 }, { "__extension__", RID_EXTENSION, 0 }, + { "__func__", RID_C99_FUNCTION_NAME, 0 }, { "__imag", RID_IMAGPART, 0 }, { "__imag__", RID_IMAGPART, 0 }, { "__inline", RID_INLINE, 0 }, *************** static const struct resword reswords[] = *** 2896,2914 **** { "void", RID_VOID, 0 }, { "volatile", RID_VOLATILE, D_TRAD }, { "while", RID_WHILE, 0 }, - { "@class", RID_AT_CLASS, D_OBJC }, - { "@compatibility_alias", RID_AT_ALIAS, D_OBJC }, - { "@defs", RID_AT_DEFS, D_OBJC }, - { "@encode", RID_AT_ENCODE, D_OBJC }, - { "@end", RID_AT_END, D_OBJC }, - { "@implementation", RID_AT_IMPLEMENTATION, D_OBJC }, - { "@interface", RID_AT_INTERFACE, D_OBJC }, - { "@private", RID_AT_PRIVATE, D_OBJC }, - { "@protected", RID_AT_PROTECTED, D_OBJC }, - { "@protocol", RID_AT_PROTOCOL, D_OBJC }, - { "@public", RID_AT_PUBLIC, D_OBJC }, - { "@selector", RID_AT_SELECTOR, D_OBJC }, { "id", RID_ID, D_OBJC }, { "bycopy", RID_BYCOPY, D_OBJC }, { "byref", RID_BYREF, D_OBJC }, { "in", RID_IN, D_OBJC }, --- 3303,3327 ---- { "void", RID_VOID, 0 }, { "volatile", RID_VOLATILE, D_TRAD }, { "while", RID_WHILE, 0 }, { "id", RID_ID, D_OBJC }, + + /* These objc keywords are recognized only immediately after + an '@'. */ + { "class", RID_AT_CLASS, D_OBJC }, + { "compatibility_alias", RID_AT_ALIAS, D_OBJC }, + { "defs", RID_AT_DEFS, D_OBJC }, + { "encode", RID_AT_ENCODE, D_OBJC }, + { "end", RID_AT_END, D_OBJC }, + { "implementation", RID_AT_IMPLEMENTATION, D_OBJC }, + { "interface", RID_AT_INTERFACE, D_OBJC }, + { "private", RID_AT_PRIVATE, D_OBJC }, + { "protected", RID_AT_PROTECTED, D_OBJC }, + { "protocol", RID_AT_PROTOCOL, D_OBJC }, + { "public", RID_AT_PUBLIC, D_OBJC }, + { "selector", RID_AT_SELECTOR, D_OBJC }, + + /* These are recognized only in protocol-qualifier context + (see above) */ { "bycopy", RID_BYCOPY, D_OBJC }, { "byref", RID_BYREF, D_OBJC }, { "in", RID_IN, D_OBJC }, *************** static const short rid_to_yy[RID_MAX] = *** 2994,2999 **** --- 3407,3419 ---- /* RID_PTREXTENT */ PTR_EXTENT, /* RID_PTRVALUE */ PTR_VALUE, + /* RID_CHOOSE_EXPR */ CHOOSE_EXPR, + /* RID_TYPES_COMPATIBLE_P */ TYPES_COMPATIBLE_P, + + /* RID_FUNCTION_NAME */ STRING_FUNC_NAME, + /* RID_PRETTY_FUNCTION_NAME */ STRING_FUNC_NAME, + /* RID_C99_FUNCTION_NAME */ VAR_FUNC_NAME, + /* C++ */ /* RID_BOOL */ TYPESPEC, /* RID_WCHAR */ 0, *************** static const short rid_to_yy[RID_MAX] = *** 3035,3041 **** /* RID_BITAND */ 0, /* RID_BITOR */ 0, /* RID_COMPL */ 0, ! /* Objective C */ /* RID_ID */ OBJECTNAME, /* RID_AT_ENCODE */ ENCODE, --- 3455,3461 ---- /* RID_BITAND */ 0, /* RID_BITOR */ 0, /* RID_COMPL */ 0, ! /* Objective C */ /* RID_ID */ OBJECTNAME, /* RID_AT_ENCODE */ ENCODE, *************** static const short rid_to_yy[RID_MAX] = *** 3052,3071 **** /* RID_AT_IMPLEMENTATION */ IMPLEMENTATION }; - /* Lookup table for ObjC keywords beginning with '@'. Crude but - hopefully effective. */ - #define N_at_reswords ((int) RID_AT_IMPLEMENTATION - (int)RID_AT_ENCODE + 1) - static tree objc_rid_sans_at[N_at_reswords]; - static void init_reswords () { unsigned int i; tree id; ! int mask = ((doing_objc_thang ? 0 : D_OBJC) ! | (flag_isoc99 ? 0 : D_C89) | (flag_traditional ? D_TRAD : 0) ! | (flag_no_asm ? (flag_isoc99 ? D_EXT : D_EXT|D_EXT89) : 0)); /* It is not necessary to register ridpointers as a GC root, because all the trees it points to are permanently interned in the --- 3472,3488 ---- /* RID_AT_IMPLEMENTATION */ IMPLEMENTATION }; static void init_reswords () { unsigned int i; tree id; ! int mask = (flag_isoc99 ? 0 : D_C89) | (flag_traditional ? D_TRAD : 0) ! | (flag_no_asm ? (flag_isoc99 ? D_EXT : D_EXT|D_EXT89) : 0); ! ! if (c_language != clk_objective_c) ! mask |= D_OBJC; /* It is not necessary to register ridpointers as a GC root, because all the trees it points to are permanently interned in the *************** init_reswords () *** 3082,3120 **** C_RID_CODE (id) = reswords[i].rid; C_IS_RESERVED_WORD (id) = 1; ridpointers [(int) reswords[i].rid] = id; - - /* Enter ObjC @-prefixed keywords into the "sans" table - _without_ their leading at-sign. Again, all these - identifiers are reachable by the get_identifer table, so it's - not necessary to make objc_rid_sans_at a GC root. */ - if (reswords[i].word[0] == '@') - objc_rid_sans_at[(int) reswords[i].rid - (int) RID_AT_ENCODE] - = get_identifier (reswords[i].word + 1); } - save_and_forget_protocol_qualifiers (); - } - - const char * - init_parse (filename) - const char *filename; - { - add_c_tree_codes (); - - /* Make identifier nodes long enough for the language-specific slots. */ - set_identifier_size (sizeof (struct lang_identifier)); - - init_reswords (); - init_pragma (); - - return init_c_lex (filename); - } - - void - finish_parse () - { - cpp_finish (parse_in); - /* Call to cpp_destroy () omitted for performance reasons. */ - errorcount += cpp_errors (parse_in); } #define NAME(type) cpp_type2name (type) --- 3499,3505 ---- *************** yyerror (msgid) *** 3130,3136 **** else if (last_token == CPP_CHAR || last_token == CPP_WCHAR) { unsigned int val = TREE_INT_CST_LOW (yylval.ttype); ! const char *ell = (last_token == CPP_CHAR) ? "" : "L"; if (val <= UCHAR_MAX && ISGRAPH (val)) error ("%s before %s'%c'", string, ell, val); else --- 3515,3521 ---- else if (last_token == CPP_CHAR || last_token == CPP_WCHAR) { unsigned int val = TREE_INT_CST_LOW (yylval.ttype); ! const char *const ell = (last_token == CPP_CHAR) ? "" : "L"; if (val <= UCHAR_MAX && ISGRAPH (val)) error ("%s before %s'%c'", string, ell, val); else *************** yyerror (msgid) *** 3139,3147 **** else if (last_token == CPP_STRING || last_token == CPP_WSTRING) error ("%s before string constant", string); ! else if (last_token == CPP_NUMBER ! || last_token == CPP_INT ! || last_token == CPP_FLOAT) error ("%s before numeric constant", string); else if (last_token == CPP_NAME) error ("%s before \"%s\"", string, IDENTIFIER_POINTER (yylval.ttype)); --- 3524,3530 ---- else if (last_token == CPP_STRING || last_token == CPP_WSTRING) error ("%s before string constant", string); ! else if (last_token == CPP_NUMBER) error ("%s before numeric constant", string); else if (last_token == CPP_NAME) error ("%s before \"%s\"", string, IDENTIFIER_POINTER (yylval.ttype)); *************** static int *** 3153,3165 **** yylexname () { tree decl; ! if (C_IS_RESERVED_WORD (yylval.ttype)) { enum rid rid_code = C_RID_CODE (yylval.ttype); ! /* Return the canonical spelling for this keyword. */ ! yylval.ttype = ridpointers[(int) rid_code]; ! return rid_to_yy[(int) rid_code]; } decl = lookup_name (yylval.ttype); --- 3536,3578 ---- yylexname () { tree decl; ! ! int objc_force_identifier = objc_need_raw_identifier; ! OBJC_NEED_RAW_IDENTIFIER (0); ! if (C_IS_RESERVED_WORD (yylval.ttype)) { 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)) ! { ! int yycode = rid_to_yy[(int) rid_code]; ! if (yycode == STRING_FUNC_NAME) ! { ! /* __FUNCTION__ and __PRETTY_FUNCTION__ get converted ! to string constants. */ ! const char *name = fname_string (rid_code); ! ! yylval.ttype = build_string (strlen (name) + 1, name); ! C_ARTIFICIAL_STRING_P (yylval.ttype) = 1; ! last_token = CPP_STRING; /* so yyerror won't choke */ ! return STRING; ! } ! ! /* Return the canonical spelling for this keyword. */ ! yylval.ttype = ridpointers[(int) rid_code]; ! return yycode; ! } } decl = lookup_name (yylval.ttype); *************** yylexname () *** 3167,3198 **** { if (TREE_CODE (decl) == TYPE_DECL) return TYPENAME; - /* A user-invisible read-only initialized variable - should be replaced by its value. - We handle only strings since that's the only case used in C. */ - else if (TREE_CODE (decl) == VAR_DECL - && DECL_IGNORED_P (decl) - && TREE_READONLY (decl) - && DECL_INITIAL (decl) != 0 - && TREE_CODE (DECL_INITIAL (decl)) == STRING_CST) - { - tree stringval = DECL_INITIAL (decl), str; - - /* Copy the string value so that we won't clobber anything - if we put something in the TREE_CHAIN of this one. */ - str = build_string (TREE_STRING_LENGTH (stringval), - TREE_STRING_POINTER (stringval)); - if (yylval.ttype != func_id_node) - C_ARTIFICIAL_STRING_P (str) = 1; - yylval.ttype = str; - return STRING; - } } ! else if (doing_objc_thang) { tree objc_interface_decl = is_class_name (yylval.ttype); ! ! if (objc_interface_decl) { yylval.ttype = objc_interface_decl; return CLASSNAME; --- 3580,3594 ---- { if (TREE_CODE (decl) == TYPE_DECL) return TYPENAME; } ! 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 ! && (global_bindings_p () ! || (!objc_force_identifier && !decl))) { yylval.ttype = objc_interface_decl; return CLASSNAME; *************** _yylex () *** 3208,3214 **** { get_next: last_token = c_lex (&yylval.ttype); - reconsider: switch (last_token) { case CPP_EQ: return '='; --- 3604,3609 ---- *************** _yylex () *** 3230,3239 **** case CPP_AND_AND: return ANDAND; case CPP_OR_OR: return OROR; case CPP_QUERY: return '?'; - case CPP_COLON: return ':'; - case CPP_COMMA: return ','; case CPP_OPEN_PAREN: return '('; - case CPP_CLOSE_PAREN: return ')'; case CPP_EQ_EQ: yylval.code = EQ_EXPR; return EQCOMPARE; case CPP_NOT_EQ: yylval.code = NE_EXPR; return EQCOMPARE; case CPP_GREATER_EQ:yylval.code = GE_EXPR; return ARITHCOMPARE; --- 3625,3631 ---- *************** _yylex () *** 3254,3260 **** case CPP_CLOSE_SQUARE: return ']'; case CPP_OPEN_BRACE: return '{'; case CPP_CLOSE_BRACE: return '}'; - case CPP_SEMICOLON: return ';'; case CPP_ELLIPSIS: return ELLIPSIS; case CPP_PLUS_PLUS: return PLUSPLUS; --- 3646,3651 ---- *************** _yylex () *** 3262,3277 **** case CPP_DEREF: return POINTSAT; case CPP_DOT: return '.'; case CPP_EOF: ! if (cpp_pop_buffer (parse_in) == 0) ! return 0; ! goto get_next; case CPP_NAME: return yylexname (); - case CPP_INT: - case CPP_FLOAT: case CPP_NUMBER: case CPP_CHAR: case CPP_WCHAR: --- 3653,3671 ---- case CPP_DEREF: return POINTSAT; case CPP_DOT: return '.'; + /* The following tokens may affect the interpretation of any + identifiers following, if doing Objective-C. */ + case CPP_COLON: OBJC_NEED_RAW_IDENTIFIER (0); return ':'; + case CPP_COMMA: OBJC_NEED_RAW_IDENTIFIER (0); return ','; + case CPP_CLOSE_PAREN: OBJC_NEED_RAW_IDENTIFIER (0); return ')'; + case CPP_SEMICOLON: OBJC_NEED_RAW_IDENTIFIER (0); return ';'; + case CPP_EOF: ! return 0; case CPP_NAME: return yylexname (); case CPP_NUMBER: case CPP_CHAR: case CPP_WCHAR: *************** _yylex () *** 3281,3305 **** case CPP_WSTRING: return STRING; ! /* This token is Objective-C specific. It gives the next ! token special significance. */ case CPP_ATSIGN: ! last_token = c_lex (&yylval.ttype); ! if (last_token == CPP_STRING) ! return OBJC_STRING; ! else if (last_token == CPP_NAME) ! { ! int i; ! for (i = 0; i < N_at_reswords; i++) ! if (objc_rid_sans_at[i] == yylval.ttype) ! { ! int rid_code = i + (int) RID_AT_ENCODE; ! yylval.ttype = ridpointers[rid_code]; ! return rid_to_yy[rid_code]; ! } ! } ! error ("syntax error at '@' token"); ! goto reconsider; /* These tokens are C++ specific (and will not be generated in C mode, but let's be cautious). */ case CPP_SCOPE: --- 3675,3701 ---- case CPP_WSTRING: return STRING; ! /* This token is Objective-C specific. It gives the next token ! special significance. */ case CPP_ATSIGN: ! { ! tree after_at; ! enum cpp_ttype after_at_type; ! ! after_at_type = c_lex (&after_at); ! ! if (after_at_type == CPP_NAME ! && C_IS_RESERVED_WORD (after_at) ! && OBJC_IS_AT_KEYWORD (C_RID_CODE (after_at))) ! { ! yylval.ttype = after_at; ! last_token = after_at_type; ! return rid_to_yy [(int) C_RID_CODE (after_at)]; ! } ! _cpp_backup_tokens (parse_in, 1); ! return '@'; ! } ! /* These tokens are C++ specific (and will not be generated in C mode, but let's be cautious). */ case CPP_SCOPE: *************** yylex() *** 3336,3348 **** in order to build the compiler. */ void ! set_yydebug (value) int value; { #if YYDEBUG != 0 yydebug = value; #else ! warning ("YYDEBUG not defined."); #endif } --- 3732,3744 ---- in order to build the compiler. */ void ! c_set_yydebug (value) int value; { #if YYDEBUG != 0 yydebug = value; #else ! warning ("YYDEBUG not defined"); #endif } *************** yyprint (file, yychar, yyl) *** 3401,3415 **** /* Return something to represent absolute declarators containing a *. TARGET is the absolute declarator that the * contains. ! TYPE_QUALS is a list of modifiers such as const or volatile ! to apply to the pointer type, represented as identifiers. ! We return an INDIRECT_REF whose "contents" are TARGET ! and whose type is the modifier list. */ tree ! make_pointer_declarator (type_quals, target) ! tree type_quals, target; { ! return build1 (INDIRECT_REF, type_quals, target); } --- 3797,3817 ---- /* Return something to represent absolute declarators containing a *. TARGET is the absolute declarator that the * contains. ! TYPE_QUALS_ATTRS is a list of modifiers such as const or volatile ! to apply to the pointer type, represented as identifiers, possible mixed ! with attributes. ! We return an INDIRECT_REF whose "contents" are TARGET (inside a TREE_LIST, ! if attributes are present) and whose type is the modifier list. */ tree ! make_pointer_declarator (type_quals_attrs, target) ! tree type_quals_attrs, target; { ! tree quals, attrs; ! tree itarget = target; ! split_specs_attrs (type_quals_attrs, &quals, &attrs); ! if (attrs != NULL_TREE) ! itarget = tree_cons (attrs, target, NULL_TREE); ! return build1 (INDIRECT_REF, quals, itarget); } diff -Nrc3pad gcc-3.0.4/gcc/objc/objc-tree.def gcc-3.1/gcc/objc/objc-tree.def *** gcc-3.0.4/gcc/objc/objc-tree.def Fri Aug 4 01:30:06 2000 --- gcc-3.1/gcc/objc/objc-tree.def Wed Oct 3 22:05:57 2001 *************** *** 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 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,8 ---- /* 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 ! Free Software Foundation, Inc. This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 25,31 **** 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. */ --- 26,32 ---- 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. */ diff -Nrc3pad gcc-3.0.4/gcc/objc/objc.gperf gcc-3.1/gcc/objc/objc.gperf *** gcc-3.0.4/gcc/objc/objc.gperf Wed Dec 16 21:21:25 1998 --- gcc-3.1/gcc/objc/objc.gperf Thu Jan 1 00:00:00 1970 *************** *** 1,64 **** - %{ - /* Command-line: gperf -p -j1 -i 1 -g -o -t -N is_reserved_word -k1,3,$ objc.gperf */ - %} - struct resword { char *name; short token; enum rid rid; }; - %% - @defs, DEFS, NORID - @encode, ENCODE, NORID - @end, END, NORID - @implementation, IMPLEMENTATION, NORID - @interface, INTERFACE, NORID - @public, PUBLIC, NORID - @selector, SELECTOR, NORID - __alignof, ALIGNOF, NORID - __alignof__, ALIGNOF, NORID - __asm, ASM, NORID - __asm__, ASM, NORID - __attribute, ATTRIBUTE, NORID - __attribute__, ATTRIBUTE, NORID - __const, TYPE_QUAL, RID_CONST - __const__, TYPE_QUAL, RID_CONST - __extension__, EXTENSION, NORID - __inline, SCSPEC, RID_INLINE - __inline__, SCSPEC, RID_INLINE - __signed, TYPESPEC, RID_SIGNED - __signed__, TYPESPEC, RID_SIGNED - __typeof, TYPEOF, NORID - __typeof__, TYPEOF, NORID - __volatile, TYPE_QUAL, RID_VOLATILE - __volatile__, TYPE_QUAL, RID_VOLATILE - asm, ASM, NORID - auto, SCSPEC, RID_AUTO - break, BREAK, NORID - case, CASE, NORID - char, TYPESPEC, RID_CHAR - const, TYPE_QUAL, RID_CONST - continue, CONTINUE, NORID - default, DEFAULT, NORID - do, DO, NORID - double, TYPESPEC, RID_DOUBLE - else, ELSE, NORID - enum, ENUM, NORID - extern, SCSPEC, RID_EXTERN - float, TYPESPEC, RID_FLOAT - for, FOR, NORID - goto, GOTO, NORID - if, IF, NORID - inline, SCSPEC, RID_INLINE - int, TYPESPEC, RID_INT - long, TYPESPEC, RID_LONG - register, SCSPEC, RID_REGISTER - return, RETURN, NORID - short, TYPESPEC, RID_SHORT - signed, TYPESPEC, RID_SIGNED - sizeof, SIZEOF, NORID - static, SCSPEC, RID_STATIC - struct, STRUCT, NORID - switch, SWITCH, NORID - typedef, SCSPEC, RID_TYPEDEF - typeof, TYPEOF, NORID - union, UNION, NORID - unsigned, TYPESPEC, RID_UNSIGNED - void, TYPESPEC, RID_VOID - volatile, TYPE_QUAL, RID_VOLATILE - while, WHILE, NORID --- 0 ---- diff -Nrc3pad gcc-3.0.4/libobjc/ChangeLog gcc-3.1/libobjc/ChangeLog *** gcc-3.0.4/libobjc/ChangeLog Wed Feb 20 18:47:04 2002 --- gcc-3.1/libobjc/ChangeLog Wed May 15 02:25:18 2002 *************** *** 1,22 **** ! 2002-02-20 Release Manager ! * GCC 3.0.4 Released. ! 2001-12-20 Release Manager ! * GCC 3.0.3 Released. ! 2001-10-23 Release Manager ! * GCC 3.0.2 Released. ! 2001-08-19 Release Manager ! * GCC 3.0.1 Released. ! 2001-08-19 Release Manager ! * GCC 3.0.1 Released. Mon Jul 16 12:15:00 2001 Nicola Pero --- 1,80 ---- ! 2002-05-14 Release Manager ! * GCC 3.1 Released. ! 2002-05-14 Release Manager ! * GCC 3.1 Released. ! 2002-05-08 Alexandre Oliva ! * configure.in (ORIGINAL_LD_FOR_MULTILIBS): Preserve LD at ! script entry, and set LD to it when configuring multilibs. ! * configure: Rebuilt. ! 2002-04-19 David O'Brien ! * encoding.c (MAX, MIN, ROUNDING): #undef before defining. ! 2002-04-09 Hans-Peter Nilsson ! PR objc/6107 ! * objc/objc-api.h (struct objc_protocol_list): Change type of ! member count from int to size_t. ! ! 2002-02-11 Franz Sirl ! ! PR libobjc/4039 ! * aclocal.m4: Replace with version copied from libstdc++-v3. ! * configure.in: Update for changes to aclocal and Makefile. ! * configure: Regenerate. ! * Makefile.in: Correct install of multilibs and shared libs, use ! INSTALL_DATA for include files. ! ! Mon Dec 17 17:02:12 2001 Nicola Pero ! ! * init.c (__objc_exec_class): Fixed bug in the loop on unclaimed ! categories - when an unclaimed category was found, the loop was ! doing two steps forward instead of one, so that in certain cases ! it was failing to properly load all the categories. (Reported ! with fix by Alexander Malmberg ). ! ! 2001-11-14 Aldy Hernandez ! ! * encoding.c: Add target_flags. ! ! 2001-11-07 Aldy Hernandez ! ! * objc/objc-api.h (_C_VECTOR): New. ! ! * encoding.c (VECTOR_TYPE): New. ! ! Mon Oct 29 21:29:21 2001 Nicola Pero ! ! * class.c: Rewritten the class table to use optimized, lock-free ! lookup. This more than doubles the speed of class method ! invocations. (class_table_setup), (class_table_insert), ! (class_table_replace), (class_table_get_safe), ! (class_table_next), (class_table_print), ! (class_table_print_histogram): New functions. ! (__objc_init_class_tables): Use class_table_setup. ! (__objc_add_class_to_hash): Use class_table_get_safe and ! class_table_insert. (objc_lookup_class), (objc_get_class): Do not ! assert the existence of the table; do not lock the runtime; use ! class_table_get_safe. (objc_next_class): Use class_table_next. ! (__objc_resolve_class_links): Use class_table_next. ! (class_pose_as): Use class_table_replace. ! ! 2001-09-10 Ovidiu Predescu ! ! * gc.c: Removed the DEBUG declaration. ! ! Wed Jul 18 12:48:56 2001 Nicola Pero ! ! * thr.c (objc_mutex_lock): Invoke __objc_thread_id directly, ! rather than through objc_thread_id, to save a function call. ! (objc_mutex_trylock, objc_mutex_unlock, objc_condition_wait): ! Ditto. Mon Jul 16 12:15:00 2001 Nicola Pero *************** Mon Jul 16 12:15:00 2001 Nicola Pero < *** 25,33 **** by using CLS_ISMETA on the class pointer instead. (object_is_meta_class): Similar fix. ! 20010617 Release Manager ! * GCC 3.0 Released. 2001-06-08 Nicola Pero --- 83,94 ---- by using CLS_ISMETA on the class pointer instead. (object_is_meta_class): Similar fix. ! 2001-06-09 Alexandre Oliva , Stephen L Moshier ! * configure.in (AC_EXEEXT): Work around in case it expands to ! nothing, as in autoconf 2.50. ! * acinclude.m4: Likewise. ! * configure: Rebuilt. 2001-06-08 Nicola Pero *************** Mon Jul 16 12:15:00 2001 Nicola Pero < *** 49,58 **** in __objc_load_methods use the method name as key, not the method IMP (reported by Richard Frith-Macdonald ). - 2001-05-22 Rainer Orth - - * sendmsg.c (__objc_forward): Delete strlen() declaration. - 2001-05-09 Joseph S. Myers * objc-features.texi: Move to ../gcc/objc.texi. --- 110,115 ---- *************** Mon Jul 16 12:15:00 2001 Nicola Pero < *** 70,75 **** --- 127,136 ---- * objc-features.texi: Use the GFDL. + Wed Mar 21 04:44:58 EST 2001 John Wehle (john@feith.com) + + * encoding.c (REAL_TYPE): Define. + 2001-03-19 David Edelsohn * encoding.c (TYPE_MODE): Define. *************** Mon Jul 16 12:15:00 2001 Nicola Pero < *** 81,86 **** --- 142,156 ---- * objc/thr.h: Declare them. * libobjc.def: Mention them. + 2001-02-28 Ovidiu Predescu + + * objc-features.texi: Document the @compatibility_alias compiler + directive (description from Nicola Pero ). + + Fri Feb 23 18:12:00 2001 Rainer Orth + + * sendmsg.c (__objc_forward): Delete strlen() declaration. + 2001-02-08 Geoffrey Keating * configure.in: Don't run AC_PROG_CC_WORKS or AC_EXEEXT, because diff -Nrc3pad gcc-3.0.4/libobjc/Makefile.in gcc-3.1/libobjc/Makefile.in *** gcc-3.0.4/libobjc/Makefile.in Wed May 9 14:20:01 2001 --- gcc-3.1/libobjc/Makefile.in Mon Feb 11 18:10:05 2002 *************** *** 23,42 **** #worthless. SHELL = /bin/sh #### Start of system configuration section. #### ! srcdir = @srcdir@ ! VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ target_alias = @target_alias@ gcc_version = @gcc_version@ gcc_version_trigger = @gcc_version_trigger@ libdir = $(exec_prefix)/lib libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version) - incinstalldir = $(libsubdir)/include # Multilib support variables. MULTISRCTOP = --- 23,49 ---- #worthless. SHELL = /bin/sh + MAKEOVERRIDES= #### Start of system configuration section. #### ! srcdir = @glibcpp_srcdir@ ! 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-lib/$(target_alias)/$(gcc_version) # Multilib support variables. MULTISRCTOP = *************** $(OBJC_THREAD_FILE)_gc.lo: $(OBJC_THREAD *** 253,263 **** doc: info dvi html libobjc.la: $(OBJS) ! $(LIBTOOL_LINK) $(CC) -o $@ $(OBJS) -rpath $(libsubdir) \ -version-info $(LIBOBJC_VERSION) libobjc_gc.la: $(OBJS_GC) ! $(LIBTOOL_LINK) $(CC) -o $@ $(OBJS_GC) -rpath $(libsubdir) \ -version-info $(LIBOBJC_GC_VERSION) # --- 260,272 ---- 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) # *************** ${srcdir}/configure: configure.in *** 305,328 **** rm -f config.cache cd ${srcdir} && autoconf ! install: install-libs copy-headers install-libs: installdirs ! $(LIBTOOL_INSTALL) $(INSTALL_DATA) libobjc.la $(libsubdir)/libobjc.la; if [ "$(OBJC_BOEHM_GC)" ]; then \ ! $(LIBTOOL_INSTALL) $(INSTALL_DATA) libobjc_gc.la \ ! $(libsubdir)/libobjc_gc.la;\ fi # Copy Objective C headers to installation include directory. ! copy-headers: ! -rm -rf $(incinstalldir)/objc ! -mkdir $(incinstalldir)/objc ! -chmod a+rx $(incinstalldir)/objc for file in $(OBJC_H); do \ realfile=$(srcdir)/objc/$${file}; \ ! cp $${realfile} $(incinstalldir)/objc; \ ! chmod a+r $(incinstalldir)/objc/$${file}; \ done check uninstall install-strip dist installcheck installdirs: --- 314,337 ---- rm -f config.cache cd ${srcdir} && autoconf ! install: install-libs install-headers install-libs: installdirs ! $(SHELL) $(toplevel_srcdir)/mkinstalldirs $(glibcpp_toolexeclibdir) ! $(LIBTOOL_INSTALL) $(INSTALL) libobjc.la $(glibcpp_toolexeclibdir); if [ "$(OBJC_BOEHM_GC)" ]; then \ ! $(LIBTOOL_INSTALL) $(INSTALL) libobjc_gc.la \ ! $(glibcpp_toolexeclibdir);\ fi + $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO="$@" + @-$(LIBTOOL) --mode=finish $(glibcpp_toolexeclibdir) # Copy Objective C headers to installation include directory. ! install-headers: ! $(SHELL) $(toplevel_srcdir)/mkinstalldirs $(libsubdir)/include/objc for file in $(OBJC_H); do \ realfile=$(srcdir)/objc/$${file}; \ ! $(INSTALL_DATA) $${realfile} $(libsubdir)/include/objc; \ done check uninstall install-strip dist installcheck installdirs: diff -Nrc3pad gcc-3.0.4/libobjc/aclocal.m4 gcc-3.1/libobjc/aclocal.m4 *** gcc-3.0.4/libobjc/aclocal.m4 Sat Aug 5 01:13:37 2000 --- gcc-3.1/libobjc/aclocal.m4 Mon Feb 11 18:10:05 2002 *************** *** 1,2 **** ! # Just a clone of ../libtool.m4. sinclude(../libtool.m4) --- 1,224 ---- ! 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_CONFIGURE ! AC_DEFUN(GLIBCPP_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) ! ! # 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=`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-lib/$(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$(MULTISUBDIR)' ! else ! glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_alias)' ! glibcpp_toolexeclibdir='$(libdir)$(MULTISUBDIR)' ! fi ! 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]) + ]) diff -Nrc3pad gcc-3.0.4/libobjc/class.c gcc-3.1/libobjc/class.c *** gcc-3.0.4/libobjc/class.c Sat Sep 4 15:09:19 1999 --- gcc-3.1/libobjc/class.c Mon Oct 29 21:23:31 2001 *************** *** 1,7 **** /* GNU Objective C Runtime class related functions ! Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. Contributed by Kresten Krab Thorup and Dennis Glatting. This file is part of GNU CC. GNU CC is free software; you can redistribute it and/or modify it under the --- 1,10 ---- /* GNU Objective C Runtime class related functions ! Copyright (C) 1993, 1995, 1996, 1997, 2001 Free Software Foundation, Inc. Contributed by Kresten Krab Thorup and Dennis Glatting. + Lock-free class table code designed and written from scratch by + Nicola Pero, 2001. + This file is part of GNU CC. GNU CC is free software; you can redistribute it and/or modify it under the *************** Foundation, 59 Temple Place - Suite 330, *** 23,66 **** however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ ! #include "runtime.h" /* the kitchen sink */ #include "sarray.h" ! /* The table of classname->class. Used for objc_lookup_class and friends */ ! static cache_ptr __objc_class_hash = 0; /* !T:MUTEX */ ! /* This is a hook which is called by objc_get_class and ! objc_lookup_class if the runtime is not able to find the class. ! This may e.g. try to load in the class using dynamic loading */ Class (*_objc_lookup_class)(const char* name) = 0; /* !T:SAFE */ ! /* True when class links has been resolved */ BOOL __objc_class_links_resolved = NO; /* !T:UNUSED */ - /* Initial number of buckets size of class hash table. */ - #define CLASS_HASH_SIZE 32 - void __objc_init_class_tables() { ! /* Allocate the class hash table */ ! ! if(__objc_class_hash) return; ! objc_mutex_lock(__objc_runtime_mutex); ! ! __objc_class_hash ! = hash_new (CLASS_HASH_SIZE, ! (hash_func_type) hash_string, ! (compare_func_type) compare_strings); objc_mutex_unlock(__objc_runtime_mutex); } ! /* This function adds a class to the class hash table, and assigns the ! class a number, unless it's already known */ void __objc_add_class_to_hash(Class class) { --- 26,436 ---- however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ ! /* ! The code in this file critically affects class method invocation ! speed. This long preamble comment explains why, and the issues ! involved. ! ! ! One of the traditional weaknesses of the GNU Objective-C runtime is ! that class method invocations are slow. The reason is that when you ! write ! ! array = [NSArray new]; ! ! this gets basically compiled into the equivalent of ! ! array = [(objc_get_class ("NSArray")) new]; ! ! objc_get_class returns the class pointer corresponding to the string ! `NSArray'; and because of the lookup, the operation is more ! complicated and slow than a simple instance method invocation. ! ! Most high performance Objective-C code (using the GNU Objc runtime) ! I had the opportunity to read (or write) work around this problem by ! caching the class pointer: ! ! Class arrayClass = [NSArray class]; ! ! ... later on ... ! ! array = [arrayClass new]; ! array = [arrayClass new]; ! array = [arrayClass new]; ! ! In this case, you always perform a class lookup (the first one), but ! then all the [arrayClass new] methods run exactly as fast as an ! instance method invocation. It helps if you have many class method ! invocations to the same class. ! ! The long-term solution to this problem would be to modify the ! compiler to output tables of class pointers corresponding to all the ! class method invocations, and to add code to the runtime to update ! these tables - that should in the end allow class method invocations ! to perform precisely as fast as instance method invocations, because ! no class lookup would be involved. I think the Apple Objective-C ! runtime uses this technique. Doing this involves synchronized ! modifications in the runtime and in the compiler. ! ! As a first medicine to the problem, I [NP] have redesigned and ! rewritten the way the runtime is performing class lookup. This ! doesn't give as much speed as the other (definitive) approach, but ! at least a class method invocation now takes approximately 4.5 times ! an instance method invocation on my machine (it would take approx 12 ! times before the rewriting), which is a lot better. ! ! One of the main reason the new class lookup is so faster is because ! I implemented it in a way that can safely run multithreaded without ! using locks - a so-called `lock-free' data structure. The atomic ! operation is pointer assignment. The reason why in this problem ! lock-free data structures work so well is that you never remove ! classes from the table - and the difficult thing with lock-free data ! structures is freeing data when is removed from the structures. */ ! ! #include "runtime.h" /* the kitchen sink */ #include "sarray.h" ! #include ! #include ! #include ! /* We use a table which maps a class name to the corresponding class ! * pointer. The first part of this file defines this table, and ! * functions to do basic operations on the table. The second part of ! * the file implements some higher level Objective-C functionality for ! * classes by using the functions provided in the first part to manage ! * the table. */ ! ! /** ! ** Class Table Internals ! **/ ! ! /* A node holding a class */ ! typedef struct class_node ! { ! struct class_node *next; /* Pointer to next entry on the list. ! NULL indicates end of list. */ ! ! const char *name; /* The class name string */ ! int length; /* The class name string length */ ! Class pointer; /* The Class pointer */ ! ! } *class_node_ptr; ! ! /* A table containing classes is a class_node_ptr (pointing to the ! first entry in the table - if it is NULL, then the table is ! empty). */ ! ! /* We have 1024 tables. Each table contains all class names which ! have the same hash (which is a number between 0 and 1023). To look ! up a class_name, we compute its hash, and get the corresponding ! table. Once we have the table, we simply compare strings directly ! till we find the one which we want (using the length first). The ! number of tables is quite big on purpose (a normal big application ! has less than 1000 classes), so that you shouldn't normally get any ! collisions, and get away with a single comparison (which we can't ! avoid since we need to know that you have got the right thing). */ ! #define CLASS_TABLE_SIZE 1024 ! #define CLASS_TABLE_MASK 1023 ! ! static class_node_ptr class_table_array[CLASS_TABLE_SIZE]; ! ! /* The table writing mutex - we lock on writing to avoid conflicts ! between different writers, but we read without locks. That is ! possible because we assume pointer assignment to be an atomic ! operation. */ ! static objc_mutex_t __class_table_lock = NULL; ! ! /* CLASS_TABLE_HASH is how we compute the hash of a class name. It is ! a macro - *not* a function - arguments *are* modified directly. ! ! INDEX should be a variable holding an int; ! HASH should be a variable holding an int; ! CLASS_NAME should be a variable holding a (char *) to the class_name. ! ! After the macro is executed, INDEX contains the length of the ! string, and HASH the computed hash of the string; CLASS_NAME is ! untouched. */ ! ! #define CLASS_TABLE_HASH(INDEX, HASH, CLASS_NAME) \ ! HASH = 0; \ ! for (INDEX = 0; CLASS_NAME[INDEX] != '\0'; INDEX++) \ ! { \ ! HASH = (HASH << 4) ^ (HASH >> 28) ^ CLASS_NAME[INDEX]; \ ! } \ ! \ ! HASH = (HASH ^ (HASH >> 10) ^ (HASH >> 20)) & CLASS_TABLE_MASK; ! ! /* Setup the table. */ ! static void ! class_table_setup () ! { ! /* Start - nothing in the table. */ ! memset (class_table_array, 0, sizeof(class_node_ptr) * CLASS_TABLE_SIZE); ! ! /* The table writing mutex. */ ! __class_table_lock = objc_mutex_allocate (); ! } ! ! ! /* Insert a class in the table (used when a new class is registered). */ ! static void ! class_table_insert (const char *class_name, Class class_pointer) ! { ! int hash, length; ! class_node_ptr new_node; ! ! /* Find out the class name's hash and length. */ ! CLASS_TABLE_HASH (length, hash, class_name); ! ! /* Prepare the new node holding the class. */ ! new_node = objc_malloc (sizeof (struct class_node)); ! new_node->name = class_name; ! new_node->length = length; ! new_node->pointer = class_pointer; ! ! /* Lock the table for modifications. */ ! objc_mutex_lock (__class_table_lock); ! ! /* Insert the new node in the table at the beginning of the table at ! class_table_array[hash]. */ ! new_node->next = class_table_array[hash]; ! class_table_array[hash] = new_node; ! ! objc_mutex_unlock (__class_table_lock); ! } ! ! /* Replace a class in the table (used only by poseAs:). */ ! static void ! class_table_replace (Class old_class_pointer, Class new_class_pointer) ! { ! int hash; ! class_node_ptr node; ! ! objc_mutex_lock (__class_table_lock); ! ! hash = 0; ! node = class_table_array[hash]; ! ! while (hash < CLASS_TABLE_SIZE) ! { ! if (node == NULL) ! { ! hash++; ! if (hash < CLASS_TABLE_SIZE) ! { ! node = class_table_array[hash]; ! } ! } ! else ! { ! Class class1 = node->pointer; ! ! if (class1 == old_class_pointer) ! { ! node->pointer = new_class_pointer; ! } ! node = node->next; ! } ! } ! ! objc_mutex_unlock (__class_table_lock); ! } ! ! ! /* Get a class from the table. This does not need mutex protection. ! Currently, this function is called each time you call a static ! method, this is why it must be very fast. */ ! static inline Class ! class_table_get_safe (const char *class_name) ! { ! class_node_ptr node; ! int length, hash; ! ! /* Compute length and hash. */ ! CLASS_TABLE_HASH (length, hash, class_name); ! ! node = class_table_array[hash]; ! ! if (node != NULL) ! { ! do ! { ! if (node->length == length) ! { ! /* Compare the class names. */ ! int i; ! ! for (i = 0; i < length; i++) ! { ! if ((node->name)[i] != class_name[i]) ! { ! break; ! } ! } ! ! if (i == length) ! { ! /* They are equal! */ ! return node->pointer; ! } ! } ! } ! while ((node = node->next) != NULL); ! } ! ! return Nil; ! } ! ! /* Enumerate over the class table. */ ! struct class_table_enumerator ! { ! int hash; ! class_node_ptr node; ! }; ! ! ! static Class ! class_table_next (struct class_table_enumerator **e) ! { ! struct class_table_enumerator *enumerator = *e; ! class_node_ptr next; ! ! if (enumerator == NULL) ! { ! *e = objc_malloc (sizeof (struct class_table_enumerator)); ! enumerator = *e; ! enumerator->hash = 0; ! enumerator->node = NULL; ! ! next = class_table_array[enumerator->hash]; ! } ! else ! { ! next = enumerator->node->next; ! } ! ! if (next != NULL) ! { ! enumerator->node = next; ! return enumerator->node->pointer; ! } ! else ! { ! enumerator->hash++; ! ! while (enumerator->hash < CLASS_TABLE_SIZE) ! { ! next = class_table_array[enumerator->hash]; ! if (next != NULL) ! { ! enumerator->node = next; ! return enumerator->node->pointer; ! } ! enumerator->hash++; ! } ! ! /* Ok - table finished - done. */ ! objc_free (enumerator); ! return Nil; ! } ! } ! ! #if 0 /* DEBUGGING FUNCTIONS */ ! /* Debugging function - print the class table. */ ! void ! class_table_print () ! { ! int i; ! ! for (i = 0; i < CLASS_TABLE_SIZE; i++) ! { ! class_node_ptr node; ! ! printf ("%d:\n", i); ! node = class_table_array[i]; ! ! while (node != NULL) ! { ! printf ("\t%s\n", node->name); ! node = node->next; ! } ! } ! } ! ! /* Debugging function - print an histogram of number of classes in ! function of hash key values. Useful to evaluate the hash function ! in real cases. */ ! void ! class_table_print_histogram () ! { ! int i, j; ! int counter = 0; ! ! for (i = 0; i < CLASS_TABLE_SIZE; i++) ! { ! class_node_ptr node; ! ! node = class_table_array[i]; ! ! while (node != NULL) ! { ! counter++; ! node = node->next; ! } ! if (((i + 1) % 50) == 0) ! { ! printf ("%4d:", i + 1); ! for (j = 0; j < counter; j++) ! { ! printf ("X"); ! } ! printf ("\n"); ! counter = 0; ! } ! } ! printf ("%4d:", i + 1); ! for (j = 0; j < counter; j++) ! { ! printf ("X"); ! } ! printf ("\n"); ! } ! #endif /* DEBUGGING FUNCTIONS */ ! ! /** ! ** Objective-C runtime functions ! **/ ! ! /* From now on, the only access to the class table data structure ! should be via the class_table_* functions. */ ! ! /* This is a hook which is called by objc_get_class and ! objc_lookup_class if the runtime is not able to find the class. ! This may e.g. try to load in the class using dynamic loading. */ Class (*_objc_lookup_class)(const char* name) = 0; /* !T:SAFE */ ! /* True when class links has been resolved. */ BOOL __objc_class_links_resolved = NO; /* !T:UNUSED */ void __objc_init_class_tables() { ! /* Allocate the class hash table. */ ! ! if(__class_table_lock) return; ! objc_mutex_lock(__objc_runtime_mutex); ! ! class_table_setup (); objc_mutex_unlock(__objc_runtime_mutex); } ! /* This function adds a class to the class hash table, and assigns the ! class a number, unless it's already known. */ void __objc_add_class_to_hash(Class class) { *************** __objc_add_class_to_hash(Class class) *** 68,81 **** objc_mutex_lock(__objc_runtime_mutex); ! /* make sure the table is there */ ! assert(__objc_class_hash); ! /* make sure it's not a meta class */ assert(CLS_ISCLASS(class)); /* Check to see if the class is already in the hash table. */ ! h_class = hash_value_for_key (__objc_class_hash, class->name); if (!h_class) { /* The class isn't in the hash table. Add the class and assign a class --- 438,451 ---- objc_mutex_lock(__objc_runtime_mutex); ! /* Make sure the table is there. */ ! assert(__class_table_lock); ! /* Make sure it's not a meta class. */ assert(CLS_ISCLASS(class)); /* Check to see if the class is already in the hash table. */ ! h_class = class_table_get_safe (class->name); if (!h_class) { /* The class isn't in the hash table. Add the class and assign a class *************** __objc_add_class_to_hash(Class class) *** 86,92 **** CLS_SETNUMBER(class->class_pointer, class_number); ++class_number; ! hash_add (&__objc_class_hash, class->name, class); } objc_mutex_unlock(__objc_runtime_mutex); --- 456,462 ---- CLS_SETNUMBER(class->class_pointer, class_number); ++class_number; ! class_table_insert (class->name, class); } objc_mutex_unlock(__objc_runtime_mutex); *************** __objc_add_class_to_hash(Class class) *** 94,112 **** /* Get the class object for the class named NAME. If NAME does not identify a known class, the hook _objc_lookup_class is called. If ! this fails, nil is returned */ Class objc_lookup_class (const char* name) { Class class; ! objc_mutex_lock(__objc_runtime_mutex); ! ! /* Make sure the class hash table exists. */ ! assert (__objc_class_hash); ! ! class = hash_value_for_key (__objc_class_hash, name); ! ! objc_mutex_unlock(__objc_runtime_mutex); if (class) return class; --- 464,475 ---- /* Get the class object for the class named NAME. If NAME does not identify a known class, the hook _objc_lookup_class is called. If ! this fails, nil is returned. */ Class objc_lookup_class (const char* name) { Class class; ! class = class_table_get_safe (name); if (class) return class; *************** Class objc_lookup_class (const char* nam *** 119,138 **** /* Get the class object for the class named NAME. If NAME does not identify a known class, the hook _objc_lookup_class is called. If ! this fails, an error message is issued and the system aborts */ Class objc_get_class (const char *name) { Class class; ! objc_mutex_lock(__objc_runtime_mutex); ! ! /* Make sure the class hash table exists. */ ! assert (__objc_class_hash); ! ! class = hash_value_for_key (__objc_class_hash, name); ! ! objc_mutex_unlock(__objc_runtime_mutex); if (class) return class; --- 482,494 ---- /* Get the class object for the class named NAME. If NAME does not identify a known class, the hook _objc_lookup_class is called. If ! this fails, an error message is issued and the system aborts. */ Class objc_get_class (const char *name) { Class class; ! class = class_table_get_safe (name); if (class) return class; *************** objc_get_class (const char *name) *** 144,150 **** return class; objc_error(nil, OBJC_ERR_BAD_CLASS, ! "objc runtime: cannot find class %s\n", name); return 0; } --- 500,506 ---- return class; objc_error(nil, OBJC_ERR_BAD_CLASS, ! "objc runtime: cannot find class %s\n", name); return 0; } *************** objc_get_meta_class(const char *name) *** 166,209 **** Class objc_next_class(void **enum_state) { ! objc_mutex_lock(__objc_runtime_mutex); ! /* make sure the table is there */ ! assert(__objc_class_hash); ! *(node_ptr*)enum_state = ! hash_next(__objc_class_hash, *(node_ptr*)enum_state); objc_mutex_unlock(__objc_runtime_mutex); ! ! if (*(node_ptr*)enum_state) ! return (*(node_ptr*)enum_state)->value; ! return (Class)0; } ! /* Resolve super/subclass links for all classes. The only thing we ! can be sure of is that the class_pointer for class objects point ! to the right meta class objects */ void __objc_resolve_class_links() { ! node_ptr node; Class object_class = objc_get_class ("Object"); assert(object_class); objc_mutex_lock(__objc_runtime_mutex); ! /* Assign subclass links */ ! for (node = hash_next (__objc_class_hash, NULL); node; ! node = hash_next (__objc_class_hash, node)) { - Class class1 = node->value; - /* Make sure we have what we think we have. */ assert (CLS_ISCLASS(class1)); assert (CLS_ISMETA(class1->class_pointer)); ! /* The class_pointer of all meta classes point to Object's meta class. */ class1->class_pointer->class_pointer = object_class->class_pointer; if (!(CLS_ISRESOLV(class1))) --- 522,563 ---- Class objc_next_class(void **enum_state) { ! Class class; ! objc_mutex_lock(__objc_runtime_mutex); ! ! /* Make sure the table is there. */ ! assert(__class_table_lock); ! class = class_table_next ((struct class_table_enumerator **)enum_state); objc_mutex_unlock(__objc_runtime_mutex); ! ! return class; } ! /* Resolve super/subclass links for all classes. The only thing we ! can be sure of is that the class_pointer for class objects point to ! the right meta class objects. */ void __objc_resolve_class_links() { ! struct class_table_enumerator *es = NULL; Class object_class = objc_get_class ("Object"); + Class class1; assert(object_class); objc_mutex_lock(__objc_runtime_mutex); ! /* Assign subclass links. */ ! while ((class1 = class_table_next (&es))) { /* Make sure we have what we think we have. */ assert (CLS_ISCLASS(class1)); assert (CLS_ISMETA(class1->class_pointer)); ! /* The class_pointer of all meta classes point to Object's meta ! class. */ class1->class_pointer->class_pointer = object_class->class_pointer; if (!(CLS_ISRESOLV(class1))) *************** void __objc_resolve_class_links() *** 221,231 **** DEBUG_PRINTF ("making class connections for: %s\n", class1->name); ! /* assign subclass links for superclass */ class1->sibling_class = a_super_class->subclass_list; a_super_class->subclass_list = class1; ! /* Assign subclass links for meta class of superclass */ if (a_super_class->class_pointer) { class1->class_pointer->sibling_class --- 575,585 ---- DEBUG_PRINTF ("making class connections for: %s\n", class1->name); ! /* Assign subclass links for superclass. */ class1->sibling_class = a_super_class->subclass_list; a_super_class->subclass_list = class1; ! /* Assign subclass links for meta class of superclass. */ if (a_super_class->class_pointer) { class1->class_pointer->sibling_class *************** void __objc_resolve_class_links() *** 234,241 **** = class1->class_pointer; } } ! else /* a root class, make its meta object */ ! /* be a subclass of Object */ { class1->class_pointer->sibling_class = object_class->subclass_list; --- 588,595 ---- = class1->class_pointer; } } ! else /* A root class, make its meta object be a subclass of ! Object. */ { class1->class_pointer->sibling_class = object_class->subclass_list; *************** void __objc_resolve_class_links() *** 244,254 **** } } ! /* Assign superclass links */ ! for (node = hash_next (__objc_class_hash, NULL); node; ! node = hash_next (__objc_class_hash, node)) { - Class class1 = node->value; Class sub_class; for (sub_class = class1->subclass_list; sub_class; sub_class = sub_class->sibling_class) --- 598,607 ---- } } ! /* Assign superclass links. */ ! es = NULL; ! while ((class1 = class_table_next (&es))) { Class sub_class; for (sub_class = class1->subclass_list; sub_class; sub_class = sub_class->sibling_class) *************** void __objc_resolve_class_links() *** 269,281 **** Class class_pose_as (Class impostor, Class super_class) { - node_ptr node; - Class class1; - if (!CLS_ISRESOLV (impostor)) __objc_resolve_class_links (); ! /* preconditions */ assert (impostor); assert (super_class); assert (impostor->super_class == super_class); --- 622,631 ---- Class class_pose_as (Class impostor, Class super_class) { if (!CLS_ISRESOLV (impostor)) __objc_resolve_class_links (); ! /* Preconditions */ assert (impostor); assert (super_class); assert (impostor->super_class == super_class); *************** class_pose_as (Class impostor, Class sup *** 286,358 **** { Class *subclass = &(super_class->subclass_list); ! /* move subclasses of super_class to impostor */ while (*subclass) { ! Class nextSub = (*subclass)->sibling_class; ! if (*subclass != impostor) ! { ! Class sub = *subclass; ! /* classes */ ! sub->sibling_class = impostor->subclass_list; ! sub->super_class = impostor; ! impostor->subclass_list = sub; ! /* It will happen that SUB is not a class object if it is ! the top of the meta class hierarchy chain. (root ! meta-class objects inherit their class object) If that is ! the case... don't mess with the meta-meta class. */ ! if (CLS_ISCLASS (sub)) ! { ! /* meta classes */ ! CLASSOF (sub)->sibling_class = ! CLASSOF (impostor)->subclass_list; ! CLASSOF (sub)->super_class = CLASSOF (impostor); ! CLASSOF (impostor)->subclass_list = CLASSOF (sub); ! } ! } ! *subclass = nextSub; } ! /* set subclasses of superclass to be impostor only */ super_class->subclass_list = impostor; CLASSOF (super_class)->subclass_list = CLASSOF (impostor); ! /* set impostor to have no sibling classes */ impostor->sibling_class = 0; CLASSOF (impostor)->sibling_class = 0; } ! /* check relationship of impostor and super_class is kept. */ assert (impostor->super_class == super_class); assert (CLASSOF (impostor)->super_class == CLASSOF (super_class)); ! /* This is how to update the lookup table. Regardless of ! what the keys of the hashtable is, change all values that are ! superclass into impostor. */ objc_mutex_lock(__objc_runtime_mutex); ! for (node = hash_next (__objc_class_hash, NULL); node; ! node = hash_next (__objc_class_hash, node)) ! { ! class1 = (Class)node->value; ! if (class1 == super_class) ! { ! node->value = impostor; /* change hash table value */ ! } ! } objc_mutex_unlock(__objc_runtime_mutex); ! /* next, we update the dispatch tables... */ __objc_update_dispatch_table_for_class (CLASSOF (impostor)); __objc_update_dispatch_table_for_class (impostor); return impostor; } - - --- 636,699 ---- { Class *subclass = &(super_class->subclass_list); ! /* Move subclasses of super_class to impostor. */ while (*subclass) { ! Class nextSub = (*subclass)->sibling_class; ! if (*subclass != impostor) ! { ! Class sub = *subclass; ! /* Classes */ ! sub->sibling_class = impostor->subclass_list; ! sub->super_class = impostor; ! impostor->subclass_list = sub; ! /* It will happen that SUB is not a class object if it is ! the top of the meta class hierarchy chain (root ! meta-class objects inherit their class object). If ! that is the case... don't mess with the meta-meta ! class. */ ! if (CLS_ISCLASS (sub)) ! { ! /* Meta classes */ ! CLASSOF (sub)->sibling_class = ! CLASSOF (impostor)->subclass_list; ! CLASSOF (sub)->super_class = CLASSOF (impostor); ! CLASSOF (impostor)->subclass_list = CLASSOF (sub); ! } ! } ! *subclass = nextSub; } ! /* Set subclasses of superclass to be impostor only. */ super_class->subclass_list = impostor; CLASSOF (super_class)->subclass_list = CLASSOF (impostor); ! /* Set impostor to have no sibling classes. */ impostor->sibling_class = 0; CLASSOF (impostor)->sibling_class = 0; } ! /* Check relationship of impostor and super_class is kept. */ assert (impostor->super_class == super_class); assert (CLASSOF (impostor)->super_class == CLASSOF (super_class)); ! /* This is how to update the lookup table. Regardless of what the ! keys of the hashtable is, change all values that are superclass ! into impostor. */ objc_mutex_lock(__objc_runtime_mutex); ! class_table_replace (super_class, impostor); objc_mutex_unlock(__objc_runtime_mutex); ! /* Next, we update the dispatch tables... */ __objc_update_dispatch_table_for_class (CLASSOF (impostor)); __objc_update_dispatch_table_for_class (impostor); return impostor; } diff -Nrc3pad gcc-3.0.4/libobjc/configure gcc-3.1/libobjc/configure *** gcc-3.0.4/libobjc/configure Sun May 20 18:57:42 2001 --- gcc-3.1/libobjc/configure Wed May 8 04:27:29 2002 *************** ac_help= *** 12,17 **** --- 12,26 ---- 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]" *************** fi *** 549,565 **** ! if test "${srcdir}" = "." ; then ! if test "${with_target_subdir}" != "." ; then ! topsrcdir=${with_multisrctop}../.. else ! topsrcdir=${with_multisrctop}.. fi else ! topsrcdir=${srcdir}/.. fi ac_aux_dir= ! for ac_dir in $topsrcdir $srcdir/$topsrcdir; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" --- 558,781 ---- ! # 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 ! ! ac_aux_dir= ! for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do ! if test -f $ac_dir/install-sh; then ! ac_aux_dir=$ac_dir ! ac_install_sh="$ac_aux_dir/install-sh -c" ! break ! elif test -f $ac_dir/install.sh; then ! 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 $srcdir/.. $srcdir/../.." 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. ! ! ! # 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:615: 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:636: 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:654: 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:686: 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:719: 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 ! ! # 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 ! # 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_aux_dir= ! for ac_dir in ${srcdir}/$toprel $srcdir/${srcdir}/$toprel; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" *************** for ac_dir in $topsrcdir $srcdir/$topsrc *** 571,625 **** fi done if test -z "$ac_aux_dir"; then ! { echo "configure: error: can not find install-sh or install.sh in $topsrcdir $srcdir/$topsrcdir" 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. ! # If the language specific compiler does not exist, but the "gcc" directory ! # does, we do not build anything. Note, $r is set by the top-level Makefile. ! # Note that when we look for the compiler, we search both with and without ! # extension to handle cross and canadian cross builds. ! compiler_name=cc1obj ! rm -f skip-this-dir ! echo $ac_n "checking if compiler $compiler_name has been built""... $ac_c" 1>&6 ! echo "configure:589: checking if compiler $compiler_name has been built" >&5 ! if eval "test \"`echo '$''{'objc_cv_compiler_exists'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ! objc_cv_compiler_exists=yes ! if test -n "$r"; then ! if test -d "$r"/gcc; then ! if test -f "$r"/gcc/$compiler_name \ ! || test -f "$r"/gcc/$compiler_name.exe; then ! true ! else ! objc_cv_compiler_exists=no ! echo "rm -f config.cache config.log multilib.out" > skip-this-dir ! fi ! fi fi fi ! echo "$ac_t""$objc_cv_compiler_exists" 1>&6 ! if test x$objc_cv_compiler_exists = xno ! then ! rm -f Makefile conftest* confdefs* core ! exit 0 fi - # For ObjC we'll set CC to point at the built gcc, but this will get it into - # the makefiles # 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:623: 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 --- 787,876 ---- 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 ! ! # 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=`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:818: 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:874: 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 -z "$CC"; then *** 649,655 **** # 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:653: 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 --- 900,906 ---- # 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:904: 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 *************** else *** 694,739 **** echo "$ac_t""no" 1>&6 fi - if test -z "$CC"; then - case "`uname -s`" in - *win32* | *WIN32*) - # Extract the first word of "cl", so it can be a program name with args. - set dummy cl; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 - echo "configure:704: 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="cl" - 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 - ;; - esac - 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:737: 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 --- 945,955 ---- 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:953: 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 *************** else *** 742,748 **** yes; #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no --- 958,964 ---- yes; #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no *************** echo "$ac_t""$ac_cv_prog_gcc" 1>&6 *** 753,767 **** if test $ac_cv_prog_gcc = yes; then GCC=yes ! else ! GCC= ! fi ! ! 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:765: 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 --- 969,979 ---- 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:977: 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 *************** rm -f conftest* *** 776,807 **** 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 ! if test "$GCC" = yes; then CFLAGS="-g -O2" else - CFLAGS="-g" - fi - else - if test "$GCC" = yes; then CFLAGS="-O2" - else - CFLAGS= fi fi ! 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:805: 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 --- 988,1106 ---- 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:1008: 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:1040: 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:1072: 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:1104: 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 *************** else *** 818,824 **** fi done IFS="$ac_save_ifs" ! test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" fi fi RANLIB="$ac_cv_prog_RANLIB" --- 1117,1123 ---- 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" *************** else *** 828,835 **** 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 --- 1127,1138 ---- 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 *************** fi *** 841,847 **** # 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:845: 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 --- 1144,1150 ---- # 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:1148: 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 *************** test -z "$INSTALL_SCRIPT" && INSTALL_SCR *** 894,973 **** 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 cant create executables. So we include AC_EXEEXT to keep ! # automake happy, but we dont execute it, since we dont care about ! # the result. ! if false; then ! echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 ! echo "configure:907: 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:940: 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 ! echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 ! echo "configure:971: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1197,1218 ---- 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:1216: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 977,983 **** rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= ! if { (eval echo configure:981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj | *.ilk | *.pdb) ;; --- 1222,1228 ---- rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= ! if { (eval echo configure:1226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj | *.ilk | *.pdb) ;; *************** test x"${ac_cv_exeext}" != xno && EXEEXT *** 997,1289 **** echo "$ac_t""${ac_cv_exeext}" 1>&6 ac_exeext=$EXEEXT ! fi ! ! ! # Sanity check for the cross-compilation case: ! echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 ! echo "configure:1006: 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:1027: \"$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:1044: \"$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:1061: \"$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:1087: 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:1097: \"$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:1125: 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:1138: \"$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* ! 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 < - 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* - 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 < ! #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:1205: \"$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:1233: 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:1243: \"$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:1273: 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 - # Disable shared libs by default # Check whether --enable-shared or --disable-shared was given. --- 1242,1343 ---- 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:1256: 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:1262: 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-lib/$(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$(MULTISUBDIR)' ! else ! glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_alias)' ! glibcpp_toolexeclibdir='$(libdir)$(MULTISUBDIR)' ! fi fi ! ! # If the language specific compiler does not exist, but the "gcc" directory ! # does, we do not build anything. Note, $r is set by the top-level Makefile. ! # Note that when we look for the compiler, we search both with and without ! # extension to handle cross and canadian cross builds. ! compiler_name=cc1obj ! rm -f skip-this-dir ! echo $ac_n "checking if compiler $compiler_name has been built""... $ac_c" 1>&6 ! echo "configure:1316: checking if compiler $compiler_name has been built" >&5 ! if eval "test \"`echo '$''{'objc_cv_compiler_exists'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ! objc_cv_compiler_exists=yes ! if test -n "$r"; then ! if test -d "$r"/gcc; then ! if test -f "$r"/gcc/$compiler_name \ ! || test -f "$r"/gcc/$compiler_name.exe; then ! true ! else ! objc_cv_compiler_exists=no ! echo "rm -f config.cache config.log multilib.out" > skip-this-dir ! fi ! fi fi + fi ! echo "$ac_t""$objc_cv_compiler_exists" 1>&6 ! if test x$objc_cv_compiler_exists = xno then ! rm -f Makefile conftest* confdefs* core ! exit 0 fi # Disable shared libs by default # Check whether --enable-shared or --disable-shared was given. *************** fi *** 1311,1317 **** # Enable Win32 DLL on MS Windows - FIXME ! # Use libtool # Check whether --enable-static or --disable-static was given. if test "${enable_static+set}" = set; then enableval="$enable_static" --- 1365,1371 ---- # 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" *************** else *** 1358,1408 **** enable_fast_install=yes fi - - # 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:1369: 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 build system type""... $ac_c" 1>&6 - echo "configure:1390: 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 - # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" --- 1412,1417 ---- *************** ac_prog=ld *** 1415,1421 **** 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:1419: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw --- 1424,1430 ---- 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:1428: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw *************** echo "configure:1419: checking for ld us *** 1445,1454 **** esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 ! echo "configure:1449: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 ! echo "configure:1452: 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 --- 1454,1463 ---- esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 ! echo "configure:1458: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 ! echo "configure:1461: 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 *** 1483,1489 **** 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:1487: 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 --- 1492,1498 ---- 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:1496: 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 *************** with_gnu_ld=$lt_cv_prog_gnu_ld *** 1500,1506 **** echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 ! echo "configure:1504: 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 --- 1509,1515 ---- echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 ! echo "configure:1513: 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 *************** reload_flag=$lt_cv_ld_reload_flag *** 1512,1518 **** test -n "$reload_flag" && reload_flag=" $reload_flag" echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 ! echo "configure:1516: 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 --- 1521,1527 ---- test -n "$reload_flag" && reload_flag=" $reload_flag" echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 ! echo "configure:1525: 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 *************** fi *** 1549,1577 **** NM="$lt_cv_path_NM" echo "$ac_t""$NM" 1>&6 - echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 - echo "configure:1554: 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 - echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 ! echo "configure:1575: 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 --- 1558,1565 ---- 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:1563: 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 *************** file_magic_cmd=$lt_cv_file_magic_cmd *** 1735,1747 **** deplibs_check_method=$lt_cv_deplibs_check_method echo $ac_n "checking for object suffix""... $ac_c" 1>&6 ! echo "configure:1739: 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:1745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; --- 1723,1735 ---- deplibs_check_method=$lt_cv_deplibs_check_method echo $ac_n "checking for object suffix""... $ac_c" 1>&6 ! echo "configure:1727: 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:1733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; *************** echo "$ac_t""$ac_cv_objext" 1>&6 *** 1758,1769 **** OBJEXT=$ac_cv_objext ac_objext=$ac_cv_objext - if test $host != $build; then - ac_tool_prefix=${host_alias}- - else - ac_tool_prefix= - fi - # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! # Only perform the check for file, if the check method requires it --- 1746,1751 ---- *************** case $deplibs_check_method in *** 1771,1777 **** 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:1775: 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 --- 1753,1759 ---- 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:1757: 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 *************** fi *** 1833,1839 **** 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:1837: 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 --- 1815,1821 ---- 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:1819: 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 *************** esac *** 1904,1910 **** # 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:1908: 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 --- 1886,1892 ---- # 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:1890: 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 "$ac_tool_prefix"; then *** 1936,1942 **** # 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:1940: 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 --- 1918,1924 ---- # 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:1922: 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 *************** fi *** 1971,1977 **** # 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:1975: 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 --- 1953,1959 ---- # 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:1957: 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 "$ac_tool_prefix"; then *** 2003,2009 **** # 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:2007: 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 --- 1985,1991 ---- # 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:1989: 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 *************** test x"$pic_mode" = xno && libtool_flags *** 2070,2077 **** case $host in *-*-irix6*) # Find out which ABI we are using. ! echo '#line 2074 "configure"' > conftest.$ac_ext ! if { (eval echo configure:2075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" --- 2052,2059 ---- case $host in *-*-irix6*) # Find out which ABI we are using. ! echo '#line 2056 "configure"' > conftest.$ac_ext ! if { (eval echo configure:2057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" *************** case $host in *** 2092,2098 **** SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 ! echo "configure:2096: 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 --- 2074,2080 ---- SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 ! echo "configure:2078: 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_link='${CC-cc} -o conftest${ac_exeext *** 2105,2118 **** 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 --- 2087,2100 ---- 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 "$ac_t""$lt_cv_cc_needs_belf" 1>&6 *** 2142,2148 **** # 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:2146: 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 --- 2124,2130 ---- # 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:2128: 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 "$ac_tool_prefix"; then *** 2174,2180 **** # 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:2178: 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 --- 2156,2162 ---- # 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:2160: 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 *************** fi *** 2209,2215 **** # 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:2213: 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 --- 2191,2197 ---- # 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:2195: 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 "$ac_tool_prefix"; then *** 2241,2247 **** # 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:2245: 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 --- 2223,2229 ---- # 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:2227: 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 *************** fi *** 2276,2282 **** # 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:2280: 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 --- 2258,2264 ---- # 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:2262: 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 "$ac_tool_prefix"; then *** 2308,2314 **** # 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:2312: 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 --- 2290,2296 ---- # 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:2294: 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 *************** fi *** 2344,2355 **** # 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:2348: 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 <&6 ! echo "configure:2330: 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 --- 2339,2345 ---- DllMain (0, 0, 0); ; return 0; } EOF ! if { (eval echo configure:2343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_need_dllmain=no else *************** echo "$ac_t""$lt_cv_need_dllmain" 1>&6 *** 2378,2396 **** SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -mdll" echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6 ! echo "configure:2382: 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 --- 2360,2378 ---- SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -mdll" echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6 ! echo "configure:2364: 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 *************** exec 5>>./config.log *** 2500,2505 **** --- 2482,2900 ---- + 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:2494: 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:2534: 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:2587: 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:2616: 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:2637: \"$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:2654: \"$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:2671: \"$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:2697: 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:2707: \"$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:2735: 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:2748: \"$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* + + 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 < + 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* + + 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 < + #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:2815: \"$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:2843: 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:2853: \"$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:2883: 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" *************** s%@includedir@%$includedir%g *** 2649,2680 **** s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g - s%@CC@%$CC%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%@CPP@%$CPP%g - s%@GTHREAD_FLAGS@%$GTHREAD_FLAGS%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%@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%@LN_S@%$LN_S%g s%@OBJEXT@%$OBJEXT%g s%@STRIP@%$STRIP%g s%@DLLTOOL@%$DLLTOOL%g - s%@AS@%$AS%g s%@OBJDUMP@%$OBJDUMP%g s%@LIBTOOL@%$LIBTOOL%g s%@OBJC_BOEHM_GC@%$OBJC_BOEHM_GC%g CEOF --- 3044,3089 ---- s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%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%@toplevel_srcdir@%$toplevel_srcdir%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 *************** target=${target} *** 2891,2898 **** with_target_subdir=${with_target_subdir} with_multisubdir=${with_multisubdir} ac_configure_args="--enable-multilib ${ac_configure_args}" CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - topsrcdir=${topsrcdir} EOF cat >> $CONFIG_STATUS <<\EOF --- 3300,3307 ---- 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} EOF cat >> $CONFIG_STATUS <<\EOF *************** if test -n "$CONFIG_FILES"; then *** 2901,2907 **** if test -n "${with_target_subdir}"; then # FIXME: We shouldn't need to set ac_file ac_file=Makefile ! . ${topsrcdir}/config-ml.in fi fi exit 0 --- 3310,3317 ---- 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 *************** rm -fr confdefs* $ac_clean_files *** 2911,2913 **** --- 3321,3324 ---- test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + diff -Nrc3pad gcc-3.0.4/libobjc/configure.in gcc-3.1/libobjc/configure.in *** gcc-3.0.4/libobjc/configure.in Fri Feb 9 07:14:34 2001 --- gcc-3.1/libobjc/configure.in Wed May 8 04:27:29 2002 *************** *** 1,5 **** # Process this file with autoconf to produce a configure script. ! # Copyright (C) 1995, 1997, 1998, 1999 Free Software Foundation, Inc. # Contributed by Dave Love (d.love@dl.ac.uk). # #This file is part of GNU Objective C. --- 1,5 ---- # Process this file with autoconf to produce a configure script. ! # Copyright (C) 1995, 1997, 1998, 1999, 2002 Free Software Foundation, Inc. # Contributed by Dave Love (d.love@dl.ac.uk). # #This file is part of GNU Objective C. *************** AC_PREREQ(2.13) *** 23,40 **** AC_INIT(objc/objc.h) AC_CONFIG_HEADER(config.h) ! if test "${srcdir}" = "." ; then ! if test "${with_target_subdir}" != "." ; then ! topsrcdir=${with_multisrctop}../.. ! else ! topsrcdir=${with_multisrctop}.. ! fi ! else ! topsrcdir=${srcdir}/.. ! fi ! dnl This is needed for a multilibbed build in the source tree so ! dnl that install-sh and config.sub get found. ! AC_CONFIG_AUX_DIR($topsrcdir) # If the language specific compiler does not exist, but the "gcc" directory # does, we do not build anything. Note, $r is set by the top-level Makefile. --- 23,40 ---- 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 ! ! AC_CANONICAL_SYSTEM ! target_alias=${target_alias-$target} ! AC_SUBST(target_alias) ! ! GLIBCPP_CONFIGURE(.) ! GLIBCPP_EXPORT_INSTALL_INFO # If the language specific compiler does not exist, but the "gcc" directory # does, we do not build anything. Note, $r is set by the top-level Makefile. *************** fi *** 66,79 **** dnl Checks for programs. ! dnl FIXME AC_PROG_CC wants CC to be able to link things, but it may ! dnl not be able to. ! define([AC_PROG_CC_WORKS],[]) ! # For ObjC we'll set CC to point at the built gcc, but this will get it into ! # the makefiles ! AC_PROG_CC test "$AR" || AR=ar AC_SUBST(AR) if test "$RANLIB"; then : --- 66,80 ---- 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 : *************** else *** 82,100 **** AC_PROG_RANLIB fi 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 cant create executables. So we include AC_EXEEXT to keep ! # automake happy, but we dont execute it, since we dont care about ! # the result. ! if false; then ! AC_EXEEXT ! fi ! ! dnl Checks for libraries. dnl Checks for header files. # Sanity check for the cross-compilation case: --- 83,89 ---- AC_PROG_RANLIB fi AC_PROG_INSTALL ! AC_PROG_MAKE_SET dnl Checks for header files. # Sanity check for the cross-compilation case: *************** fi]) *** 121,133 **** GTHREAD_FLAGS=$objc_cv_gthread_flags AC_SUBST(GTHREAD_FLAGS) - # Disable shared libs by default - AC_DISABLE_SHARED - # Enable Win32 DLL on MS Windows - FIXME - AC_LIBTOOL_WIN32_DLL - # Use libtool - AC_PROG_LIBTOOL - AC_ARG_ENABLE(objc-gc, [ --enable-objc-gc enable the use of Boehm's garbage collector with the GNU Objective-C runtime.], --- 110,115 ---- *************** AC_SUBST(OBJC_BOEHM_GC) *** 142,153 **** # 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 ! . ${topsrcdir}/config-ml.in fi fi], srcdir=${srcdir} --- 124,136 ---- # 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} *************** target=${target} *** 156,165 **** with_target_subdir=${with_target_subdir} with_multisubdir=${with_multisubdir} ac_configure_args="--enable-multilib ${ac_configure_args}" CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - topsrcdir=${topsrcdir} ) dnl Local Variables: dnl comment-start: "dnl " dnl comment-end: "" --- 139,149 ---- 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} ) + dnl Local Variables: dnl comment-start: "dnl " dnl comment-end: "" diff -Nrc3pad gcc-3.0.4/libobjc/encoding.c gcc-3.1/libobjc/encoding.c *** gcc-3.0.4/libobjc/encoding.c Mon Mar 19 21:06:22 2001 --- gcc-3.1/libobjc/encoding.c Wed Apr 24 15:05:19 2002 *************** Boston, MA 02111-1307, USA. */ *** 30,43 **** --- 30,46 ---- #include "objc-api.h" #include "encoding.h" + #undef MAX #define MAX(X, Y) \ ({ typeof(X) __x = (X), __y = (Y); \ (__x > __y ? __x : __y); }) + #undef MIN #define MIN(X, Y) \ ({ typeof(X) __x = (X), __y = (Y); \ (__x < __y ? __x : __y); }) + #undef ROUND #define ROUND(V, A) \ ({ typeof(V) __v=(V); typeof(A) __a=(A); \ __a*((__v+__a-1)/__a); }) *************** Boston, MA 02111-1307, USA. */ *** 54,59 **** --- 57,66 ---- #define QUAL_UNION_TYPE _C_UNION_B #define ARRAY_TYPE _C_ARY_B + #define REAL_TYPE _C_DBL + + #define VECTOR_TYPE _C_VECTOR + #define TYPE_FIELDS(TYPE) objc_skip_typespec (TYPE) #define DECL_MODE(TYPE) *(TYPE) *************** Boston, MA 02111-1307, USA. */ *** 69,74 **** --- 76,86 ---- #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. */ + + static int target_flags = 0; + static inline int atoi (const char* str) { diff -Nrc3pad gcc-3.0.4/libobjc/gc.c gcc-3.1/libobjc/gc.c *** gcc-3.0.4/libobjc/gc.c Wed Sep 30 02:13:09 1998 --- gcc-3.1/libobjc/gc.c Mon Sep 10 16:22:42 2001 *************** __objc_generate_gc_type_description (Cla *** 324,335 **** if (current + 1 == type_size) class_structure_type = objc_realloc (class_structure_type, ++type_size); strcat (class_structure_type + current, "}"); ! // printf ("type description for '%s' is %s\n", class->name, class_structure_type); __objc_gc_type_description_from_type (mask, class_structure_type); objc_free (class_structure_type); - #define DEBUG 1 #ifdef DEBUG printf (" mask for '%s', type '%s' (bits %d, mask size %d) is:", class_structure_type, class->name, bits_no, size); --- 324,336 ---- if (current + 1 == type_size) class_structure_type = objc_realloc (class_structure_type, ++type_size); strcat (class_structure_type + current, "}"); ! #ifdef DEBUG ! printf ("type description for '%s' is %s\n", class->name, class_structure_type); ! #endif __objc_gc_type_description_from_type (mask, class_structure_type); objc_free (class_structure_type); #ifdef DEBUG printf (" mask for '%s', type '%s' (bits %d, mask size %d) is:", class_structure_type, class->name, bits_no, size); diff -Nrc3pad gcc-3.0.4/libobjc/init.c gcc-3.1/libobjc/init.c *** gcc-3.0.4/libobjc/init.c Fri Jun 8 21:49:47 2001 --- gcc-3.1/libobjc/init.c Mon Dec 17 17:23:09 2001 *************** __objc_exec_class (Module_t module) *** 599,607 **** /* Scan the unclaimed category hash. Attempt to attach any unclaimed categories to objects. */ ! for (cell = &unclaimed_categories; ! *cell; ! ({ if (*cell) cell = &(*cell)->tail; })) { Category_t category = (*cell)->head; Class class = objc_lookup_class (category->class_name); --- 599,605 ---- /* Scan the unclaimed category hash. Attempt to attach any unclaimed categories to objects. */ ! for (cell = &unclaimed_categories; *cell; ) { Category_t category = (*cell)->head; Class class = objc_lookup_class (category->class_name); *************** __objc_exec_class (Module_t module) *** 630,635 **** --- 628,635 ---- only done for root classes. */ __objc_register_instance_methods_to_class(class); } + else + cell = &(*cell)->tail; } if (unclaimed_proto_list && objc_lookup_class ("Protocol")) diff -Nrc3pad gcc-3.0.4/libobjc/objc/objc-api.h gcc-3.1/libobjc/objc/objc-api.h *** gcc-3.0.4/libobjc/objc/objc-api.h Mon Jul 16 11:30:07 2001 --- gcc-3.1/libobjc/objc/objc-api.h Tue Apr 9 07:11:53 2002 *************** *** 1,5 **** /* GNU Objective-C Runtime API. ! Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* GNU Objective-C Runtime API. ! Copyright (C) 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** struct objc_method_description *** 75,80 **** --- 75,81 ---- #define _C_UNION_E ')' #define _C_STRUCT_B '{' #define _C_STRUCT_E '}' + #define _C_VECTOR '!' /* *************** typedef struct objc_method_list { *** 260,266 **** struct objc_protocol_list { struct objc_protocol_list *next; ! int count; Protocol *list[1]; }; --- 261,267 ---- struct objc_protocol_list { struct objc_protocol_list *next; ! size_t count; Protocol *list[1]; }; diff -Nrc3pad gcc-3.0.4/libobjc/thr.c gcc-3.1/libobjc/thr.c *** gcc-3.0.4/libobjc/thr.c Thu Mar 15 02:21:25 2001 --- gcc-3.1/libobjc/thr.c Wed Jul 18 11:54:03 2001 *************** objc_mutex_lock(objc_mutex_t mutex) *** 318,324 **** return -1; /* If we already own the lock then increment depth */ ! thread_id = objc_thread_id(); if (mutex->owner == thread_id) return ++mutex->depth; --- 318,324 ---- return -1; /* If we already own the lock then increment depth */ ! thread_id = __objc_thread_id(); if (mutex->owner == thread_id) return ++mutex->depth; *************** objc_mutex_trylock(objc_mutex_t mutex) *** 350,356 **** return -1; /* If we already own the lock then increment depth */ ! thread_id = objc_thread_id(); if (mutex->owner == thread_id) return ++mutex->depth; --- 350,356 ---- return -1; /* If we already own the lock then increment depth */ ! thread_id = __objc_thread_id(); if (mutex->owner == thread_id) return ++mutex->depth; *************** objc_mutex_unlock(objc_mutex_t mutex) *** 385,391 **** return -1; /* If another thread owns the lock then abort */ ! thread_id = objc_thread_id(); if (mutex->owner != thread_id) return -1; --- 385,391 ---- return -1; /* If another thread owns the lock then abort */ ! thread_id = __objc_thread_id(); if (mutex->owner != thread_id) return -1; *************** objc_condition_wait(objc_condition_t con *** 477,483 **** return -1; /* Make sure we are owner of mutex */ ! thread_id = objc_thread_id(); if (mutex->owner != thread_id) return -1; --- 477,483 ---- return -1; /* Make sure we are owner of mutex */ ! thread_id = __objc_thread_id(); if (mutex->owner != thread_id) return -1;