From 7e585d16ce4df23bfd21cf82e58dd323f9939232 Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Mon, 19 Jun 2000 22:28:28 +0000 Subject: [PATCH] c-parse.in (undeclared_variable_notice): Moved to c-typeck.c. * c-parse.in (undeclared_variable_notice): Moved to c-typeck.c. (primary: IDENTIFIER): Just call build_external_ref. * c-parse.y, c-parse.c, objc/objc-parse.y, objc/objc-parse.c: Regenerate. * c-lex.c (lastiddecl): Remove. (yylex): Replace all instances of lastiddecl with local variables. * c-typeck.c (build_external_ref): New function. Treat decls with C_DECL_ANTICIPATED mostly the same as nonexistent decls. Look up the decl from the id here. Call lookup_objc_ivar. * c-lang.c (lookup_objc_ivar): Stub. * objc/objc-act.c (lookup_objc_ivar): New function. * c-tree.h: Prototype lookup_objc_ivar and build_external_ref. * c-lex.h: Don't declare lastiddecl. From-SVN: r34602 --- gcc/ChangeLog | 191 ++++--- gcc/c-lang.c | 9 + gcc/c-lex.c | 30 +- gcc/c-lex.h | 6 - gcc/c-parse.c | 850 +++++++++++++----------------- gcc/c-parse.in | 169 +----- gcc/c-parse.y | 100 +--- gcc/c-tree.h | 2 + gcc/c-typeck.c | 92 ++++ gcc/objc/objc-act.c | 21 + gcc/objc/objc-parse.c | 1171 ++++++++++++++++++----------------------- gcc/objc/objc-parse.y | 161 +----- 12 files changed, 1137 insertions(+), 1665 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 799c07614fd..e0e8ae61d50 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,22 @@ +2000-06-19 Zack Weinberg + + * c-parse.in (undeclared_variable_notice): Moved to c-typeck.c. + (primary: IDENTIFIER): Just call build_external_ref. + * c-parse.y, c-parse.c, objc/objc-parse.y, objc/objc-parse.c: + Regenerate. + * c-lex.c (lastiddecl): Remove. + (yylex): Replace all instances of lastiddecl with local + variables. + + * c-typeck.c (build_external_ref): New function. Treat decls + with C_DECL_ANTICIPATED mostly the same as nonexistent decls. + Look up the decl from the id here. Call lookup_objc_ivar. + * c-lang.c (lookup_objc_ivar): Stub. + * objc/objc-act.c (lookup_objc_ivar): New function. + + * c-tree.h: Prototype lookup_objc_ivar and build_external_ref. + * c-lex.h: Don't declare lastiddecl. + 2000-06-19 Benjamin Chelf * c-common.h (IF_COND): Added documentation. @@ -28,9 +47,9 @@ (STMT_EXPR_STMT): Likewise. (LABEL_STMT_LABEL): Likewise. - * c-common.def: Added documenetion for SRCLOC, EXPR_STMT, - COMPOUND_STMT, DECL_STMT, IF_STMT, FOR_STMT, WHILE_STMT, DO_STMT, - RETURN_STMT, BREAK_STMT, CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, + * c-common.def: Added documenetion for SRCLOC, EXPR_STMT, + COMPOUND_STMT, DECL_STMT, IF_STMT, FOR_STMT, WHILE_STMT, DO_STMT, + RETURN_STMT, BREAK_STMT, CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT, SCOPE_STMT, CASE_LABEL, STMT_EXPR. 2000-06-19 Kaveh R. Ghazi @@ -114,7 +133,7 @@ Sat Jun 17 10:33:59 2000 Richard Kenner (enum c_tree_code): New enum. * c-lex.c (init_parse): Added call to add_c_tree_codes. - + 2000-06-16 Kaveh R. Ghazi * fixinc/inclhack.def (ctrl_quotes_def, io_quotes_def): Modify @@ -200,7 +219,7 @@ Wed Jun 14 23:46:26 2000 J"orn Rennecke SCOPE_STMT, CASE_LABEL, STMT_EXPR. * gencheck.c (tree_codes[]): Added '#include "c-common.def"'. - + 2000-06-14 David O'Brien * gcc.c (main): Quiet compiler warnings. argv is assumed to be @@ -409,7 +428,7 @@ Mon Jun 12 17:04:17 2000 Jeffrey A Law (law@cygnus.com) 2000-06-12 J. David Anglin - * config/float-vax.h: Add GFLOAT defines. + * config/float-vax.h: Add GFLOAT defines. Mon Jun 12 9:44:00 2000 Mark Klein @@ -482,8 +501,8 @@ Mon Jun 12 9:44:00 2000 Mark Klein 2000-06-09 Rodney Brown - * mcore-protos.h: discards const warning removal. - * mcore.c: discards const warning removal. + * mcore-protos.h: discards const warning removal. + * mcore.c: discards const warning removal. 2000-06-09 Kazu Hirata @@ -509,7 +528,7 @@ Mon Jun 12 9:44:00 2000 Mark Klein obstack tricks (this routine is no longer a bottleneck). * tree.c (make_node): Clear the new node always. (make_tree_vec): Likewise. - (tree_cons): Clear the common structure always. + (tree_cons): Clear the common structure always. (build1): Likewise; also, clear TREE_COMPLEXITY. * gengenrtl.c: Use puts wherever possible. Remove extra newlines. @@ -593,7 +612,7 @@ Fri Jun 9 20:35:13 2000 Denis Chertykov ASM_OUTPUT_DWARF_CONST_DOUBLE. * tree.c (host_integerp): Accept unsigned HOST_WIDE_INT values when pos is zero. - + * config/ia64/ia64-protos.h (ia64_output_end_prologue): Add. (output_function_prologue): Fix mispelling. (output_function_prologue, output_function_epilogue): Reorder to @@ -604,7 +623,7 @@ Fri Jun 9 20:35:13 2000 Denis Chertykov (ia64_output_end_prologue): New function. (process_set): Emit ".restore sp" for epilogue stack restores. * config/ia64/ia64.h (FUNCTION_END_PROLOGUE): Define. - + 2000-06-08 Jakub Jelinek * dbxout.c (dbxout_type_fields): Don't segfault on fields with @@ -621,7 +640,7 @@ Fri Jun 9 20:35:13 2000 Denis Chertykov 2000-06-07 Zack Weinberg * c-decl.c (pushdecl): Do not call COMPLETE_TYPE_P on - error_mark_node. + error_mark_node. * print-tree.c (print_node): The transparent_union_flag means different things for unions and arrays. Do not inspect it with TYPE_TRANSPARENT_UNION. @@ -659,7 +678,7 @@ Wed Jun 7 20:34:33 2000 Denis Chertykov 2000-06-06 Philipp Thomas - * configure.in (AC_C_INLINE): Added. + * configure.in (AC_C_INLINE): Added. * aclocal.m4 (AM_WITH_NLS): Enable --with-included-gettext by default. * configure: Regenerate. @@ -673,8 +692,8 @@ Wed Jun 7 20:34:33 2000 Denis Chertykov * c-lex.c (doing_objc_thang): Remove. * c-tree.h (doing_objc_thang): Make it a macro. * objc/objc-act.c (lang_decode_option): Set c_language, not - doing_objc_thang. - + doing_objc_thang. + 2000-06-06 Gabriel Dos Reis * diagnostic.c (output_maximum_width): Remove. @@ -688,7 +707,7 @@ Wed Jun 7 20:34:33 2000 Denis Chertykov (output_clear): Tweak. (line_wrapper_printf): Adjust call to init_output_buffer. (vline_wrapper_message_with_location): Likewise. Use - output_destroy_prefix. + output_destroy_prefix. (v_message_with_decl): Likewise. * diagnostic.h (struct output_buffer): Constify prefix. @@ -733,7 +752,7 @@ Tue Jun 6 19:25:32 2000 Philippe De Muyter 2000-06-06 Kaveh R. Ghazi * m68k.c (legitimize_pic_address): Move prototype ... - + * m68k-protos.h (legitimize_pic_address): ... here. * m68k.md (legitimize_pic_address): Delete prototypes. @@ -850,7 +869,7 @@ Mon Jun 5 06:46:28 2000 Richard Kenner (dyn-string.o): Delete rule. * dyn-string.c: Delete file * dyn-string.h: Likewise. - + 2000-06-04 Kaveh R. Ghazi * Makefile.in (intl.*): Honor non-zero exit codes in the intl @@ -858,8 +877,8 @@ Mon Jun 5 06:46:28 2000 Richard Kenner 2000-06-03 Geoff Keating - * alias.c (record_component_aliases): Don't inspect - DECL_NONADDRESSABLE_P of non-FIELD_DECL components of structures. + * alias.c (record_component_aliases): Don't inspect + DECL_NONADDRESSABLE_P of non-FIELD_DECL components of structures. Sat Jun 3 19:05:30 2000 Michael Meissner @@ -939,7 +958,7 @@ Fri Jun 2 19:31:03 2000 Richard Kenner * c-common.h (c_get_alias_set): Don't declare. * c-decl.c (init_decl_processing): Don't set lang_get_alias_set. * expr.h (lang_get_alias_set): Declare as function, not pointer. - + 2000-06-02 Bruce Korb * fixinc/server.c(sig_handler): resume closing server on SIGPIPE @@ -983,7 +1002,7 @@ Fri Jun 2 00:22:52 2000 J"orn Rennecke * cpplex.c (maybe_macroexpand): Use CPP_WTRADITIONAL. Improve error message. - * cpplib.c (parse_include): Remove support for VAX-C + * cpplib.c (parse_include): Remove support for VAX-C "#include starlet" misfeature. 2000-05-31 Laurynas Biveinis @@ -1019,7 +1038,7 @@ Thu Jun 1 09:37:35 2000 Clinton Popetz * config/i386/i386-protos.h (ix86_use_fcomi_compare): Declare. * config/i386/i386.md (*fp_jcc_3, *fp_jcc_4): Disable if we will use FCOMI. - + 2000-06-01 Richard Henderson * Makefile.in (c-decl.o): Depend on $(EXPR_H), not expr.h. @@ -1046,7 +1065,7 @@ Thu Jun 1 09:37:35 2000 Clinton Popetz 2000-05-31 Richard Henderson - * ifcvt.c (merge_if_block): Be prepared for JOIN to have no + * ifcvt.c (merge_if_block): Be prepared for JOIN to have no remaining edges. (find_if_block): Allow THEN with no outgoing edges. * flow.c (merge_blocks_nomove): Remove a barrier not following @@ -1055,7 +1074,7 @@ Thu Jun 1 09:37:35 2000 Clinton Popetz 2000-05-31 Richard Henderson * flow.c (propagate_block): Move initialization of mem_set_list ... - (init_propagate_block_info): ... here. Also track blocks with + (init_propagate_block_info): ... here. Also track blocks with no successors; don't scan insns if ! PROP_SCAN_DEAD_CODE. 2000-05-31 Richard Henderson @@ -1072,7 +1091,7 @@ Thu Jun 1 09:37:35 2000 Clinton Popetz 2000-05-31 Philipp Thomas - * configure.in (enable-nls): Enable if build == host, i.e. when + * configure.in (enable-nls): Enable if build == host, i.e. when not building a canadian cross compiler. (enable-maintainer-mode): Added for use with i18n. * aclocal.m4 (AM_GNU_GETTEXT): Only build catalogs that are a @@ -1180,7 +1199,7 @@ Wed May 31 08:07:52 2000 Richard Kenner (get_alias_set, new_alias_set, lang_get_alias_set): Deleted from here. * varasm.c (make_function_rtl, make_decl_rtl): Call set_mem_attributes. (output_constant_def, force_const_mem): Likewise. - + * flow.c (propagate_block): If block has no successors, stores to frame are dead if not used. @@ -1240,7 +1259,7 @@ Tue May 30 09:57:32 2000 Philippe De Muyter 2000-05-29 Richard Earnshaw (rearnsha@arm.com) - * flow.c (mark_used_reg): If a register is unconditionally live, + * flow.c (mark_used_reg): If a register is unconditionally live, remove any conditional death information. 2000-05-29 Richard Henderson @@ -1327,7 +1346,7 @@ Tue May 30 09:57:32 2000 Philippe De Muyter * toplev.c (rest_of_compilation): Set no_new_pseudos after flow1; instead track register_life_up_to_date. Toggle no_new_pseudos - around if_convert. + around if_convert. 2000-05-28 Geoff Keating @@ -1337,7 +1356,7 @@ Tue May 30 09:57:32 2000 Philippe De Muyter Sun May 28 18:37:07 2000 Clinton Popetz * lcm.c (make_preds_opaque): Fix comment. - (optimize_mode_switching): Use NORMAL_MODE instead of + (optimize_mode_switching): Use NORMAL_MODE instead of MODE_USES_IN_EXIT_BLOCK. Change leftover instance of FP_MODE_NONE to no_mode. Rename MODE_AT_ENTRY to NORMAL_MODE. Handle insertions before an existing NOTE_INSN_BASIC_BLOCK. @@ -1536,11 +1555,11 @@ Sun May 28 23:26:59 2000 Philippe De Muyter (gen_insn): Put all insns on the same obstack. (main): Generate prototypes for everything unconditionally. - * configure.in: Add AC_CHECK_TYPE(ssize_t). Remove commented + * configure.in: Add AC_CHECK_TYPE(ssize_t). Remove commented out check for wchar_t. * acconfig.h: Add template for ssize_t. Remove @TOP@. - * system.h: Add infrastructure for defining missing - TYPE_MAX/TYPE_MIN macros. Use it to provide fallback + * system.h: Add infrastructure for defining missing + TYPE_MAX/TYPE_MIN macros. Use it to provide fallback definitions of UCHAR_MAX and SSIZE_MAX. * configure: Regenerate. * config.in: Regenerate. @@ -1676,7 +1695,7 @@ Sat May 27 11:01:27 2000 Richard Kenner 2000-05-26 Richard Earnshaw * flow.c (find_label_refs): New function. - (find_basic_blocks_1): Call it for each alternative of a call + (find_basic_blocks_1): Call it for each alternative of a call placeholder. 2000-05-26 Richard Earnshaw @@ -1759,7 +1778,7 @@ Sat May 27 11:01:27 2000 Richard Kenner * except.h (can_throw): Declare it. * except.c (can_throw): Give it external linkage. * resource.c (find_dead_or_set_registers): Use can_throw. - + 2000-05-25 Richard Henderson * flow.c (mark_set_1): Don't record conditionally dead memory. @@ -1839,7 +1858,7 @@ Sat May 27 11:01:27 2000 Richard Kenner from frame.c. * frame.c: Remove all DWARF 2 specific code. * config/ia64/frame-ia64.c: New file. - (gthread_stuff): Make all gthread available with + (gthread_stuff): Make all gthread available with IA64_UNWIND_INFO. (dwarf_fde): Define an IA64 struct for dwarf_fde. (__register_frame_info, __register_frame): Move to common area of file. @@ -1862,7 +1881,7 @@ Sat May 27 11:01:27 2000 Richard Kenner (execute_one_ia64_descriptor): Execute one descriptor record. (rse_address_add): Calculate the position of a local reg in memory. (normalize_reg_loc): Turn a location descriptor into a memory address. - (maybe_normalize_reg_loc): Only normalize a descriptor if it falls + (maybe_normalize_reg_loc): Only normalize a descriptor if it falls within a specified PC offset range. (get_real_reg_value): Given a register location, retrieve its value. (set_real_reg_value): Change the value of a register location. @@ -1870,7 +1889,7 @@ Sat May 27 11:01:27 2000 Richard Kenner (copy_saved_reg_state): Copy all registers that need to be copied. (process_state_between): Normalize all frame register records that fall within the specified PC range. - (frame_translate): Take a processed frame description, and turn + (frame_translate): Take a processed frame description, and turn everything into addresses. (build_ia64_frame_state ): Find and create frame state record for a PC. (get_personality): Get the personality routine for a given frame. @@ -1887,7 +1906,7 @@ Sat May 27 11:01:27 2000 Richard Kenner (struct unw_p_record, unw_b_record, unw_x_record) : New unwind records. (struct unw_r_record, unwind_record): New unwind record structs. (struct unwind_info_ptr): Unwind information layout. - (IA64_UNW_LOC_TYPE_*): Macros for different types for location + (IA64_UNW_LOC_TYPE_*): Macros for different types for location descriptors. (struct ia64_reg_loc): Register location description. (struct ia64_frame_state): Location of all registers in a frame. @@ -1895,27 +1914,27 @@ Sat May 27 11:01:27 2000 Richard Kenner * libgcc2.c (__ia64_personality_v1): Personality routine. (__calc_caller_bsp): Calculate the bsp register for the caller's frame. - (ia64_throw_helper): Figure out who to return to and set up the + (ia64_throw_helper): Figure out who to return to and set up the registers. (__throw): Throw routine. * output.h (assemble_eh_align, assemble_eh_label): New functions - to generate EH info where we want it. + to generate EH info where we want it. (assemble_eh_integer): New function. * toplev.c (compile_file): Output module level exception table for non-ia64 targets. - (main): Set exceptions_via_longjump and flag_new_exceptions based + (main): Set exceptions_via_longjump and flag_new_exceptions based on IA64_UNWIND_INFO too. * varasm.c (assemble_eh_label): Generate a label via ASM_OUTPUT_EH_LABEL if it has been specified. - (assemble_eh_align): Generate an alignment directive via + (assemble_eh_align): Generate an alignment directive via ASM_OUTPUT_EH_ALIGN if it has been specified. (assemble_eh_label): Generate an integer value via ASM_OUTPUT_EH_type if they have been specified. * config/ia64/ia64.c (rtx_needs_barrier): Add flushrs. (ia64_init_builtins): Add __builtin_ia64_bsp - and __builtin_ia64_flushrs. + and __builtin_ia64_flushrs. (ia64_expand_builtin): Add IA64_BUILTIN_BSP and IA64_BUILTIN_FLUSHRS. * config/ia64/ia64.h (ia64_builtins): Add IA64_BUILTIN_BSP and @@ -1930,7 +1949,7 @@ Sat May 27 11:01:27 2000 Richard Kenner * config/ia64/t-ia64 (LIB2ADDEH): Add. * Makefile.in (LIB2ADDEH): Add. (LIB2ADD): Use LIB2ADDEH. - + 2000-05-24 Richard Henderson * recog.c (offsettable_address_p): If mode size is zero, assume @@ -2069,9 +2088,9 @@ Tue May 23 13:58:52 2000 Philippe De Muyter 2000-05-23 Zack Weinberg * simplify-rtx.c (SIGN_EXTEND): New macro. - (simplify_unary_operation, simplify_binary_operation, + (simplify_unary_operation, simplify_binary_operation, simplify_relational_operation): Use SIGN_EXTEND. Make low - halves of (low, high) pairs unsigned if they weren't already. + halves of (low, high) pairs unsigned if they weren't already. (simplify_ternary_operation): Cast INTVAL to unsigned before comparing to a MODE_BITSIZE. @@ -2079,7 +2098,7 @@ Tue May 23 13:58:52 2000 Philippe De Muyter * aclocal.m4 (gcc_AC_CHECK_DECL, gcc_AC_CHECK_DECLS): New macros rewritten from the internals of gcc_AC_NEED_DECLARATION{S}. - + * configure.in (gcc_AC_CHECK_DECLS): Call this instead of gcc_AC_NEED_DECLARATIONS. @@ -2123,7 +2142,7 @@ Tue May 23 06:50:29 2000 Richard Kenner 2000-05-22 Richard Henderson - * function.c (thread_prologue_and_epilogue_insns): Make sure + * function.c (thread_prologue_and_epilogue_insns): Make sure existing line number notes appear after the prologue. Mon May 22 21:49:00 2000 Richard Kenner @@ -2149,7 +2168,7 @@ Mon May 22 13:14:03 2000 Richard Kenner * optabs.c (can_extend_p): Allow unsignedp to have any nonzero value. (gen_extend_insn, can_fix_p, can_float_p): Likewise. - + * final.c (final_scan_insn, case NOTE_INSN_FUNCTION_BEG): Remove dangling "else" that causes "break" to be conditional. Also remove unneeded code at start. @@ -2208,7 +2227,7 @@ Sun May 21 16:42:31 2000 Richard Kenner * gensupport.c (process_rtx): Use XVEC to initialize vector slot of 'split'. - * print-rtl.c: If DEBUG_REGISTER_NAMES, define static + * print-rtl.c: If DEBUG_REGISTER_NAMES, define static debug_reg_names instead of static reg_names. If not, define global reg_names. * regclass.c: Don't define global reg_names unless @@ -2360,7 +2379,7 @@ Fri May 19 18:16:31 2000 Richard Kenner Fri May 19 12:05:13 2000 Clinton Popetz - * ssa.c (convert_from_ssa): Tell life_analysis we need death + * ssa.c (convert_from_ssa): Tell life_analysis we need death notes. (make_regs_equivalent_over_bad_edges): Only look at abnormal critical edges. @@ -2368,7 +2387,7 @@ Fri May 19 12:05:13 2000 Clinton Popetz 2000-05-19 Zack Weinberg * cpphash.c (funlike_macroexpand): Make sure not to walk p1 - past l1 when deleting whitespace and markers. + past l1 when deleting whitespace and markers. * cpplex.c (_cpp_scan_until): Clear AUX field of tokens. * cpplib.c (do_unassert): Put the list to compare against on @@ -2520,7 +2539,7 @@ Thu May 18 12:10:18 2000 Philippe De Muyter as normal directives. (do_define): Don't set parsing_define_directive. Use _cpp_scan_until. The list does not have a VSPACE at the end. - (do_if): Save, clear, and restore only_seen_white around + (do_if): Save, clear, and restore only_seen_white around _cpp_parse_expr. (skip_if_group): s/CPP_DIRECTIVE/CPP_HASH/ (do_assert, do_unassert): Rewrite. @@ -2817,7 +2836,7 @@ Mon May 15 19:01:42 MET DST 2000 Jan Hubicka * config/rs6000/rs6000.h (RETURN_ADDRESS_OFFSET): Correct for 64-bit ABI. - * config/rs6000/rs6000.c (logical_operand): Rewrite to take MODE + * config/rs6000/rs6000.c (logical_operand): Rewrite to take MODE into account. (logical_u_operand): Delete. (non_logical_cint_operand): Rewrite to take MODE into account. @@ -2835,7 +2854,7 @@ Mon May 15 19:01:42 MET DST 2000 Jan Hubicka * config/rs6000/rs6000.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): There is no such thing as a DImode CONST_DOUBLE. * config/rs6000/rs6000.c (output_toc): Likewise. - + * config/rs6000/rs6000.c (output_cbranch): Don't output prediction codes when old mnemonics are in use. Print register names for cc registers when requested. @@ -2864,14 +2883,14 @@ Sun May 14 17:58:59 2000 Hans-Peter Nilsson * mklibgcc.in (building libgcc1) [Xlibgcc1.a]: Do not use unset variables $src and $dst. - + 2000-05-13 Gabriel Dos Reis * diagnostic.h (DIAGNOSTICS_SHOW_PREFIX_ONCE): New macro. (DIAGNOSTICS_SHOW_PREFIX_NEVER): Likewise. (DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE): Likewise. (struct output_buffer: emitted_prefix_p, prefixing_rule): New - fields. + fields. (set_message_prefixing_rule): Declare. * diagnostic.c: (current_prefixing_rule): New variable. @@ -2879,7 +2898,7 @@ Sun May 14 17:58:59 2000 Hans-Peter Nilsson (output_set_prefix): Adjust buffer->emitted_prefix_p. (init_output_buffer): Adjust Initialization. (output_emit_prefix): Rewrite. Take prefixing rules into account. - + Sat May 13 11:05:47 2000 Philippe De Muyter * ifcvt.c (if_convert): Do not free NULL. @@ -3153,7 +3172,7 @@ Wed 10 May 09:36:47 2000 Neil Booth * cpplex.c (spell_token): New function. (spell_string, spell_comment, spell_name): fold into - spell_token. + spell_token. (I, S): Add macros. (E, H): Remove macros. (save_comment): Save comment opening characters too. @@ -3250,7 +3269,7 @@ Tue May 9 20:52:43 2000 Denis Chertykov * config/avr/avr-protos.h (extra_constraint): change a type of second argument from char to int to avoid warnings. (asm_output_byte): Likewise. - + * config/avr/avr.c (MAX_LD_OFFSET) New macro. (initial_elimination_offset): Handle elimination from FRAME_POINTER_REGNUM to STACK_POINTER_REGNUM. @@ -3276,7 +3295,7 @@ Tue May 9 20:52:43 2000 Denis Chertykov scratch register. Run `fatal_insn' if shift count is a CONSTANT_P, but not a CONST_INT. (lshrqi3_out): Coding style modifications. Run `fatal_insn' if - shift count is a CONSTANT_P, but not a CONST_INT. + shift count is a CONSTANT_P, but not a CONST_INT. (extra_constraint): change a type of second argument from char to int to avoid warnings. (asm_output_byte): Likewise. @@ -3294,7 +3313,7 @@ Tue May 9 20:52:43 2000 Denis Chertykov (lshrqi3): Shift count uses constraints 'n' instead of 'i'. (call_insn): Correct test for which_alternative == 1 (was 0). (call_value_insn): Likewise. - + * config/avr/t-avr: Remove definition of FLOAT while generates fp-bit.c @@ -3310,7 +3329,7 @@ Tue May 9 16:30:27 MET DST 2000 Jan Hubicka * calls.c (expand_call): Reorganize somewhat in order to avoid unnecesary recalculation inside loop and make tail call failure code cleaner. - + Tue May 9 06:30:20 2000 Richard Kenner * alias.c (nonlocal_reference_p): Minor reformatting. @@ -3593,7 +3612,7 @@ Sun May 7 00:54:57 EDT 2000 John Wehle (john@feith.com) * arm.c (thumb_code): Define it. (arm_override_options): Set it. * arm.h (thumb_code): Declare it. - + 2000-05-06 Richard Earnshaw (reanrsha@arm.com) * arm-protos.h (arm_dllexport_name_p, arm_dllimport_name_p): Constify. @@ -3602,7 +3621,7 @@ Sun May 7 00:54:57 EDT 2000 John Wehle (john@feith.com) * arm.c (arm_gen_load_multiple, arm_gen_store_mulitple): Don't add bogus clobber to insns. - (load_multiple_operation, store_mulitple_operation): Don't check + (load_multiple_operation, store_mulitple_operation): Don't check for it. * arm.md (ldmsi_postinc, stmsi_postinc): Adjust accordingly. @@ -3611,7 +3630,7 @@ Sun May 7 00:54:57 EDT 2000 John Wehle (john@feith.com) * arm.md (call_value_symbol): Remove predicate from op2. * arm.h (SPECIAL_MODE_PREDICATES): Define. - + Sat May 6 06:25:56 2000 Richard Kenner * expr.c (get_subtarget): New function. @@ -3634,7 +3653,7 @@ Sat May 6 06:25:56 2000 Richard Kenner -maix64 is error. * rs6000.c (print_operand): Fix lossage typo. (output_cbranch): Remove "cr" decoration for now. - * rs6000.h (ASM_OUTPUT_DEF_FROM_DECLS): Make alias 'const char *'. + * rs6000.h (ASM_OUTPUT_DEF_FROM_DECLS): Make alias 'const char *'. Sat May 6 06:55:32 2000 Denis Chertykov @@ -3649,7 +3668,7 @@ Sat May 6 06:55:32 2000 Denis Chertykov * c-common.c (decl_attributes): For TYPE_DECLs attach the attribute to the decl. - * c-decl.c (pushdecl): Propagate the USED attribute to the + * c-decl.c (pushdecl): Propagate the USED attribute to the type copy. 2000-05-05 Richard Henderson @@ -3670,7 +3689,7 @@ Sat May 6 06:55:32 2000 Denis Chertykov Fri May 5 10:29:21 2000 Marc Espie - * config/openbsd.h (LINK_SPEC): pass correct flags to ld + * config/openbsd.h (LINK_SPEC): pass correct flags to ld to support -shared, on platforms with dynamic libraries. Fri May 5 10:27:06 2000 Philippe De Muyter @@ -3783,12 +3802,12 @@ Thu May 4 14:37:23 2000 Jeffrey A Law (law@cygnus.com) 2000-05-04 Mumit Khan - * i386/cygwin.h (CPP_PREDEFINES): Don't define __STDC__. Move + * i386/cygwin.h (CPP_PREDEFINES): Don't define __STDC__. Move attribute macros from here ... (CPP_SPEC): to here. * i386/mingw32.h (CPP_PREDEFINES): Likewise. (CPP_SPEC): Likewise. - * i386/crtdll.h (CPP_PREDEFINES): Delete attribute macros. + * i386/crtdll.h (CPP_PREDEFINES): Delete attribute macros. * Makefile.in ($(HOST_PREFIX_1)gensupport.o): Add build rule. (libgcc.a): Pass LIB1ASMSRC to libgcc.mk. @@ -3796,7 +3815,7 @@ Thu May 4 14:37:23 2000 Jeffrey A Law (law@cygnus.com) 2000-05-04 Kaveh R. Ghazi * bb-reorder.c (get_next_bb_note, get_prev_bb_note): Prototype. - + * diagnostic (vbuild_message_string, build_message_string, build_location_prefix, output_get_prefix, init_output_buffer, output_notice, vline_wrapper_message_with_location, @@ -3880,7 +3899,7 @@ Thu May 4 09:45:12 2000 Richard Kenner MEM_COPY_ATTRIBUTES. 2000-05-03 Robert Lipe - + * configure.in (i[34567]86-*-isc*) [tmake_file]: Add t-i386bare to suppress libgcc1. (i[34567]86-*-sco3.2v5*) Likewise. @@ -4078,15 +4097,15 @@ Wed May 3 12:40:53 2000 Clinton Popetz * Makefile.in (HOST_RTL): Depend on gensupport. (gensupport.o) New rule. * genattr.c: Use gensupport for reading .md files. - * genattrtab.c: Ditto. - * gencodes.c: Ditto. - * genconfig.c: Ditto. - * genemit.c: Ditto. - * genextract.c: Ditto. - * genflags.c: Ditto. - * genopinit.c: Ditto. - * genoutput.c: Ditto. - * genpeep.c: Ditto. + * genattrtab.c: Ditto. + * gencodes.c: Ditto. + * genconfig.c: Ditto. + * genemit.c: Ditto. + * genextract.c: Ditto. + * genflags.c: Ditto. + * genopinit.c: Ditto. + * genoutput.c: Ditto. + * genpeep.c: Ditto. * genrecog.c: Ditto. * rtl.def (define_insn_and_split): New DEF_RTL_EXPR. * md.texi (Insn Splitting): Document define_insn_and_split. @@ -4123,11 +4142,11 @@ Tue May 2 23:38:37 2000 Jason Eckhardt Tue May 2 18:20:31 2000 Donald Lindsay - * config/mips/mips.c (mips_build_va_list,mips_va_start,mips_va_arg): new + * config/mips/mips.c (mips_build_va_list,mips_va_start,mips_va_arg): new ABI for varargs, across all MIPS. This is incompatible because the va_list (__builtin_va_list) structure is different, so a compilation unit passing a va_list and a compilation unit being passed one, should - both be compiled with the same ABI. (The old structure had two + both be compiled with the same ABI. (The old structure had two pointers, now it has three.) Tue May 2 19:18:43 2000 Jason Eckhardt @@ -4208,7 +4227,7 @@ Tue May 2 17:06:53 2000 Jason Eckhardt * config/ia64/ia64.c (ia64_encode_section_info): Handle the case where this function is called for the second time on a decl that has had its section info changed in such a way as to move it out - of small data/bss. + of small data/bss. * config/ia64/ia64.h (REDO_SECTION_INFO_P): New definition. 2000-05-01 Richard Henderson diff --git a/gcc/c-lang.c b/gcc/c-lang.c index 331ff54e5dc..620ed78c676 100644 --- a/gcc/c-lang.c +++ b/gcc/c-lang.c @@ -171,6 +171,15 @@ build_objc_string (len, str) return NULL_TREE; } +/* Used by c-typeck.c (build_external_ref), but only for objc. */ + +tree +lookup_objc_ivar (id) + tree id ATTRIBUTE_UNUSED; +{ + return 0; +} + /* Called at end of parsing, but before end-of-file processing. */ void diff --git a/gcc/c-lex.c b/gcc/c-lex.c index 2e6e5a9ad88..41a88b0e667 100644 --- a/gcc/c-lex.c +++ b/gcc/c-lex.c @@ -126,12 +126,6 @@ put_back (ch) int linemode; -/* the declaration found for the last IDENTIFIER token read in. - yylex must look this up to detect typedefs, which get token type TYPENAME, - so it is left around in case the identifier is not a typedef but is - used in a context which makes it a reference to a variable. */ -tree lastiddecl; - extern int yydebug; /* File used for outputting assembler code. */ @@ -1400,10 +1394,10 @@ yylex () /* Only return OBJECTNAME if it is a typedef. */ if (doing_objc_thang && value == OBJECTNAME) { - lastiddecl = lookup_name(yylval.ttype); + tree decl = lookup_name(yylval.ttype); - if (lastiddecl == NULL_TREE - || TREE_CODE (lastiddecl) != TYPE_DECL) + if (decl == NULL_TREE + || TREE_CODE (decl) != TYPE_DECL) value = IDENTIFIER; } @@ -1422,24 +1416,26 @@ yylex () if (value == IDENTIFIER) { + tree decl; + if (token_buffer[0] == '@') error("invalid identifier `%s'", token_buffer); yylval.ttype = get_identifier (token_buffer); - lastiddecl = lookup_name (yylval.ttype); + decl = lookup_name (yylval.ttype); - if (lastiddecl != 0 && TREE_CODE (lastiddecl) == TYPE_DECL) + if (decl != 0 && TREE_CODE (decl) == TYPE_DECL) value = 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 (lastiddecl != 0 && TREE_CODE (lastiddecl) == VAR_DECL - && DECL_IGNORED_P (lastiddecl) - && TREE_READONLY (lastiddecl) - && DECL_INITIAL (lastiddecl) != 0 - && TREE_CODE (DECL_INITIAL (lastiddecl)) == STRING_CST) + else if (decl != 0 && 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 (lastiddecl); + tree stringval = DECL_INITIAL (decl); /* Copy the string value so that we won't clobber anything if we put something in the TREE_CHAIN of this one. */ diff --git a/gcc/c-lex.h b/gcc/c-lex.h index c1e25cb4a52..532027e7b11 100644 --- a/gcc/c-lex.h +++ b/gcc/c-lex.h @@ -69,12 +69,6 @@ enum rid It is indexed by a RID_... value. */ extern tree ridpointers[(int) RID_MAX]; -/* the declaration found for the last IDENTIFIER token read in. - yylex must look this up to detect typedefs, which get token type TYPENAME, - so it is left around in case the identifier is not a typedef but is - used in a context which makes it a reference to a variable. */ -extern tree lastiddecl; - extern char *token_buffer; /* Pointer to token buffer. */ extern tree make_pointer_declarator PARAMS ((tree, tree)); diff --git a/gcc/c-parse.c b/gcc/c-parse.c index cd51c2429da..6d730c83abe 100644 --- a/gcc/c-parse.c +++ b/gcc/c-parse.c @@ -120,9 +120,6 @@ static tree prefix_attributes = NULL_TREE; /* Stack of saved values of current_declspecs and prefix_attributes. */ static tree declspec_stack; -/* 1 if we explained undeclared var errors. */ -static int undeclared_variable_notice; - /* For __extension__, save/restore the warning flags which are controlled by __extension__. */ #define SAVE_WARN_FLAGS() \ @@ -383,47 +380,47 @@ static const short yyrhs[] = { -1, #if YYDEBUG != 0 static const short yyrline[] = { 0, - 236, 241, 255, 257, 257, 258, 260, 262, 263, 271, - 275, 285, 289, 293, 295, 297, 298, 299, 304, 311, - 313, 317, 321, 327, 329, 333, 337, 343, 345, 349, - 355, 357, 360, 362, 364, 366, 368, 370, 372, 376, - 380, 383, 386, 389, 393, 395, 398, 401, 405, 433, - 439, 442, 445, 448, 450, 452, 456, 460, 464, 466, - 469, 473, 500, 502, 504, 506, 508, 510, 512, 514, - 516, 518, 520, 522, 524, 526, 530, 532, 536, 538, - 541, 545, 547, 554, 557, 565, 576, 674, 675, 677, - 683, 685, 708, 717, 719, 721, 725, 731, 733, 738, - 740, 748, 750, 751, 761, 766, 768, 769, 770, 777, - 782, 786, 789, 797, 802, 804, 805, 806, 813, 823, - 827, 832, 836, 840, 844, 846, 848, 857, 860, 864, - 866, 868, 873, 877, 880, 884, 887, 889, 901, 904, - 906, 908, 912, 916, 918, 921, 934, 937, 941, 943, - 951, 952, 953, 957, 959, 965, 966, 967, 970, 972, - 975, 977, 980, 983, 989, 996, 998, 1005, 1012, 1015, - 1022, 1025, 1029, 1032, 1036, 1041, 1044, 1048, 1051, 1053, - 1055, 1057, 1064, 1066, 1067, 1068, 1073, 1075, 1077, 1079, - 1084, 1088, 1091, 1093, 1098, 1100, 1101, 1104, 1104, 1107, - 1110, 1112, 1114, 1117, 1119, 1122, 1128, 1130, 1134, 1148, - 1156, 1160, 1174, 1182, 1189, 1191, 1196, 1199, 1204, 1206, - 1208, 1215, 1217, 1225, 1231, 1236, 1238, 1240, 1247, 1249, - 1255, 1261, 1263, 1265, 1270, 1272, 1279, 1281, 1284, 1287, - 1291, 1294, 1298, 1301, 1305, 1310, 1312, 1316, 1318, 1320, - 1322, 1326, 1328, 1330, 1333, 1335, 1338, 1342, 1344, 1347, - 1349, 1354, 1357, 1362, 1364, 1366, 1380, 1386, 1399, 1404, - 1409, 1411, 1416, 1418, 1422, 1426, 1430, 1440, 1442, 1447, - 1452, 1455, 1459, 1462, 1466, 1469, 1472, 1475, 1479, 1482, - 1486, 1490, 1492, 1494, 1496, 1498, 1500, 1502, 1504, 1508, - 1516, 1524, 1526, 1528, 1532, 1534, 1537, 1540, 1550, 1552, - 1557, 1559, 1562, 1576, 1579, 1582, 1584, 1586, 1590, 1594, - 1600, 1618, 1623, 1628, 1631, 1645, 1654, 1658, 1662, 1666, - 1672, 1676, 1681, 1684, 1689, 1692, 1693, 1709, 1714, 1717, - 1729, 1731, 1741, 1751, 1752, 1759, 1761, 1773, 1777, 1791, - 1797, 1803, 1804, 1809, 1814, 1818, 1822, 1833, 1840, 1847, - 1854, 1865, 1871, 1874, 1879, 1902, 1932, 1963, 1994, 2009, - 2023, 2027, 2031, 2034, 2039, 2041, 2044, 2046, 2050, 2055, - 2058, 2064, 2069, 2074, 2076, 2085, 2086, 2092, 2094, 2104, - 2106, 2110, 2113, 2119, 2128, 2136, 2144, 2153, 2166, 2171, - 2176, 2178, 2187, 2190, 2195, 2198, 2202 + 233, 238, 252, 254, 254, 255, 257, 259, 260, 268, + 272, 282, 286, 290, 292, 294, 295, 296, 301, 308, + 310, 314, 318, 324, 326, 330, 334, 340, 342, 346, + 352, 354, 357, 359, 361, 363, 365, 367, 369, 373, + 377, 380, 383, 386, 390, 392, 395, 398, 402, 430, + 436, 439, 442, 445, 447, 449, 453, 457, 461, 463, + 466, 470, 497, 499, 501, 503, 505, 507, 509, 511, + 513, 515, 517, 519, 521, 523, 527, 529, 533, 535, + 538, 542, 544, 551, 554, 562, 573, 580, 581, 583, + 589, 591, 614, 623, 625, 627, 631, 637, 639, 644, + 646, 654, 656, 657, 667, 672, 674, 675, 676, 683, + 688, 692, 695, 703, 708, 710, 711, 712, 719, 729, + 733, 738, 742, 746, 750, 752, 754, 763, 766, 770, + 772, 774, 779, 783, 786, 790, 793, 795, 807, 810, + 812, 814, 818, 822, 824, 827, 840, 843, 847, 849, + 857, 858, 859, 863, 865, 871, 872, 873, 876, 878, + 881, 883, 886, 889, 895, 902, 904, 911, 918, 921, + 928, 931, 935, 938, 942, 947, 950, 954, 957, 959, + 961, 963, 970, 972, 973, 974, 979, 981, 983, 985, + 990, 994, 997, 999, 1004, 1006, 1007, 1010, 1010, 1013, + 1016, 1018, 1020, 1023, 1025, 1028, 1034, 1036, 1040, 1054, + 1062, 1066, 1080, 1088, 1095, 1097, 1102, 1105, 1110, 1112, + 1114, 1121, 1123, 1131, 1137, 1142, 1144, 1146, 1153, 1155, + 1161, 1167, 1169, 1171, 1176, 1178, 1185, 1187, 1190, 1193, + 1197, 1200, 1204, 1207, 1211, 1216, 1218, 1222, 1224, 1226, + 1228, 1232, 1234, 1236, 1239, 1241, 1244, 1248, 1250, 1253, + 1255, 1260, 1263, 1268, 1270, 1272, 1286, 1292, 1305, 1310, + 1315, 1317, 1322, 1324, 1328, 1332, 1336, 1346, 1348, 1353, + 1358, 1361, 1365, 1368, 1372, 1375, 1378, 1381, 1385, 1388, + 1392, 1396, 1398, 1400, 1402, 1404, 1406, 1408, 1410, 1414, + 1422, 1430, 1432, 1434, 1438, 1440, 1443, 1446, 1456, 1458, + 1463, 1465, 1468, 1482, 1485, 1488, 1490, 1492, 1496, 1500, + 1506, 1524, 1529, 1534, 1537, 1551, 1560, 1564, 1568, 1572, + 1578, 1582, 1587, 1590, 1595, 1598, 1599, 1615, 1620, 1623, + 1635, 1637, 1647, 1657, 1658, 1665, 1667, 1679, 1683, 1697, + 1703, 1709, 1710, 1715, 1720, 1724, 1728, 1739, 1746, 1753, + 1760, 1771, 1777, 1780, 1785, 1808, 1838, 1869, 1900, 1915, + 1929, 1933, 1937, 1940, 1945, 1947, 1950, 1952, 1956, 1961, + 1964, 1970, 1975, 1980, 1982, 1991, 1992, 1998, 2000, 2010, + 2012, 2016, 2019, 2025, 2034, 2042, 2050, 2059, 2072, 2077, + 2082, 2084, 2093, 2096, 2101, 2104, 2108 }; #endif @@ -1274,7 +1271,7 @@ static const short yycheck[] = { 38, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ -#line 3 "/usr/lib/bison.simple" +#line 3 "/usr/share/misc/bison.simple" /* This file comes from bison-1.28. */ /* Skeleton output parser for bison, @@ -1488,7 +1485,7 @@ __yy_memcpy (char *to, char *from, unsigned int count) #endif #endif -#line 217 "/usr/lib/bison.simple" +#line 217 "/usr/share/misc/bison.simple" /* The user can define YYPARSE_PARAM as the name of an argument to be passed into yyparse. The argument should have type void *. @@ -1817,14 +1814,14 @@ yyreduce: switch (yyn) { case 1: -#line 237 "c-parse.y" +#line 234 "c-parse.y" { if (pedantic) pedwarn ("ANSI C forbids an empty source file"); finish_file (); ; break;} case 2: -#line 242 "c-parse.y" +#line 239 "c-parse.y" { /* In case there were missing closebraces, get us back to the global binding level. */ @@ -1834,15 +1831,15 @@ case 2: ; break;} case 3: -#line 256 "c-parse.y" +#line 253 "c-parse.y" {yyval.ttype = NULL_TREE; ; break;} case 5: -#line 257 "c-parse.y" +#line 254 "c-parse.y" {yyval.ttype = NULL_TREE; ; break;} case 9: -#line 264 "c-parse.y" +#line 261 "c-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) @@ -1852,11 +1849,11 @@ case 9: error ("argument of `asm' is not a constant string"); ; break;} case 10: -#line 272 "c-parse.y" +#line 269 "c-parse.y" { RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ; break;} case 11: -#line 277 "c-parse.y" +#line 274 "c-parse.y" { if (pedantic) error ("ANSI C forbids data definition with no type or storage class"); else if (!flag_traditional) @@ -1867,162 +1864,162 @@ case 11: declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 12: -#line 286 "c-parse.y" +#line 283 "c-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 13: -#line 290 "c-parse.y" +#line 287 "c-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 14: -#line 294 "c-parse.y" +#line 291 "c-parse.y" { pedwarn ("empty declaration"); ; break;} case 15: -#line 296 "c-parse.y" +#line 293 "c-parse.y" { shadow_tag (yyvsp[-1].ttype); ; break;} case 18: -#line 300 "c-parse.y" +#line 297 "c-parse.y" { if (pedantic) pedwarn ("ANSI C does not allow extra `;' outside of a function"); ; break;} case 19: -#line 306 "c-parse.y" +#line 303 "c-parse.y" { if (! start_function (current_declspecs, yyvsp[0].ttype, prefix_attributes, NULL_TREE)) YYERROR1; reinit_parse_for_function (); ; break;} case 20: -#line 311 "c-parse.y" +#line 308 "c-parse.y" { store_parm_decls (); ; break;} case 21: -#line 313 "c-parse.y" +#line 310 "c-parse.y" { finish_function (0); current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 22: -#line 318 "c-parse.y" +#line 315 "c-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 23: -#line 322 "c-parse.y" +#line 319 "c-parse.y" { if (! start_function (current_declspecs, yyvsp[0].ttype, prefix_attributes, NULL_TREE)) YYERROR1; reinit_parse_for_function (); ; break;} case 24: -#line 327 "c-parse.y" +#line 324 "c-parse.y" { store_parm_decls (); ; break;} case 25: -#line 329 "c-parse.y" +#line 326 "c-parse.y" { finish_function (0); current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 26: -#line 334 "c-parse.y" +#line 331 "c-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 27: -#line 338 "c-parse.y" +#line 335 "c-parse.y" { if (! start_function (NULL_TREE, yyvsp[0].ttype, prefix_attributes, NULL_TREE)) YYERROR1; reinit_parse_for_function (); ; break;} case 28: -#line 343 "c-parse.y" +#line 340 "c-parse.y" { store_parm_decls (); ; break;} case 29: -#line 345 "c-parse.y" +#line 342 "c-parse.y" { finish_function (0); current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 30: -#line 350 "c-parse.y" +#line 347 "c-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 33: -#line 361 "c-parse.y" +#line 358 "c-parse.y" { yyval.code = ADDR_EXPR; ; break;} case 34: -#line 363 "c-parse.y" +#line 360 "c-parse.y" { yyval.code = NEGATE_EXPR; ; break;} case 35: -#line 365 "c-parse.y" +#line 362 "c-parse.y" { yyval.code = CONVERT_EXPR; ; break;} case 36: -#line 367 "c-parse.y" +#line 364 "c-parse.y" { yyval.code = PREINCREMENT_EXPR; ; break;} case 37: -#line 369 "c-parse.y" +#line 366 "c-parse.y" { yyval.code = PREDECREMENT_EXPR; ; break;} case 38: -#line 371 "c-parse.y" +#line 368 "c-parse.y" { yyval.code = BIT_NOT_EXPR; ; break;} case 39: -#line 373 "c-parse.y" +#line 370 "c-parse.y" { yyval.code = TRUTH_NOT_EXPR; ; break;} case 40: -#line 377 "c-parse.y" +#line 374 "c-parse.y" { yyval.ttype = build_compound_expr (yyvsp[0].ttype); ; break;} case 41: -#line 382 "c-parse.y" +#line 379 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 43: -#line 388 "c-parse.y" +#line 385 "c-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} case 44: -#line 390 "c-parse.y" +#line 387 "c-parse.y" { chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} case 46: -#line 396 "c-parse.y" +#line 393 "c-parse.y" { yyval.ttype = build_indirect_ref (yyvsp[0].ttype, "unary *"); ; break;} case 47: -#line 399 "c-parse.y" +#line 396 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ; break;} case 48: -#line 402 "c-parse.y" +#line 399 "c-parse.y" { yyval.ttype = build_unary_op (yyvsp[-1].code, yyvsp[0].ttype, 0); overflow_warning (yyval.ttype); ; break;} case 49: -#line 406 "c-parse.y" +#line 403 "c-parse.y" { tree label = lookup_label (yyvsp[0].ttype); if (pedantic) pedwarn ("ANSI C forbids `&&'"); @@ -2037,7 +2034,7 @@ case 49: ; break;} case 50: -#line 434 "c-parse.y" +#line 431 "c-parse.y" { skip_evaluation--; if (TREE_CODE (yyvsp[0].ttype) == COMPONENT_REF && DECL_C_BIT_FIELD (TREE_OPERAND (yyvsp[0].ttype, 1))) @@ -2045,53 +2042,53 @@ case 50: yyval.ttype = c_sizeof (TREE_TYPE (yyvsp[0].ttype)); ; break;} case 51: -#line 440 "c-parse.y" +#line 437 "c-parse.y" { skip_evaluation--; yyval.ttype = c_sizeof (groktypename (yyvsp[-1].ttype)); ; break;} case 52: -#line 443 "c-parse.y" +#line 440 "c-parse.y" { skip_evaluation--; yyval.ttype = c_alignof_expr (yyvsp[0].ttype); ; break;} case 53: -#line 446 "c-parse.y" +#line 443 "c-parse.y" { skip_evaluation--; yyval.ttype = c_alignof (groktypename (yyvsp[-1].ttype)); ; break;} case 54: -#line 449 "c-parse.y" +#line 446 "c-parse.y" { yyval.ttype = build_unary_op (REALPART_EXPR, yyvsp[0].ttype, 0); ; break;} case 55: -#line 451 "c-parse.y" +#line 448 "c-parse.y" { yyval.ttype = build_unary_op (IMAGPART_EXPR, yyvsp[0].ttype, 0); ; break;} case 56: -#line 453 "c-parse.y" +#line 450 "c-parse.y" { yyval.ttype = build_va_arg (yyvsp[-3].ttype, groktypename (yyvsp[-1].ttype)); ; break;} case 57: -#line 457 "c-parse.y" +#line 454 "c-parse.y" { skip_evaluation++; ; break;} case 58: -#line 461 "c-parse.y" +#line 458 "c-parse.y" { skip_evaluation++; ; break;} case 60: -#line 467 "c-parse.y" +#line 464 "c-parse.y" { tree type = groktypename (yyvsp[-2].ttype); yyval.ttype = build_c_cast (type, yyvsp[0].ttype); ; break;} case 61: -#line 470 "c-parse.y" +#line 467 "c-parse.y" { start_init (NULL_TREE, NULL, 0); yyvsp[-2].ttype = groktypename (yyvsp[-2].ttype); really_start_incremental_init (yyvsp[-2].ttype); ; break;} case 62: -#line 474 "c-parse.y" +#line 471 "c-parse.y" { const char *name; tree result = pop_init_level (0); tree type = yyvsp[-5].ttype; @@ -2118,90 +2115,90 @@ case 62: ; break;} case 64: -#line 503 "c-parse.y" +#line 500 "c-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 65: -#line 505 "c-parse.y" +#line 502 "c-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 66: -#line 507 "c-parse.y" +#line 504 "c-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 67: -#line 509 "c-parse.y" +#line 506 "c-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 68: -#line 511 "c-parse.y" +#line 508 "c-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 69: -#line 513 "c-parse.y" +#line 510 "c-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 70: -#line 515 "c-parse.y" +#line 512 "c-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 71: -#line 517 "c-parse.y" +#line 514 "c-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 72: -#line 519 "c-parse.y" +#line 516 "c-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 73: -#line 521 "c-parse.y" +#line 518 "c-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 74: -#line 523 "c-parse.y" +#line 520 "c-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 75: -#line 525 "c-parse.y" +#line 522 "c-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 76: -#line 527 "c-parse.y" +#line 524 "c-parse.y" { yyvsp[-1].ttype = truthvalue_conversion (default_conversion (yyvsp[-1].ttype)); skip_evaluation += yyvsp[-1].ttype == boolean_false_node; ; break;} case 77: -#line 530 "c-parse.y" +#line 527 "c-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 533 "c-parse.y" +#line 530 "c-parse.y" { yyvsp[-1].ttype = truthvalue_conversion (default_conversion (yyvsp[-1].ttype)); skip_evaluation += yyvsp[-1].ttype == boolean_true_node; ; break;} case 79: -#line 536 "c-parse.y" +#line 533 "c-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 539 "c-parse.y" +#line 536 "c-parse.y" { yyvsp[-1].ttype = truthvalue_conversion (default_conversion (yyvsp[-1].ttype)); skip_evaluation += yyvsp[-1].ttype == boolean_false_node; ; break;} case 81: -#line 542 "c-parse.y" +#line 539 "c-parse.y" { skip_evaluation += ((yyvsp[-4].ttype == boolean_true_node) - (yyvsp[-4].ttype == boolean_false_node)); ; break;} case 82: -#line 545 "c-parse.y" +#line 542 "c-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 548 "c-parse.y" +#line 545 "c-parse.y" { if (pedantic) pedwarn ("ANSI C forbids omitting the middle term of a ?: expression"); /* Make sure first operand is calculated only once. */ @@ -2210,12 +2207,12 @@ case 83: skip_evaluation += yyvsp[-1].ttype == boolean_true_node; ; break;} case 84: -#line 555 "c-parse.y" +#line 552 "c-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 558 "c-parse.y" +#line 555 "c-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)); @@ -2225,7 +2222,7 @@ case 85: ; break;} case 86: -#line 566 "c-parse.y" +#line 563 "c-parse.y" { char class; yyval.ttype = build_modify_expr (yyvsp[-2].ttype, yyvsp[-1].code, yyvsp[0].ttype); /* This inhibits warnings in truthvalue_conversion. */ @@ -2236,110 +2233,19 @@ case 86: ; break;} case 87: -#line 578 "c-parse.y" +#line 575 "c-parse.y" { - yyval.ttype = lastiddecl; - if (!yyval.ttype || yyval.ttype == error_mark_node) - { - if (yychar == YYEMPTY) - yychar = YYLEX; - if (yychar == '(') - { - { - /* Ordinary implicit function declaration. */ - yyval.ttype = implicitly_declare (yyvsp[0].ttype); - assemble_external (yyval.ttype); - TREE_USED (yyval.ttype) = 1; - } - } - else if (current_function_decl == 0) - { - error ("`%s' undeclared here (not in a function)", - IDENTIFIER_POINTER (yyvsp[0].ttype)); - yyval.ttype = error_mark_node; - } - else - { - { - if (IDENTIFIER_GLOBAL_VALUE (yyvsp[0].ttype) != error_mark_node - || IDENTIFIER_ERROR_LOCUS (yyvsp[0].ttype) != current_function_decl) - { - error ("`%s' undeclared (first use in this function)", - IDENTIFIER_POINTER (yyvsp[0].ttype)); - - if (! undeclared_variable_notice) - { - error ("(Each undeclared identifier is reported only once"); - error ("for each function it appears in.)"); - undeclared_variable_notice = 1; - } - } - yyval.ttype = error_mark_node; - /* Prevent repeated error messages. */ - IDENTIFIER_GLOBAL_VALUE (yyvsp[0].ttype) = error_mark_node; - IDENTIFIER_ERROR_LOCUS (yyvsp[0].ttype) = current_function_decl; - } - } - } - else if (TREE_TYPE (yyval.ttype) == error_mark_node) - yyval.ttype = error_mark_node; - else if (C_DECL_ANTICIPATED (yyval.ttype)) - { - /* The first time we see a build-in function used, - if it has not been declared. */ - C_DECL_ANTICIPATED (yyval.ttype) = 0; - if (yychar == YYEMPTY) - yychar = YYLEX; - if (yychar == '(') - { - /* Omit the implicit declaration we - would ordinarily do, so we don't lose - the actual built in type. - But print a diagnostic for the mismatch. */ - if (TREE_CODE (yyval.ttype) != FUNCTION_DECL) - error ("`%s' implicitly declared as function", - IDENTIFIER_POINTER (DECL_NAME (yyval.ttype))); - else if ((TYPE_MODE (TREE_TYPE (TREE_TYPE (yyval.ttype))) - != TYPE_MODE (integer_type_node)) - && !VOID_TYPE_P (TREE_TYPE (TREE_TYPE (yyval.ttype)))) - pedwarn ("type mismatch in implicit declaration for built-in function `%s'", - IDENTIFIER_POINTER (DECL_NAME (yyval.ttype))); - /* If it really returns void, change that to int. */ - if (TREE_TYPE (TREE_TYPE (yyval.ttype)) == void_type_node) - TREE_TYPE (yyval.ttype) - = build_function_type (integer_type_node, - TYPE_ARG_TYPES (TREE_TYPE (yyval.ttype))); - } - else - pedwarn ("built-in function `%s' used without declaration", - IDENTIFIER_POINTER (DECL_NAME (yyval.ttype))); - - /* Do what we would ordinarily do when a fn is used. */ - assemble_external (yyval.ttype); - TREE_USED (yyval.ttype) = 1; - } - else - { - assemble_external (yyval.ttype); - TREE_USED (yyval.ttype) = 1; - } - - if (TREE_CODE (yyval.ttype) == CONST_DECL) - { - yyval.ttype = DECL_INITIAL (yyval.ttype); - /* This is to prevent an enum whose value is 0 - from being considered a null pointer constant. */ - yyval.ttype = build1 (NOP_EXPR, TREE_TYPE (yyval.ttype), yyval.ttype); - TREE_CONSTANT (yyval.ttype) = 1; - } + if (yychar == YYEMPTY) + yychar = YYLEX; + yyval.ttype = build_external_ref (yyvsp[0].ttype, yychar == '('); ; break;} case 89: -#line 676 "c-parse.y" +#line 582 "c-parse.y" { yyval.ttype = combine_strings (yyvsp[0].ttype); ; break;} case 90: -#line 678 "c-parse.y" +#line 584 "c-parse.y" { char class = TREE_CODE_CLASS (TREE_CODE (yyvsp[-1].ttype)); if (class == 'e' || class == '1' || class == '2' || class == '<') @@ -2347,11 +2253,11 @@ case 90: yyval.ttype = yyvsp[-1].ttype; ; break;} case 91: -#line 684 "c-parse.y" +#line 590 "c-parse.y" { yyval.ttype = error_mark_node; ; break;} case 92: -#line 686 "c-parse.y" +#line 592 "c-parse.y" { tree rtl_exp; if (pedantic) pedwarn ("ANSI C forbids braced-groups within expressions"); @@ -2376,7 +2282,7 @@ case 92: ; break;} case 93: -#line 709 "c-parse.y" +#line 615 "c-parse.y" { /* Make sure we call expand_end_stmt_expr. Otherwise we are likely to lose sequences and crash later. */ @@ -2387,21 +2293,21 @@ case 93: ; break;} case 94: -#line 718 "c-parse.y" +#line 624 "c-parse.y" { yyval.ttype = build_function_call (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 95: -#line 720 "c-parse.y" +#line 626 "c-parse.y" { yyval.ttype = build_array_ref (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 96: -#line 722 "c-parse.y" +#line 628 "c-parse.y" { yyval.ttype = build_component_ref (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 97: -#line 726 "c-parse.y" +#line 632 "c-parse.y" { tree expr = build_indirect_ref (yyvsp[-2].ttype, "->"); @@ -2409,57 +2315,57 @@ case 97: ; break;} case 98: -#line 732 "c-parse.y" +#line 638 "c-parse.y" { yyval.ttype = build_unary_op (POSTINCREMENT_EXPR, yyvsp[-1].ttype, 0); ; break;} case 99: -#line 734 "c-parse.y" +#line 640 "c-parse.y" { yyval.ttype = build_unary_op (POSTDECREMENT_EXPR, yyvsp[-1].ttype, 0); ; break;} case 101: -#line 741 "c-parse.y" +#line 647 "c-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); if (warn_traditional && !in_system_header) warning ("Use of ANSI string concatenation"); ; break;} case 104: -#line 753 "c-parse.y" +#line 659 "c-parse.y" { c_mark_varargs (); if (pedantic) pedwarn ("ANSI C does not permit use of `varargs.h'"); ; break;} case 105: -#line 763 "c-parse.y" +#line 669 "c-parse.y" { ; break;} case 110: -#line 779 "c-parse.y" +#line 685 "c-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 111: -#line 783 "c-parse.y" +#line 689 "c-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 112: -#line 787 "c-parse.y" +#line 693 "c-parse.y" { shadow_tag_warned (yyvsp[-1].ttype, 1); pedwarn ("empty declaration"); ; break;} case 113: -#line 790 "c-parse.y" +#line 696 "c-parse.y" { pedwarn ("empty declaration"); ; break;} case 114: -#line 799 "c-parse.y" +#line 705 "c-parse.y" { ; break;} case 119: -#line 814 "c-parse.y" +#line 720 "c-parse.y" { pending_xref_error (); declspec_stack = tree_cons (prefix_attributes, current_declspecs, @@ -2468,127 +2374,127 @@ case 119: ¤t_declspecs, &prefix_attributes); ; break;} case 120: -#line 824 "c-parse.y" +#line 730 "c-parse.y" { prefix_attributes = chainon (prefix_attributes, yyvsp[0].ttype); ; break;} case 121: -#line 829 "c-parse.y" +#line 735 "c-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 122: -#line 833 "c-parse.y" +#line 739 "c-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 123: -#line 837 "c-parse.y" +#line 743 "c-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 124: -#line 841 "c-parse.y" +#line 747 "c-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 125: -#line 845 "c-parse.y" +#line 751 "c-parse.y" { shadow_tag (yyvsp[-1].ttype); ; break;} case 126: -#line 847 "c-parse.y" +#line 753 "c-parse.y" { pedwarn ("empty declaration"); ; break;} case 127: -#line 849 "c-parse.y" +#line 755 "c-parse.y" { RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ; break;} case 128: -#line 859 "c-parse.y" +#line 765 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 129: -#line 861 "c-parse.y" +#line 767 "c-parse.y" { yyval.ttype = chainon (yyvsp[0].ttype, tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[-2].ttype)); ; break;} case 130: -#line 865 "c-parse.y" +#line 771 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 131: -#line 867 "c-parse.y" +#line 773 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 132: -#line 869 "c-parse.y" +#line 775 "c-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 133: -#line 874 "c-parse.y" +#line 780 "c-parse.y" { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ; break;} case 134: -#line 879 "c-parse.y" +#line 785 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 135: -#line 881 "c-parse.y" +#line 787 "c-parse.y" { yyval.ttype = chainon (yyvsp[0].ttype, tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[-2].ttype)); ; break;} case 136: -#line 886 "c-parse.y" +#line 792 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 137: -#line 888 "c-parse.y" +#line 794 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 138: -#line 890 "c-parse.y" +#line 796 "c-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 903 "c-parse.y" +#line 809 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 140: -#line 905 "c-parse.y" +#line 811 "c-parse.y" { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, NULL_TREE); ; break;} case 141: -#line 907 "c-parse.y" +#line 813 "c-parse.y" { yyval.ttype = chainon (yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 142: -#line 909 "c-parse.y" +#line 815 "c-parse.y" { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ; break;} case 143: -#line 914 "c-parse.y" +#line 820 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); TREE_STATIC (yyval.ttype) = 1; ; break;} case 144: -#line 917 "c-parse.y" +#line 823 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} case 145: -#line 919 "c-parse.y" +#line 825 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); TREE_STATIC (yyval.ttype) = 1; ; break;} case 146: -#line 922 "c-parse.y" +#line 828 "c-parse.y" { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); @@ -2596,176 +2502,176 @@ case 146: TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; break;} case 147: -#line 936 "c-parse.y" +#line 842 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 148: -#line 938 "c-parse.y" +#line 844 "c-parse.y" { yyval.ttype = chainon (yyvsp[0].ttype, tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[-2].ttype)); ; break;} case 149: -#line 942 "c-parse.y" +#line 848 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 150: -#line 944 "c-parse.y" +#line 850 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 153: -#line 954 "c-parse.y" +#line 860 "c-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 154: -#line 958 "c-parse.y" +#line 864 "c-parse.y" { yyval.ttype = TREE_TYPE (yyvsp[-1].ttype); ; break;} case 155: -#line 960 "c-parse.y" +#line 866 "c-parse.y" { yyval.ttype = groktypename (yyvsp[-1].ttype); ; break;} case 163: -#line 982 "c-parse.y" +#line 888 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 164: -#line 984 "c-parse.y" +#line 890 "c-parse.y" { if (TREE_CHAIN (yyvsp[-1].ttype)) yyvsp[-1].ttype = combine_strings (yyvsp[-1].ttype); yyval.ttype = yyvsp[-1].ttype; ; break;} case 165: -#line 991 "c-parse.y" +#line 897 "c-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 166: -#line 996 "c-parse.y" +#line 902 "c-parse.y" { finish_init (); finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype); ; break;} case 167: -#line 999 "c-parse.y" +#line 905 "c-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 168: -#line 1007 "c-parse.y" +#line 913 "c-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 169: -#line 1012 "c-parse.y" +#line 918 "c-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 170: -#line 1016 "c-parse.y" +#line 922 "c-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 171: -#line 1024 "c-parse.y" +#line 930 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 172: -#line 1026 "c-parse.y" +#line 932 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 173: -#line 1031 "c-parse.y" +#line 937 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 174: -#line 1033 "c-parse.y" +#line 939 "c-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 175: -#line 1038 "c-parse.y" +#line 944 "c-parse.y" { yyval.ttype = yyvsp[-2].ttype; ; break;} case 176: -#line 1043 "c-parse.y" +#line 949 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 177: -#line 1045 "c-parse.y" +#line 951 "c-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 178: -#line 1050 "c-parse.y" +#line 956 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 179: -#line 1052 "c-parse.y" +#line 958 "c-parse.y" { yyval.ttype = build_tree_list (yyvsp[0].ttype, NULL_TREE); ; break;} case 180: -#line 1054 "c-parse.y" +#line 960 "c-parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, build_tree_list (NULL_TREE, yyvsp[-1].ttype)); ; break;} case 181: -#line 1056 "c-parse.y" +#line 962 "c-parse.y" { yyval.ttype = build_tree_list (yyvsp[-5].ttype, tree_cons (NULL_TREE, yyvsp[-3].ttype, yyvsp[-1].ttype)); ; break;} case 182: -#line 1058 "c-parse.y" +#line 964 "c-parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 188: -#line 1076 "c-parse.y" +#line 982 "c-parse.y" { really_start_incremental_init (NULL_TREE); ; break;} case 189: -#line 1078 "c-parse.y" +#line 984 "c-parse.y" { yyval.ttype = pop_init_level (0); ; break;} case 190: -#line 1080 "c-parse.y" +#line 986 "c-parse.y" { yyval.ttype = error_mark_node; ; break;} case 191: -#line 1086 "c-parse.y" +#line 992 "c-parse.y" { if (pedantic) pedwarn ("ANSI C forbids empty initializer braces"); ; break;} case 197: -#line 1102 "c-parse.y" +#line 1008 "c-parse.y" { set_init_label (yyvsp[-1].ttype); ; break;} case 200: -#line 1109 "c-parse.y" +#line 1015 "c-parse.y" { push_init_level (0); ; break;} case 201: -#line 1111 "c-parse.y" +#line 1017 "c-parse.y" { process_init_element (pop_init_level (0)); ; break;} case 202: -#line 1113 "c-parse.y" +#line 1019 "c-parse.y" { process_init_element (yyvsp[0].ttype); ; break;} case 206: -#line 1124 "c-parse.y" +#line 1030 "c-parse.y" { set_init_label (yyvsp[0].ttype); ; break;} case 207: -#line 1129 "c-parse.y" +#line 1035 "c-parse.y" { set_init_index (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 208: -#line 1131 "c-parse.y" +#line 1037 "c-parse.y" { set_init_index (yyvsp[-1].ttype, NULL_TREE); ; break;} case 209: -#line 1136 "c-parse.y" +#line 1042 "c-parse.y" { if (pedantic) pedwarn ("ANSI C forbids nested functions"); @@ -2779,16 +2685,16 @@ case 209: reinit_parse_for_function (); ; break;} case 210: -#line 1148 "c-parse.y" +#line 1054 "c-parse.y" { store_parm_decls (); ; break;} case 211: -#line 1156 "c-parse.y" +#line 1062 "c-parse.y" { finish_function (1); pop_function_context (); ; break;} case 212: -#line 1162 "c-parse.y" +#line 1068 "c-parse.y" { if (pedantic) pedwarn ("ANSI C forbids nested functions"); @@ -2802,216 +2708,216 @@ case 212: reinit_parse_for_function (); ; break;} case 213: -#line 1174 "c-parse.y" +#line 1080 "c-parse.y" { store_parm_decls (); ; break;} case 214: -#line 1182 "c-parse.y" +#line 1088 "c-parse.y" { finish_function (1); pop_function_context (); ; break;} case 217: -#line 1198 "c-parse.y" +#line 1104 "c-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 218: -#line 1200 "c-parse.y" +#line 1106 "c-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 219: -#line 1205 "c-parse.y" +#line 1111 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 220: -#line 1207 "c-parse.y" +#line 1113 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} case 221: -#line 1209 "c-parse.y" +#line 1115 "c-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 222: -#line 1216 "c-parse.y" +#line 1122 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 224: -#line 1227 "c-parse.y" +#line 1133 "c-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 225: -#line 1232 "c-parse.y" +#line 1138 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, NULL_TREE); if (! flag_isoc99) error ("`[*]' in parameter declaration only allowed in ISO C 99"); ; break;} case 226: -#line 1237 "c-parse.y" +#line 1143 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 227: -#line 1239 "c-parse.y" +#line 1145 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} case 228: -#line 1241 "c-parse.y" +#line 1147 "c-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 229: -#line 1248 "c-parse.y" +#line 1154 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 231: -#line 1257 "c-parse.y" +#line 1163 "c-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 232: -#line 1262 "c-parse.y" +#line 1168 "c-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 233: -#line 1264 "c-parse.y" +#line 1170 "c-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 234: -#line 1266 "c-parse.y" +#line 1172 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, NULL_TREE); if (! flag_isoc99) error ("`[*]' in parameter declaration only allowed in ISO C 99"); ; break;} case 235: -#line 1271 "c-parse.y" +#line 1177 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 236: -#line 1273 "c-parse.y" +#line 1179 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} case 237: -#line 1280 "c-parse.y" +#line 1186 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 239: -#line 1286 "c-parse.y" +#line 1192 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 240: -#line 1288 "c-parse.y" +#line 1194 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 241: -#line 1293 "c-parse.y" +#line 1199 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 242: -#line 1295 "c-parse.y" +#line 1201 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 243: -#line 1300 "c-parse.y" +#line 1206 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 244: -#line 1302 "c-parse.y" +#line 1208 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 245: -#line 1307 "c-parse.y" +#line 1213 "c-parse.y" { yyval.ttype = start_struct (RECORD_TYPE, yyvsp[-1].ttype); /* Start scope of tag before parsing components. */ ; break;} case 246: -#line 1311 "c-parse.y" +#line 1217 "c-parse.y" { yyval.ttype = finish_struct (yyvsp[-3].ttype, yyvsp[-2].ttype, chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ; break;} case 247: -#line 1313 "c-parse.y" +#line 1219 "c-parse.y" { yyval.ttype = finish_struct (start_struct (RECORD_TYPE, NULL_TREE), yyvsp[-2].ttype, chainon (yyvsp[-4].ttype, yyvsp[0].ttype)); ; break;} case 248: -#line 1317 "c-parse.y" +#line 1223 "c-parse.y" { yyval.ttype = xref_tag (RECORD_TYPE, yyvsp[0].ttype); ; break;} case 249: -#line 1319 "c-parse.y" +#line 1225 "c-parse.y" { yyval.ttype = start_struct (UNION_TYPE, yyvsp[-1].ttype); ; break;} case 250: -#line 1321 "c-parse.y" +#line 1227 "c-parse.y" { yyval.ttype = finish_struct (yyvsp[-3].ttype, yyvsp[-2].ttype, chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ; break;} case 251: -#line 1323 "c-parse.y" +#line 1229 "c-parse.y" { yyval.ttype = finish_struct (start_struct (UNION_TYPE, NULL_TREE), yyvsp[-2].ttype, chainon (yyvsp[-4].ttype, yyvsp[0].ttype)); ; break;} case 252: -#line 1327 "c-parse.y" +#line 1233 "c-parse.y" { yyval.ttype = xref_tag (UNION_TYPE, yyvsp[0].ttype); ; break;} case 253: -#line 1329 "c-parse.y" +#line 1235 "c-parse.y" { yyval.ttype = start_enum (yyvsp[-1].ttype); ; break;} case 254: -#line 1331 "c-parse.y" +#line 1237 "c-parse.y" { yyval.ttype = finish_enum (yyvsp[-4].ttype, nreverse (yyvsp[-3].ttype), chainon (yyvsp[-7].ttype, yyvsp[0].ttype)); ; break;} case 255: -#line 1334 "c-parse.y" +#line 1240 "c-parse.y" { yyval.ttype = start_enum (NULL_TREE); ; break;} case 256: -#line 1336 "c-parse.y" +#line 1242 "c-parse.y" { yyval.ttype = finish_enum (yyvsp[-4].ttype, nreverse (yyvsp[-3].ttype), chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ; break;} case 257: -#line 1339 "c-parse.y" +#line 1245 "c-parse.y" { yyval.ttype = xref_tag (ENUMERAL_TYPE, yyvsp[0].ttype); ; break;} case 261: -#line 1350 "c-parse.y" +#line 1256 "c-parse.y" { if (pedantic && ! flag_isoc99) pedwarn ("comma at end of enumerator list"); ; break;} case 262: -#line 1356 "c-parse.y" +#line 1262 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 263: -#line 1358 "c-parse.y" +#line 1264 "c-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); pedwarn ("no semicolon at end of struct or union"); ; break;} case 264: -#line 1363 "c-parse.y" +#line 1269 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 265: -#line 1365 "c-parse.y" +#line 1271 "c-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[-1].ttype); ; break;} case 266: -#line 1367 "c-parse.y" +#line 1273 "c-parse.y" { if (pedantic) pedwarn ("extra semicolon in struct or union specified"); ; break;} case 267: -#line 1382 "c-parse.y" +#line 1288 "c-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 268: -#line 1387 "c-parse.y" +#line 1293 "c-parse.y" { /* Support for unnamed structs or unions as members of structs or unions (which is [a] useful and [b] supports @@ -3026,151 +2932,151 @@ case 268: ; break;} case 269: -#line 1400 "c-parse.y" +#line 1306 "c-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 270: -#line 1405 "c-parse.y" +#line 1311 "c-parse.y" { if (pedantic) pedwarn ("ANSI C forbids member declarations with no members"); shadow_tag(yyvsp[0].ttype); yyval.ttype = NULL_TREE; ; break;} case 271: -#line 1410 "c-parse.y" +#line 1316 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 272: -#line 1412 "c-parse.y" +#line 1318 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ; break;} case 274: -#line 1419 "c-parse.y" +#line 1325 "c-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 275: -#line 1424 "c-parse.y" +#line 1330 "c-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 276: -#line 1428 "c-parse.y" +#line 1334 "c-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 277: -#line 1431 "c-parse.y" +#line 1337 "c-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 279: -#line 1443 "c-parse.y" +#line 1349 "c-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 280: -#line 1448 "c-parse.y" +#line 1354 "c-parse.y" { yyval.ttype = error_mark_node; ; break;} case 281: -#line 1454 "c-parse.y" +#line 1360 "c-parse.y" { yyval.ttype = build_enumerator (yyvsp[0].ttype, NULL_TREE); ; break;} case 282: -#line 1456 "c-parse.y" +#line 1362 "c-parse.y" { yyval.ttype = build_enumerator (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 283: -#line 1461 "c-parse.y" +#line 1367 "c-parse.y" { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 284: -#line 1463 "c-parse.y" +#line 1369 "c-parse.y" { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 285: -#line 1468 "c-parse.y" +#line 1374 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 287: -#line 1474 "c-parse.y" +#line 1380 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} case 288: -#line 1476 "c-parse.y" +#line 1382 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 289: -#line 1481 "c-parse.y" +#line 1387 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 290: -#line 1483 "c-parse.y" +#line 1389 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 291: -#line 1488 "c-parse.y" +#line 1394 "c-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 292: -#line 1491 "c-parse.y" +#line 1397 "c-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 293: -#line 1493 "c-parse.y" +#line 1399 "c-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); ; break;} case 294: -#line 1495 "c-parse.y" +#line 1401 "c-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 295: -#line 1497 "c-parse.y" +#line 1403 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 296: -#line 1499 "c-parse.y" +#line 1405 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} case 297: -#line 1501 "c-parse.y" +#line 1407 "c-parse.y" { yyval.ttype = build_nt (CALL_EXPR, NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} case 298: -#line 1503 "c-parse.y" +#line 1409 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, NULL_TREE, yyvsp[-1].ttype); ; break;} case 299: -#line 1505 "c-parse.y" +#line 1411 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, NULL_TREE, NULL_TREE); ; break;} case 300: -#line 1509 "c-parse.y" +#line 1415 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 301: -#line 1518 "c-parse.y" +#line 1424 "c-parse.y" { if (pedantic && yyvsp[0].ends_in_label) pedwarn ("ANSI C forbids label at end of compound statement"); ; break;} case 303: -#line 1527 "c-parse.y" +#line 1433 "c-parse.y" { yyval.ends_in_label = yyvsp[0].ends_in_label; ; break;} case 304: -#line 1529 "c-parse.y" +#line 1435 "c-parse.y" { yyval.ends_in_label = 0; ; break;} case 308: -#line 1541 "c-parse.y" +#line 1447 "c-parse.y" { emit_line_note (input_filename, lineno); pushlevel (0); clear_last_expr (); @@ -3178,12 +3084,12 @@ case 308: ; break;} case 310: -#line 1553 "c-parse.y" +#line 1459 "c-parse.y" { if (pedantic) pedwarn ("ANSI C forbids label declarations"); ; break;} case 313: -#line 1564 "c-parse.y" +#line 1470 "c-parse.y" { tree link; for (link = yyvsp[-1].ttype; link; link = TREE_CHAIN (link)) { @@ -3194,37 +3100,37 @@ case 313: ; break;} case 314: -#line 1578 "c-parse.y" +#line 1484 "c-parse.y" {; break;} case 316: -#line 1582 "c-parse.y" +#line 1488 "c-parse.y" { compstmt_count++; ; break;} case 317: -#line 1585 "c-parse.y" +#line 1491 "c-parse.y" { yyval.ttype = convert (void_type_node, integer_zero_node); ; break;} case 318: -#line 1587 "c-parse.y" +#line 1493 "c-parse.y" { emit_line_note (input_filename, lineno); expand_end_bindings (getdecls (), 1, 0); yyval.ttype = poplevel (1, 1, 0); ; break;} case 319: -#line 1591 "c-parse.y" +#line 1497 "c-parse.y" { emit_line_note (input_filename, lineno); expand_end_bindings (getdecls (), kept_level_p (), 0); yyval.ttype = poplevel (kept_level_p (), 0, 0); ; break;} case 320: -#line 1595 "c-parse.y" +#line 1501 "c-parse.y" { emit_line_note (input_filename, lineno); expand_end_bindings (getdecls (), kept_level_p (), 0); yyval.ttype = poplevel (kept_level_p (), 0, 0); ; break;} case 321: -#line 1602 "c-parse.y" +#line 1508 "c-parse.y" { if (current_function_decl == 0) { error ("braced-group within expression allowed only inside a function"); @@ -3242,11 +3148,11 @@ case 321: ; break;} case 322: -#line 1619 "c-parse.y" +#line 1525 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 325: -#line 1633 "c-parse.y" +#line 1539 "c-parse.y" { emit_line_note (yyvsp[-5].filename, yyvsp[-4].lineno); c_expand_start_cond (truthvalue_conversion (yyvsp[-1].ttype), 0, compstmt_count); @@ -3256,7 +3162,7 @@ case 325: position_after_white_space (); ; break;} case 326: -#line 1647 "c-parse.y" +#line 1553 "c-parse.y" { stmt_count++; compstmt_count++; emit_line_note (yyvsp[-2].filename, yyvsp[-1].lineno); @@ -3266,43 +3172,43 @@ case 326: position_after_white_space (); ; break;} case 327: -#line 1655 "c-parse.y" +#line 1561 "c-parse.y" { expand_loop_continue_here (); ; break;} case 328: -#line 1659 "c-parse.y" +#line 1565 "c-parse.y" { yyval.filename = input_filename; ; break;} case 329: -#line 1663 "c-parse.y" +#line 1569 "c-parse.y" { yyval.lineno = lineno; ; break;} case 330: -#line 1668 "c-parse.y" +#line 1574 "c-parse.y" { ; break;} case 331: -#line 1673 "c-parse.y" +#line 1579 "c-parse.y" { ; break;} case 332: -#line 1678 "c-parse.y" +#line 1584 "c-parse.y" { yyval.ends_in_label = yyvsp[0].ends_in_label; ; break;} case 333: -#line 1683 "c-parse.y" +#line 1589 "c-parse.y" { yyval.ends_in_label = 0; ; break;} case 334: -#line 1685 "c-parse.y" +#line 1591 "c-parse.y" { yyval.ends_in_label = 1; ; break;} case 335: -#line 1691 "c-parse.y" +#line 1597 "c-parse.y" { stmt_count++; ; break;} case 337: -#line 1694 "c-parse.y" +#line 1600 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-3].filename, yyvsp[-2].lineno); /* It appears that this should not be done--that a non-lvalue array @@ -3320,19 +3226,19 @@ case 337: iterator_expand (yyvsp[-1].ttype); ; break;} case 338: -#line 1710 "c-parse.y" +#line 1616 "c-parse.y" { c_expand_start_else (); yyvsp[-1].itype = stmt_count; position_after_white_space (); ; break;} case 339: -#line 1714 "c-parse.y" +#line 1620 "c-parse.y" { c_expand_end_cond (); if (extra_warnings && stmt_count == yyvsp[-3].itype) warning ("empty body in an else-statement"); ; break;} case 340: -#line 1718 "c-parse.y" +#line 1624 "c-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 @@ -3343,11 +3249,11 @@ case 340: "empty body in an if-statement"); ; break;} case 341: -#line 1730 "c-parse.y" +#line 1636 "c-parse.y" { c_expand_end_cond (); ; break;} case 342: -#line 1732 "c-parse.y" +#line 1638 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-2].filename, yyvsp[-1].lineno); /* The emit_nop used to come before emit_line_note, @@ -3359,7 +3265,7 @@ case 342: emit_nop (); ; break;} case 343: -#line 1742 "c-parse.y" +#line 1648 "c-parse.y" { /* Don't start the loop till we have succeeded in parsing the end test. This is to make sure that we end every loop we start. */ @@ -3370,22 +3276,22 @@ case 343: position_after_white_space (); ; break;} case 344: -#line 1751 "c-parse.y" +#line 1657 "c-parse.y" { expand_end_loop (); ; break;} case 345: -#line 1754 "c-parse.y" +#line 1660 "c-parse.y" { emit_line_note (input_filename, lineno); expand_exit_loop_if_false (NULL_PTR, truthvalue_conversion (yyvsp[-2].ttype)); expand_end_loop (); ; break;} case 346: -#line 1760 "c-parse.y" +#line 1666 "c-parse.y" { expand_end_loop (); ; break;} case 347: -#line 1763 "c-parse.y" +#line 1669 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-5].filename, yyvsp[-4].lineno); /* See comment in `while' alternative, above. */ @@ -3398,12 +3304,12 @@ case 347: ; break;} case 348: -#line 1775 "c-parse.y" +#line 1681 "c-parse.y" { yyvsp[0].lineno = lineno; yyval.filename = input_filename; ; break;} case 349: -#line 1778 "c-parse.y" +#line 1684 "c-parse.y" { /* Start the loop. Doing this after parsing all the expressions ensures we will end the loop. */ @@ -3418,7 +3324,7 @@ case 349: position_after_white_space (); ; break;} case 350: -#line 1791 "c-parse.y" +#line 1697 "c-parse.y" { /* Emit the increment expression, with a line number. */ emit_line_note (yyvsp[-4].filename, yyvsp[-5].lineno); expand_loop_continue_here (); @@ -3427,44 +3333,44 @@ case 350: expand_end_loop (); ; break;} case 351: -#line 1798 "c-parse.y" +#line 1704 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-5].filename, yyvsp[-4].lineno); c_expand_start_case (yyvsp[-1].ttype); position_after_white_space (); ; break;} case 352: -#line 1803 "c-parse.y" +#line 1709 "c-parse.y" { expand_end_case (yyvsp[-3].ttype); ; break;} case 353: -#line 1805 "c-parse.y" +#line 1711 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-3].filename, yyvsp[-2].lineno); if ( ! expand_exit_something ()) error ("break statement not within loop or switch"); ; break;} case 354: -#line 1810 "c-parse.y" +#line 1716 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-3].filename, yyvsp[-2].lineno); if (! expand_continue_loop (NULL_PTR)) error ("continue statement not within a loop"); ; break;} case 355: -#line 1815 "c-parse.y" +#line 1721 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-3].filename, yyvsp[-2].lineno); c_expand_return (NULL_TREE); ; break;} case 356: -#line 1819 "c-parse.y" +#line 1725 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-4].filename, yyvsp[-3].lineno); c_expand_return (yyvsp[-1].ttype); ; break;} case 357: -#line 1823 "c-parse.y" +#line 1729 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-7].filename, yyvsp[-6].lineno); STRIP_NOPS (yyvsp[-2].ttype); @@ -3476,7 +3382,7 @@ case 357: error ("argument of `asm' is not a constant string"); ; break;} case 358: -#line 1834 "c-parse.y" +#line 1740 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-9].filename, yyvsp[-8].lineno); c_expand_asm_operands (yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE, NULL_TREE, @@ -3484,7 +3390,7 @@ case 358: input_filename, lineno); ; break;} case 359: -#line 1841 "c-parse.y" +#line 1747 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-11].filename, yyvsp[-10].lineno); c_expand_asm_operands (yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE, @@ -3492,7 +3398,7 @@ case 359: input_filename, lineno); ; break;} case 360: -#line 1849 "c-parse.y" +#line 1755 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-13].filename, yyvsp[-12].lineno); c_expand_asm_operands (yyvsp[-8].ttype, yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype, @@ -3500,7 +3406,7 @@ case 360: input_filename, lineno); ; break;} case 361: -#line 1855 "c-parse.y" +#line 1761 "c-parse.y" { tree decl; stmt_count++; emit_line_note (yyvsp[-4].filename, yyvsp[-3].lineno); @@ -3513,7 +3419,7 @@ case 361: ; break;} case 362: -#line 1866 "c-parse.y" +#line 1772 "c-parse.y" { if (pedantic) pedwarn ("ANSI C forbids `goto *expr;'"); stmt_count++; @@ -3521,7 +3427,7 @@ case 362: expand_computed_goto (convert (ptr_type_node, yyvsp[-1].ttype)); ; break;} case 365: -#line 1881 "c-parse.y" +#line 1787 "c-parse.y" { /* The value returned by this action is */ /* 1 if everything is OK */ @@ -3544,14 +3450,14 @@ case 365: ; break;} case 366: -#line 1902 "c-parse.y" +#line 1808 "c-parse.y" { if (yyvsp[-1].itype) iterator_for_loop_end (yyvsp[-3].ttype); ; break;} case 367: -#line 1933 "c-parse.y" +#line 1839 "c-parse.y" { register tree value = check_case_value (yyvsp[-1].ttype); register tree label = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE); @@ -3584,7 +3490,7 @@ case 367: position_after_white_space (); ; break;} case 368: -#line 1964 "c-parse.y" +#line 1870 "c-parse.y" { register tree value1 = check_case_value (yyvsp[-3].ttype); register tree value2 = check_case_value (yyvsp[-1].ttype); register tree label @@ -3617,7 +3523,7 @@ case 368: position_after_white_space (); ; break;} case 369: -#line 1995 "c-parse.y" +#line 1901 "c-parse.y" { tree duplicate; register tree label @@ -3634,7 +3540,7 @@ case 369: position_after_white_space (); ; break;} case 370: -#line 2010 "c-parse.y" +#line 1916 "c-parse.y" { tree label = define_label (input_filename, lineno, yyvsp[-2].ttype); stmt_count++; emit_nop (); @@ -3646,52 +3552,52 @@ case 370: position_after_white_space (); ; break;} case 371: -#line 2025 "c-parse.y" +#line 1931 "c-parse.y" { emit_line_note (input_filename, lineno); yyval.ttype = NULL_TREE; ; break;} case 372: -#line 2028 "c-parse.y" +#line 1934 "c-parse.y" { emit_line_note (input_filename, lineno); ; break;} case 373: -#line 2033 "c-parse.y" +#line 1939 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 375: -#line 2040 "c-parse.y" +#line 1946 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 378: -#line 2047 "c-parse.y" +#line 1953 "c-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 379: -#line 2052 "c-parse.y" +#line 1958 "c-parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 380: -#line 2057 "c-parse.y" +#line 1963 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, combine_strings (yyvsp[0].ttype), NULL_TREE); ; break;} case 381: -#line 2059 "c-parse.y" +#line 1965 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, combine_strings (yyvsp[0].ttype), yyvsp[-2].ttype); ; break;} case 382: -#line 2065 "c-parse.y" +#line 1971 "c-parse.y" { pushlevel (0); clear_parm_order (); declare_parm_level (0); ; break;} case 383: -#line 2069 "c-parse.y" +#line 1975 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; parmlist_tags_warning (); poplevel (0, 0, 0); ; break;} case 385: -#line 2077 "c-parse.y" +#line 1983 "c-parse.y" { tree parm; if (pedantic) pedwarn ("ANSI C forbids forward parameter declarations"); @@ -3701,19 +3607,19 @@ case 385: clear_parm_order (); ; break;} case 386: -#line 2085 "c-parse.y" +#line 1991 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 387: -#line 2087 "c-parse.y" +#line 1993 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, NULL_TREE); ; break;} case 388: -#line 2093 "c-parse.y" +#line 1999 "c-parse.y" { yyval.ttype = get_parm_info (0); ; break;} case 389: -#line 2095 "c-parse.y" +#line 2001 "c-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. @@ -3725,23 +3631,23 @@ case 389: ; break;} case 390: -#line 2105 "c-parse.y" +#line 2011 "c-parse.y" { yyval.ttype = get_parm_info (1); ; break;} case 391: -#line 2107 "c-parse.y" +#line 2013 "c-parse.y" { yyval.ttype = get_parm_info (0); ; break;} case 392: -#line 2112 "c-parse.y" +#line 2018 "c-parse.y" { push_parm_decl (yyvsp[0].ttype); ; break;} case 393: -#line 2114 "c-parse.y" +#line 2020 "c-parse.y" { push_parm_decl (yyvsp[0].ttype); ; break;} case 394: -#line 2121 "c-parse.y" +#line 2027 "c-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -3751,7 +3657,7 @@ case 394: declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 395: -#line 2129 "c-parse.y" +#line 2035 "c-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -3761,7 +3667,7 @@ case 395: declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 396: -#line 2137 "c-parse.y" +#line 2043 "c-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -3771,7 +3677,7 @@ case 396: declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 397: -#line 2145 "c-parse.y" +#line 2051 "c-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -3781,7 +3687,7 @@ case 397: declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 398: -#line 2154 "c-parse.y" +#line 2060 "c-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -3791,19 +3697,19 @@ case 398: declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 399: -#line 2167 "c-parse.y" +#line 2073 "c-parse.y" { pushlevel (0); clear_parm_order (); declare_parm_level (1); ; break;} case 400: -#line 2171 "c-parse.y" +#line 2077 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; parmlist_tags_warning (); poplevel (0, 0, 0); ; break;} case 402: -#line 2179 "c-parse.y" +#line 2085 "c-parse.y" { tree t; for (t = yyvsp[-1].ttype; t; t = TREE_CHAIN (t)) if (TREE_VALUE (t) == NULL_TREE) @@ -3811,30 +3717,30 @@ case 402: yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, yyvsp[-1].ttype); ; break;} case 403: -#line 2189 "c-parse.y" +#line 2095 "c-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} case 404: -#line 2191 "c-parse.y" +#line 2097 "c-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} case 405: -#line 2197 "c-parse.y" +#line 2103 "c-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} case 406: -#line 2199 "c-parse.y" +#line 2105 "c-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} case 407: -#line 2204 "c-parse.y" +#line 2110 "c-parse.y" { yyval.ttype = SAVE_WARN_FLAGS(); pedantic = 0; warn_pointer_arith = 0; ; break;} } /* the action file gets copied in in place of this dollarsign */ -#line 543 "/usr/lib/bison.simple" +#line 543 "/usr/share/misc/bison.simple" yyvsp -= yylen; yyssp -= yylen; @@ -4054,5 +3960,5 @@ yyerrhandle: } return 1; } -#line 2209 "c-parse.y" +#line 2115 "c-parse.y" diff --git a/gcc/c-parse.in b/gcc/c-parse.in index aa547511cfb..7efe9cd6b20 100644 --- a/gcc/c-parse.in +++ b/gcc/c-parse.in @@ -226,9 +226,6 @@ static tree prefix_attributes = NULL_TREE; /* Stack of saved values of current_declspecs and prefix_attributes. */ static tree declspec_stack; -/* 1 if we explained undeclared var errors. */ -static int undeclared_variable_notice; - /* For __extension__, save/restore the warning flags which are controlled by __extension__. */ #define SAVE_WARN_FLAGS() \ @@ -628,169 +625,9 @@ expr_no_commas: primary: IDENTIFIER { - $$ = lastiddecl; - if (!$$ || $$ == error_mark_node) - { - if (yychar == YYEMPTY) - yychar = YYLEX; - if (yychar == '(') - { -ifobjc - tree decl; - - if (objc_receiver_context - && ! (objc_receiver_context - && strcmp (IDENTIFIER_POINTER ($1), "super"))) - /* we have a message to super */ - $$ = get_super_receiver (); - else if (objc_method_context - && (decl = is_ivar (objc_ivar_chain, $1))) - { - if (is_private (decl)) - $$ = error_mark_node; - else - $$ = build_ivar_reference ($1); - } - else -end ifobjc - { - /* Ordinary implicit function declaration. */ - $$ = implicitly_declare ($1); - assemble_external ($$); - TREE_USED ($$) = 1; - } - } - else if (current_function_decl == 0) - { - error ("`%s' undeclared here (not in a function)", - IDENTIFIER_POINTER ($1)); - $$ = error_mark_node; - } - else - { -ifobjc - tree decl; - - if (objc_receiver_context - && ! strcmp (IDENTIFIER_POINTER ($1), "super")) - /* we have a message to super */ - $$ = get_super_receiver (); - else if (objc_method_context - && (decl = is_ivar (objc_ivar_chain, $1))) - { - if (is_private (decl)) - $$ = error_mark_node; - else - $$ = build_ivar_reference ($1); - } - else -end ifobjc - { - if (IDENTIFIER_GLOBAL_VALUE ($1) != error_mark_node - || IDENTIFIER_ERROR_LOCUS ($1) != current_function_decl) - { - error ("`%s' undeclared (first use in this function)", - IDENTIFIER_POINTER ($1)); - - if (! undeclared_variable_notice) - { - error ("(Each undeclared identifier is reported only once"); - error ("for each function it appears in.)"); - undeclared_variable_notice = 1; - } - } - $$ = error_mark_node; - /* Prevent repeated error messages. */ - IDENTIFIER_GLOBAL_VALUE ($1) = error_mark_node; - IDENTIFIER_ERROR_LOCUS ($1) = current_function_decl; - } - } - } - else if (TREE_TYPE ($$) == error_mark_node) - $$ = error_mark_node; - else if (C_DECL_ANTICIPATED ($$)) - { - /* The first time we see a build-in function used, - if it has not been declared. */ - C_DECL_ANTICIPATED ($$) = 0; - if (yychar == YYEMPTY) - yychar = YYLEX; - if (yychar == '(') - { - /* Omit the implicit declaration we - would ordinarily do, so we don't lose - the actual built in type. - But print a diagnostic for the mismatch. */ -ifobjc - if (objc_method_context - && is_ivar (objc_ivar_chain, $1)) - error ("Instance variable `%s' implicitly declared as function", - IDENTIFIER_POINTER (DECL_NAME ($$))); - else -end ifobjc - if (TREE_CODE ($$) != FUNCTION_DECL) - error ("`%s' implicitly declared as function", - IDENTIFIER_POINTER (DECL_NAME ($$))); - else if ((TYPE_MODE (TREE_TYPE (TREE_TYPE ($$))) - != TYPE_MODE (integer_type_node)) - && !VOID_TYPE_P (TREE_TYPE (TREE_TYPE ($$)))) - pedwarn ("type mismatch in implicit declaration for built-in function `%s'", - IDENTIFIER_POINTER (DECL_NAME ($$))); - /* If it really returns void, change that to int. */ - if (TREE_TYPE (TREE_TYPE ($$)) == void_type_node) - TREE_TYPE ($$) - = build_function_type (integer_type_node, - TYPE_ARG_TYPES (TREE_TYPE ($$))); - } - else - pedwarn ("built-in function `%s' used without declaration", - IDENTIFIER_POINTER (DECL_NAME ($$))); - - /* Do what we would ordinarily do when a fn is used. */ - assemble_external ($$); - TREE_USED ($$) = 1; - } - else - { - assemble_external ($$); - TREE_USED ($$) = 1; -ifobjc - /* we have a definition - still check if iVariable */ - - if (!objc_receiver_context - || (objc_receiver_context - && strcmp (IDENTIFIER_POINTER ($1), "super"))) - { - tree decl; - - if (objc_method_context - && (decl = is_ivar (objc_ivar_chain, $1))) - { - if (IDENTIFIER_LOCAL_VALUE ($1)) - warning ("local declaration of `%s' hides instance variable", - IDENTIFIER_POINTER ($1)); - else - { - if (is_private (decl)) - $$ = error_mark_node; - else - $$ = build_ivar_reference ($1); - } - } - } - else /* we have a message to super */ - $$ = get_super_receiver (); -end ifobjc - } - - if (TREE_CODE ($$) == CONST_DECL) - { - $$ = DECL_INITIAL ($$); - /* This is to prevent an enum whose value is 0 - from being considered a null pointer constant. */ - $$ = build1 (NOP_EXPR, TREE_TYPE ($$), $$); - TREE_CONSTANT ($$) = 1; - } + if (yychar == YYEMPTY) + yychar = YYLEX; + $$ = build_external_ref ($1, yychar == '('); } | CONSTANT | string diff --git a/gcc/c-parse.y b/gcc/c-parse.y index e86cbda0c3d..e7c1d880e66 100644 --- a/gcc/c-parse.y +++ b/gcc/c-parse.y @@ -201,9 +201,6 @@ static tree prefix_attributes = NULL_TREE; /* Stack of saved values of current_declspecs and prefix_attributes. */ static tree declspec_stack; -/* 1 if we explained undeclared var errors. */ -static int undeclared_variable_notice; - /* For __extension__, save/restore the warning flags which are controlled by __extension__. */ #define SAVE_WARN_FLAGS() \ @@ -576,100 +573,9 @@ expr_no_commas: primary: IDENTIFIER { - $$ = lastiddecl; - if (!$$ || $$ == error_mark_node) - { - if (yychar == YYEMPTY) - yychar = YYLEX; - if (yychar == '(') - { - { - /* Ordinary implicit function declaration. */ - $$ = implicitly_declare ($1); - assemble_external ($$); - TREE_USED ($$) = 1; - } - } - else if (current_function_decl == 0) - { - error ("`%s' undeclared here (not in a function)", - IDENTIFIER_POINTER ($1)); - $$ = error_mark_node; - } - else - { - { - if (IDENTIFIER_GLOBAL_VALUE ($1) != error_mark_node - || IDENTIFIER_ERROR_LOCUS ($1) != current_function_decl) - { - error ("`%s' undeclared (first use in this function)", - IDENTIFIER_POINTER ($1)); - - if (! undeclared_variable_notice) - { - error ("(Each undeclared identifier is reported only once"); - error ("for each function it appears in.)"); - undeclared_variable_notice = 1; - } - } - $$ = error_mark_node; - /* Prevent repeated error messages. */ - IDENTIFIER_GLOBAL_VALUE ($1) = error_mark_node; - IDENTIFIER_ERROR_LOCUS ($1) = current_function_decl; - } - } - } - else if (TREE_TYPE ($$) == error_mark_node) - $$ = error_mark_node; - else if (C_DECL_ANTICIPATED ($$)) - { - /* The first time we see a build-in function used, - if it has not been declared. */ - C_DECL_ANTICIPATED ($$) = 0; - if (yychar == YYEMPTY) - yychar = YYLEX; - if (yychar == '(') - { - /* Omit the implicit declaration we - would ordinarily do, so we don't lose - the actual built in type. - But print a diagnostic for the mismatch. */ - if (TREE_CODE ($$) != FUNCTION_DECL) - error ("`%s' implicitly declared as function", - IDENTIFIER_POINTER (DECL_NAME ($$))); - else if ((TYPE_MODE (TREE_TYPE (TREE_TYPE ($$))) - != TYPE_MODE (integer_type_node)) - && !VOID_TYPE_P (TREE_TYPE (TREE_TYPE ($$)))) - pedwarn ("type mismatch in implicit declaration for built-in function `%s'", - IDENTIFIER_POINTER (DECL_NAME ($$))); - /* If it really returns void, change that to int. */ - if (TREE_TYPE (TREE_TYPE ($$)) == void_type_node) - TREE_TYPE ($$) - = build_function_type (integer_type_node, - TYPE_ARG_TYPES (TREE_TYPE ($$))); - } - else - pedwarn ("built-in function `%s' used without declaration", - IDENTIFIER_POINTER (DECL_NAME ($$))); - - /* Do what we would ordinarily do when a fn is used. */ - assemble_external ($$); - TREE_USED ($$) = 1; - } - else - { - assemble_external ($$); - TREE_USED ($$) = 1; - } - - if (TREE_CODE ($$) == CONST_DECL) - { - $$ = DECL_INITIAL ($$); - /* This is to prevent an enum whose value is 0 - from being considered a null pointer constant. */ - $$ = build1 (NOP_EXPR, TREE_TYPE ($$), $$); - TREE_CONSTANT ($$) = 1; - } + if (yychar == YYEMPTY) + yychar = YYLEX; + $$ = build_external_ref ($1, yychar == '('); } | CONSTANT | string diff --git a/gcc/c-tree.h b/gcc/c-tree.h index ae27e61d6d9..7c86e2676d0 100644 --- a/gcc/c-tree.h +++ b/gcc/c-tree.h @@ -163,6 +163,7 @@ extern tree maybe_building_objc_message_expr PARAMS ((void)); extern tree maybe_objc_method_name PARAMS ((tree)); extern int recognize_objc_keyword PARAMS ((void)); extern tree build_objc_string PARAMS ((int, const char *)); +extern tree lookup_objc_ivar PARAMS ((tree)); /* in c-parse.in */ extern void c_parse_init PARAMS ((void)); @@ -263,6 +264,7 @@ extern tree default_conversion PARAMS ((tree)); extern tree build_component_ref PARAMS ((tree, tree)); extern tree build_indirect_ref PARAMS ((tree, const char *)); extern tree build_array_ref PARAMS ((tree, tree)); +extern tree build_external_ref PARAMS ((tree, int)); extern tree build_function_call PARAMS ((tree, tree)); extern tree parser_build_binary_op PARAMS ((enum tree_code, tree, tree)); diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 6f19fc4207b..ec7eaf99ea8 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -47,6 +47,9 @@ Boston, MA 02111-1307, USA. */ message within this initializer. */ static int missing_braces_mentioned; +/* 1 if we explained undeclared var errors. */ +static int undeclared_variable_notice; + static tree qualify_type PARAMS ((tree, tree)); static int comp_target_types PARAMS ((tree, tree)); static int function_types_compatible_p PARAMS ((tree, tree)); @@ -1389,6 +1392,95 @@ build_array_ref (array, index) } } +/* Build an external reference to identifier ID. FUN indicates + whether this will be used for a function call. */ +tree +build_external_ref (id, fun) + tree id; + int fun; +{ + tree ref; + tree decl = lookup_name (id); + tree objc_ivar = lookup_objc_ivar (id); + + if (!decl || decl == error_mark_node || C_DECL_ANTICIPATED (decl)) + { + if (objc_ivar) + ref = objc_ivar; + else if (fun) + { + if (!decl || decl == error_mark_node) + /* Ordinary implicit function declaration. */ + ref = implicitly_declare (id); + else + { + /* Implicit declaration of built-in function. Don't + change the built-in declaration, but don't let this + go by silently, either. */ + pedwarn ("implicit declaration of function `%s'", + IDENTIFIER_POINTER (DECL_NAME (decl))); + C_DECL_ANTICIPATED (decl) = 0; /* only issue this warning once */ + ref = decl; + } + } + else + { + /* Reference to undeclared variable, including reference to + builtin outside of function-call context. */ + if (current_function_decl == 0) + error ("`%s' undeclared here (not in a function)", + IDENTIFIER_POINTER (id)); + else + { + if (IDENTIFIER_GLOBAL_VALUE (id) != error_mark_node + || IDENTIFIER_ERROR_LOCUS (id) != current_function_decl) + { + error ("`%s' undeclared (first use in this function)", + IDENTIFIER_POINTER (id)); + + if (! undeclared_variable_notice) + { + error ("(Each undeclared identifier is reported only once"); + error ("for each function it appears in.)"); + undeclared_variable_notice = 1; + } + } + IDENTIFIER_GLOBAL_VALUE (id) = error_mark_node; + IDENTIFIER_ERROR_LOCUS (id) = current_function_decl; + } + return error_mark_node; + } + } + else + { + /* Properly declared variable or function reference. */ + if (!objc_ivar) + ref = decl; + else if (decl != objc_ivar && IDENTIFIER_LOCAL_VALUE (id)) + { + warning ("local declaration of `%s' hides instance variable", + IDENTIFIER_POINTER (id)); + ref = decl; + } + else + ref = objc_ivar; + } + + if (TREE_TYPE (ref) == error_mark_node) + return error_mark_node; + + assemble_external (ref); + TREE_USED (ref) = 1; + + if (TREE_CODE (ref) == CONST_DECL) + { + ref = DECL_INITIAL (ref); + TREE_CONSTANT (ref) = 1; + } + + return ref; +} + /* Build a function call to function FUNCTION with parameters PARAMS. PARAMS is a list--a chain of TREE_LIST nodes--in which the TREE_VALUE of each node is a parameter-expression. diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index e1b9cd3ebae..ac33492a10f 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -8614,3 +8614,24 @@ objc_act_parse_init () ggc_add_root (&nst_method_hash_list, 1, sizeof nst_method_hash_list, ggc_mark_hash_table); ggc_add_root (&cls_method_hash_list, 1, sizeof cls_method_hash_list, ggc_mark_hash_table); } + +/* Look up ID as an instance variable. */ +tree +lookup_objc_ivar (id) + tree id; +{ + tree decl; + + if (objc_receiver_context && !strcmp (IDENTIFIER_POINTER (id), "super")) + /* we have a message to super */ + return get_super_receiver (); + else if (objc_method_context && (decl = is_ivar (objc_ivar_chain, id))) + { + if (is_private (decl)) + return error_mark_node; + else + return build_ivar_reference (id); + } + else + return 0; +} diff --git a/gcc/objc/objc-parse.c b/gcc/objc/objc-parse.c index d8c1d25f44f..78040a2c4bc 100644 --- a/gcc/objc/objc-parse.c +++ b/gcc/objc/objc-parse.c @@ -121,9 +121,6 @@ static tree prefix_attributes = NULL_TREE; /* Stack of saved values of current_declspecs and prefix_attributes. */ static tree declspec_stack; -/* 1 if we explained undeclared var errors. */ -static int undeclared_variable_notice; - /* For __extension__, save/restore the warning flags which are controlled by __extension__. */ #define SAVE_WARN_FLAGS() \ @@ -462,63 +459,63 @@ static const short yyrhs[] = { -1, #if YYDEBUG != 0 static const short yyrline[] = { 0, - 264, 269, 283, 285, 285, 286, 288, 290, 291, 292, - 300, 304, 314, 318, 322, 324, 326, 327, 328, 333, - 340, 342, 346, 350, 356, 358, 362, 366, 372, 374, - 378, 384, 386, 387, 388, 391, 393, 395, 397, 399, - 401, 403, 407, 411, 414, 417, 420, 424, 426, 429, - 432, 436, 464, 470, 473, 476, 479, 481, 483, 487, - 491, 495, 497, 500, 504, 531, 533, 535, 537, 539, - 541, 543, 545, 547, 549, 551, 553, 555, 557, 561, - 563, 567, 569, 572, 576, 578, 585, 588, 596, 607, - 766, 767, 769, 775, 777, 800, 809, 811, 813, 825, - 839, 841, 843, 845, 847, 849, 851, 856, 858, 865, - 867, 871, 873, 874, 884, 889, 891, 892, 893, 900, - 905, 909, 912, 920, 925, 927, 928, 929, 936, 946, - 950, 955, 959, 963, 967, 969, 971, 980, 983, 987, - 989, 991, 996, 1000, 1003, 1007, 1010, 1012, 1024, 1027, - 1029, 1031, 1035, 1039, 1041, 1044, 1057, 1060, 1064, 1066, - 1074, 1075, 1076, 1080, 1082, 1087, 1089, 1091, 1097, 1098, - 1099, 1102, 1104, 1107, 1109, 1112, 1115, 1121, 1128, 1130, - 1137, 1144, 1147, 1154, 1157, 1161, 1164, 1168, 1173, 1176, - 1180, 1183, 1185, 1187, 1189, 1196, 1198, 1199, 1200, 1205, - 1207, 1209, 1211, 1216, 1220, 1223, 1225, 1230, 1232, 1233, - 1236, 1236, 1239, 1242, 1244, 1246, 1249, 1251, 1254, 1262, - 1276, 1284, 1288, 1302, 1310, 1317, 1319, 1324, 1327, 1332, - 1334, 1336, 1343, 1345, 1346, 1354, 1360, 1362, 1364, 1371, - 1373, 1379, 1385, 1387, 1389, 1391, 1398, 1400, 1403, 1406, - 1410, 1413, 1417, 1420, 1424, 1429, 1431, 1435, 1437, 1439, - 1441, 1445, 1447, 1449, 1452, 1454, 1457, 1461, 1463, 1466, - 1468, 1473, 1476, 1481, 1483, 1485, 1489, 1513, 1519, 1532, - 1537, 1542, 1544, 1549, 1551, 1555, 1559, 1563, 1573, 1575, - 1580, 1585, 1588, 1592, 1595, 1599, 1602, 1605, 1608, 1612, - 1615, 1619, 1623, 1625, 1627, 1629, 1631, 1633, 1635, 1637, - 1641, 1649, 1657, 1659, 1661, 1665, 1667, 1670, 1673, 1685, - 1687, 1692, 1694, 1697, 1711, 1714, 1717, 1719, 1721, 1725, - 1729, 1735, 1753, 1758, 1763, 1766, 1780, 1789, 1793, 1797, - 1801, 1807, 1811, 1816, 1819, 1824, 1827, 1828, 1844, 1849, - 1852, 1864, 1866, 1876, 1886, 1887, 1894, 1896, 1908, 1912, - 1926, 1932, 1938, 1939, 1944, 1949, 1953, 1957, 1968, 1975, - 1982, 1989, 2000, 2006, 2009, 2014, 2037, 2067, 2098, 2129, - 2144, 2158, 2162, 2166, 2169, 2174, 2176, 2179, 2181, 2185, - 2190, 2193, 2199, 2204, 2209, 2211, 2220, 2221, 2227, 2229, - 2239, 2241, 2245, 2248, 2254, 2263, 2271, 2279, 2288, 2301, - 2306, 2311, 2313, 2322, 2325, 2330, 2333, 2337, 2346, 2348, - 2349, 2350, 2351, 2352, 2366, 2369, 2373, 2379, 2385, 2392, - 2397, 2403, 2410, 2416, 2422, 2427, 2433, 2440, 2446, 2452, - 2458, 2466, 2472, 2478, 2486, 2493, 2499, 2508, 2515, 2523, - 2528, 2531, 2541, 2543, 2546, 2548, 2549, 2552, 2557, 2558, - 2575, 2581, 2586, 2590, 2593, 2594, 2597, 2605, 2611, 2620, - 2630, 2637, 2641, 2646, 2655, 2662, 2666, 2676, 2678, 2679, - 2681, 2683, 2684, 2685, 2686, 2688, 2690, 2693, 2701, 2708, - 2708, 2715, 2721, 2723, 2729, 2734, 2739, 2748, 2750, 2756, - 2758, 2761, 2763, 2764, 2765, 2768, 2773, 2775, 2779, 2782, - 2789, 2795, 2800, 2807, 2812, 2817, 2822, 2829, 2833, 2836, - 2842, 2844, 2845, 2846, 2849, 2851, 2852, 2853, 2854, 2855, - 2856, 2857, 2858, 2859, 2860, 2861, 2862, 2863, 2864, 2865, - 2866, 2867, 2868, 2869, 2869, 2872, 2878, 2883, 2888, 2894, - 2896, 2899, 2901, 2908, 2920, 2925, 2931, 2933, 2939, 2943, - 2944, 2950, 2952, 2955, 2957, 2963, 2968, 2974, 2981, 2990 + 261, 266, 280, 282, 282, 283, 285, 287, 288, 289, + 297, 301, 311, 315, 319, 321, 323, 324, 325, 330, + 337, 339, 343, 347, 353, 355, 359, 363, 369, 371, + 375, 381, 383, 384, 385, 388, 390, 392, 394, 396, + 398, 400, 404, 408, 411, 414, 417, 421, 423, 426, + 429, 433, 461, 467, 470, 473, 476, 478, 480, 484, + 488, 492, 494, 497, 501, 528, 530, 532, 534, 536, + 538, 540, 542, 544, 546, 548, 550, 552, 554, 558, + 560, 564, 566, 569, 573, 575, 582, 585, 593, 604, + 611, 612, 614, 620, 622, 645, 654, 656, 658, 670, + 684, 686, 688, 690, 692, 694, 696, 701, 703, 710, + 712, 716, 718, 719, 729, 734, 736, 737, 738, 745, + 750, 754, 757, 765, 770, 772, 773, 774, 781, 791, + 795, 800, 804, 808, 812, 814, 816, 825, 828, 832, + 834, 836, 841, 845, 848, 852, 855, 857, 869, 872, + 874, 876, 880, 884, 886, 889, 902, 905, 909, 911, + 919, 920, 921, 925, 927, 932, 934, 936, 942, 943, + 944, 947, 949, 952, 954, 957, 960, 966, 973, 975, + 982, 989, 992, 999, 1002, 1006, 1009, 1013, 1018, 1021, + 1025, 1028, 1030, 1032, 1034, 1041, 1043, 1044, 1045, 1050, + 1052, 1054, 1056, 1061, 1065, 1068, 1070, 1075, 1077, 1078, + 1081, 1081, 1084, 1087, 1089, 1091, 1094, 1096, 1099, 1107, + 1121, 1129, 1133, 1147, 1155, 1162, 1164, 1169, 1172, 1177, + 1179, 1181, 1188, 1190, 1191, 1199, 1205, 1207, 1209, 1216, + 1218, 1224, 1230, 1232, 1234, 1236, 1243, 1245, 1248, 1251, + 1255, 1258, 1262, 1265, 1269, 1274, 1276, 1280, 1282, 1284, + 1286, 1290, 1292, 1294, 1297, 1299, 1302, 1306, 1308, 1311, + 1313, 1318, 1321, 1326, 1328, 1330, 1334, 1358, 1364, 1377, + 1382, 1387, 1389, 1394, 1396, 1400, 1404, 1408, 1418, 1420, + 1425, 1430, 1433, 1437, 1440, 1444, 1447, 1450, 1453, 1457, + 1460, 1464, 1468, 1470, 1472, 1474, 1476, 1478, 1480, 1482, + 1486, 1494, 1502, 1504, 1506, 1510, 1512, 1515, 1518, 1530, + 1532, 1537, 1539, 1542, 1556, 1559, 1562, 1564, 1566, 1570, + 1574, 1580, 1598, 1603, 1608, 1611, 1625, 1634, 1638, 1642, + 1646, 1652, 1656, 1661, 1664, 1669, 1672, 1673, 1689, 1694, + 1697, 1709, 1711, 1721, 1731, 1732, 1739, 1741, 1753, 1757, + 1771, 1777, 1783, 1784, 1789, 1794, 1798, 1802, 1813, 1820, + 1827, 1834, 1845, 1851, 1854, 1859, 1882, 1912, 1943, 1974, + 1989, 2003, 2007, 2011, 2014, 2019, 2021, 2024, 2026, 2030, + 2035, 2038, 2044, 2049, 2054, 2056, 2065, 2066, 2072, 2074, + 2084, 2086, 2090, 2093, 2099, 2108, 2116, 2124, 2133, 2146, + 2151, 2156, 2158, 2167, 2170, 2175, 2178, 2182, 2191, 2193, + 2194, 2195, 2196, 2197, 2211, 2214, 2218, 2224, 2230, 2237, + 2242, 2248, 2255, 2261, 2267, 2272, 2278, 2285, 2291, 2297, + 2303, 2311, 2317, 2323, 2331, 2338, 2344, 2353, 2360, 2368, + 2373, 2376, 2386, 2388, 2391, 2393, 2394, 2397, 2402, 2403, + 2420, 2426, 2431, 2435, 2438, 2439, 2442, 2450, 2456, 2465, + 2475, 2482, 2486, 2491, 2500, 2507, 2511, 2521, 2523, 2524, + 2526, 2528, 2529, 2530, 2531, 2533, 2535, 2538, 2546, 2553, + 2553, 2560, 2566, 2568, 2574, 2579, 2584, 2593, 2595, 2601, + 2603, 2606, 2608, 2609, 2610, 2613, 2618, 2620, 2624, 2627, + 2634, 2640, 2645, 2652, 2657, 2662, 2667, 2674, 2678, 2681, + 2687, 2689, 2690, 2691, 2694, 2696, 2697, 2698, 2699, 2700, + 2701, 2702, 2703, 2704, 2705, 2706, 2707, 2708, 2709, 2710, + 2711, 2712, 2713, 2714, 2714, 2717, 2723, 2728, 2733, 2739, + 2741, 2744, 2746, 2753, 2765, 2770, 2776, 2778, 2784, 2788, + 2789, 2795, 2797, 2800, 2802, 2808, 2813, 2819, 2826, 2835 }; #endif @@ -1758,7 +1755,7 @@ static const short yycheck[] = { 56, 50, 51, 52, 53, 54, 55, 56, 57 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ -#line 3 "/usr/lib/bison.simple" +#line 3 "/usr/share/misc/bison.simple" /* This file comes from bison-1.28. */ /* Skeleton output parser for bison, @@ -1972,7 +1969,7 @@ __yy_memcpy (char *to, char *from, unsigned int count) #endif #endif -#line 217 "/usr/lib/bison.simple" +#line 217 "/usr/share/misc/bison.simple" /* The user can define YYPARSE_PARAM as the name of an argument to be passed into yyparse. The argument should have type void *. @@ -2301,14 +2298,14 @@ yyreduce: switch (yyn) { case 1: -#line 265 "objc-parse.y" +#line 262 "objc-parse.y" { if (pedantic) pedwarn ("ANSI C forbids an empty source file"); finish_file (); ; break;} case 2: -#line 270 "objc-parse.y" +#line 267 "objc-parse.y" { /* In case there were missing closebraces, get us back to the global binding level. */ @@ -2318,15 +2315,15 @@ case 2: ; break;} case 3: -#line 284 "objc-parse.y" +#line 281 "objc-parse.y" {yyval.ttype = NULL_TREE; ; break;} case 5: -#line 285 "objc-parse.y" +#line 282 "objc-parse.y" {yyval.ttype = NULL_TREE; ; break;} case 10: -#line 293 "objc-parse.y" +#line 290 "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) @@ -2336,11 +2333,11 @@ case 10: error ("argument of `asm' is not a constant string"); ; break;} case 11: -#line 301 "objc-parse.y" +#line 298 "objc-parse.y" { RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ; break;} case 12: -#line 306 "objc-parse.y" +#line 303 "objc-parse.y" { if (pedantic) error ("ANSI C forbids data definition with no type or storage class"); else if (!flag_traditional) @@ -2351,162 +2348,162 @@ case 12: declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 13: -#line 315 "objc-parse.y" +#line 312 "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 319 "objc-parse.y" +#line 316 "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 323 "objc-parse.y" +#line 320 "objc-parse.y" { pedwarn ("empty declaration"); ; break;} case 16: -#line 325 "objc-parse.y" +#line 322 "objc-parse.y" { shadow_tag (yyvsp[-1].ttype); ; break;} case 19: -#line 329 "objc-parse.y" +#line 326 "objc-parse.y" { if (pedantic) pedwarn ("ANSI C does not allow extra `;' outside of a function"); ; break;} case 20: -#line 335 "objc-parse.y" +#line 332 "objc-parse.y" { if (! start_function (current_declspecs, yyvsp[0].ttype, prefix_attributes, NULL_TREE)) YYERROR1; reinit_parse_for_function (); ; break;} case 21: -#line 340 "objc-parse.y" +#line 337 "objc-parse.y" { store_parm_decls (); ; break;} case 22: -#line 342 "objc-parse.y" +#line 339 "objc-parse.y" { 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 347 "objc-parse.y" +#line 344 "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 351 "objc-parse.y" +#line 348 "objc-parse.y" { if (! start_function (current_declspecs, yyvsp[0].ttype, prefix_attributes, NULL_TREE)) YYERROR1; reinit_parse_for_function (); ; break;} case 25: -#line 356 "objc-parse.y" +#line 353 "objc-parse.y" { store_parm_decls (); ; break;} case 26: -#line 358 "objc-parse.y" +#line 355 "objc-parse.y" { 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 363 "objc-parse.y" +#line 360 "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 367 "objc-parse.y" +#line 364 "objc-parse.y" { if (! start_function (NULL_TREE, yyvsp[0].ttype, prefix_attributes, NULL_TREE)) YYERROR1; reinit_parse_for_function (); ; break;} case 29: -#line 372 "objc-parse.y" +#line 369 "objc-parse.y" { store_parm_decls (); ; break;} case 30: -#line 374 "objc-parse.y" +#line 371 "objc-parse.y" { 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 379 "objc-parse.y" +#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 36: -#line 392 "objc-parse.y" +#line 389 "objc-parse.y" { yyval.code = ADDR_EXPR; ; break;} case 37: -#line 394 "objc-parse.y" +#line 391 "objc-parse.y" { yyval.code = NEGATE_EXPR; ; break;} case 38: -#line 396 "objc-parse.y" +#line 393 "objc-parse.y" { yyval.code = CONVERT_EXPR; ; break;} case 39: -#line 398 "objc-parse.y" +#line 395 "objc-parse.y" { yyval.code = PREINCREMENT_EXPR; ; break;} case 40: -#line 400 "objc-parse.y" +#line 397 "objc-parse.y" { yyval.code = PREDECREMENT_EXPR; ; break;} case 41: -#line 402 "objc-parse.y" +#line 399 "objc-parse.y" { yyval.code = BIT_NOT_EXPR; ; break;} case 42: -#line 404 "objc-parse.y" +#line 401 "objc-parse.y" { yyval.code = TRUTH_NOT_EXPR; ; break;} case 43: -#line 408 "objc-parse.y" +#line 405 "objc-parse.y" { yyval.ttype = build_compound_expr (yyvsp[0].ttype); ; break;} case 44: -#line 413 "objc-parse.y" +#line 410 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 46: -#line 419 "objc-parse.y" +#line 416 "objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} case 47: -#line 421 "objc-parse.y" +#line 418 "objc-parse.y" { chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} case 49: -#line 427 "objc-parse.y" +#line 424 "objc-parse.y" { yyval.ttype = build_indirect_ref (yyvsp[0].ttype, "unary *"); ; break;} case 50: -#line 430 "objc-parse.y" +#line 427 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ; break;} case 51: -#line 433 "objc-parse.y" +#line 430 "objc-parse.y" { yyval.ttype = build_unary_op (yyvsp[-1].code, yyvsp[0].ttype, 0); overflow_warning (yyval.ttype); ; break;} case 52: -#line 437 "objc-parse.y" +#line 434 "objc-parse.y" { tree label = lookup_label (yyvsp[0].ttype); if (pedantic) pedwarn ("ANSI C forbids `&&'"); @@ -2521,7 +2518,7 @@ case 52: ; break;} case 53: -#line 465 "objc-parse.y" +#line 462 "objc-parse.y" { skip_evaluation--; if (TREE_CODE (yyvsp[0].ttype) == COMPONENT_REF && DECL_C_BIT_FIELD (TREE_OPERAND (yyvsp[0].ttype, 1))) @@ -2529,53 +2526,53 @@ case 53: yyval.ttype = c_sizeof (TREE_TYPE (yyvsp[0].ttype)); ; break;} case 54: -#line 471 "objc-parse.y" +#line 468 "objc-parse.y" { skip_evaluation--; yyval.ttype = c_sizeof (groktypename (yyvsp[-1].ttype)); ; break;} case 55: -#line 474 "objc-parse.y" +#line 471 "objc-parse.y" { skip_evaluation--; yyval.ttype = c_alignof_expr (yyvsp[0].ttype); ; break;} case 56: -#line 477 "objc-parse.y" +#line 474 "objc-parse.y" { skip_evaluation--; yyval.ttype = c_alignof (groktypename (yyvsp[-1].ttype)); ; break;} case 57: -#line 480 "objc-parse.y" +#line 477 "objc-parse.y" { yyval.ttype = build_unary_op (REALPART_EXPR, yyvsp[0].ttype, 0); ; break;} case 58: -#line 482 "objc-parse.y" +#line 479 "objc-parse.y" { yyval.ttype = build_unary_op (IMAGPART_EXPR, yyvsp[0].ttype, 0); ; break;} case 59: -#line 484 "objc-parse.y" +#line 481 "objc-parse.y" { yyval.ttype = build_va_arg (yyvsp[-3].ttype, groktypename (yyvsp[-1].ttype)); ; break;} case 60: -#line 488 "objc-parse.y" +#line 485 "objc-parse.y" { skip_evaluation++; ; break;} case 61: -#line 492 "objc-parse.y" +#line 489 "objc-parse.y" { skip_evaluation++; ; break;} case 63: -#line 498 "objc-parse.y" +#line 495 "objc-parse.y" { tree type = groktypename (yyvsp[-2].ttype); yyval.ttype = build_c_cast (type, yyvsp[0].ttype); ; break;} case 64: -#line 501 "objc-parse.y" +#line 498 "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 65: -#line 505 "objc-parse.y" +#line 502 "objc-parse.y" { const char *name; tree result = pop_init_level (0); tree type = yyvsp[-5].ttype; @@ -2602,90 +2599,90 @@ case 65: ; break;} case 67: -#line 534 "objc-parse.y" +#line 531 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 68: -#line 536 "objc-parse.y" +#line 533 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 69: -#line 538 "objc-parse.y" +#line 535 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 70: -#line 540 "objc-parse.y" +#line 537 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 71: -#line 542 "objc-parse.y" +#line 539 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 72: -#line 544 "objc-parse.y" +#line 541 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 73: -#line 546 "objc-parse.y" +#line 543 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 74: -#line 548 "objc-parse.y" +#line 545 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 75: -#line 550 "objc-parse.y" +#line 547 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 76: -#line 552 "objc-parse.y" +#line 549 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 77: -#line 554 "objc-parse.y" +#line 551 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 78: -#line 556 "objc-parse.y" +#line 553 "objc-parse.y" { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 79: -#line 558 "objc-parse.y" +#line 555 "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" +#line 558 "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 81: -#line 564 "objc-parse.y" +#line 561 "objc-parse.y" { yyvsp[-1].ttype = truthvalue_conversion (default_conversion (yyvsp[-1].ttype)); skip_evaluation += yyvsp[-1].ttype == boolean_true_node; ; break;} case 82: -#line 567 "objc-parse.y" +#line 564 "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 83: -#line 570 "objc-parse.y" +#line 567 "objc-parse.y" { yyvsp[-1].ttype = truthvalue_conversion (default_conversion (yyvsp[-1].ttype)); skip_evaluation += yyvsp[-1].ttype == boolean_false_node; ; break;} case 84: -#line 573 "objc-parse.y" +#line 570 "objc-parse.y" { skip_evaluation += ((yyvsp[-4].ttype == boolean_true_node) - (yyvsp[-4].ttype == boolean_false_node)); ; break;} case 85: -#line 576 "objc-parse.y" +#line 573 "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 86: -#line 579 "objc-parse.y" +#line 576 "objc-parse.y" { if (pedantic) pedwarn ("ANSI C forbids omitting the middle term of a ?: expression"); /* Make sure first operand is calculated only once. */ @@ -2694,12 +2691,12 @@ case 86: skip_evaluation += yyvsp[-1].ttype == boolean_true_node; ; break;} case 87: -#line 586 "objc-parse.y" +#line 583 "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 88: -#line 589 "objc-parse.y" +#line 586 "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)); @@ -2709,7 +2706,7 @@ case 88: ; break;} case 89: -#line 597 "objc-parse.y" +#line 594 "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. */ @@ -2720,171 +2717,19 @@ case 89: ; break;} case 90: -#line 609 "objc-parse.y" +#line 606 "objc-parse.y" { - yyval.ttype = lastiddecl; - if (!yyval.ttype || yyval.ttype == error_mark_node) - { - if (yychar == YYEMPTY) - yychar = YYLEX; - if (yychar == '(') - { - tree decl; - - if (objc_receiver_context - && ! (objc_receiver_context - && strcmp (IDENTIFIER_POINTER (yyvsp[0].ttype), "super"))) - /* we have a message to super */ - yyval.ttype = get_super_receiver (); - else if (objc_method_context - && (decl = is_ivar (objc_ivar_chain, yyvsp[0].ttype))) - { - if (is_private (decl)) - yyval.ttype = error_mark_node; - else - yyval.ttype = build_ivar_reference (yyvsp[0].ttype); - } - else - { - /* Ordinary implicit function declaration. */ - yyval.ttype = implicitly_declare (yyvsp[0].ttype); - assemble_external (yyval.ttype); - TREE_USED (yyval.ttype) = 1; - } - } - else if (current_function_decl == 0) - { - error ("`%s' undeclared here (not in a function)", - IDENTIFIER_POINTER (yyvsp[0].ttype)); - yyval.ttype = error_mark_node; - } - else - { - tree decl; - - if (objc_receiver_context - && ! strcmp (IDENTIFIER_POINTER (yyvsp[0].ttype), "super")) - /* we have a message to super */ - yyval.ttype = get_super_receiver (); - else if (objc_method_context - && (decl = is_ivar (objc_ivar_chain, yyvsp[0].ttype))) - { - if (is_private (decl)) - yyval.ttype = error_mark_node; - else - yyval.ttype = build_ivar_reference (yyvsp[0].ttype); - } - else - { - if (IDENTIFIER_GLOBAL_VALUE (yyvsp[0].ttype) != error_mark_node - || IDENTIFIER_ERROR_LOCUS (yyvsp[0].ttype) != current_function_decl) - { - error ("`%s' undeclared (first use in this function)", - IDENTIFIER_POINTER (yyvsp[0].ttype)); - - if (! undeclared_variable_notice) - { - error ("(Each undeclared identifier is reported only once"); - error ("for each function it appears in.)"); - undeclared_variable_notice = 1; - } - } - yyval.ttype = error_mark_node; - /* Prevent repeated error messages. */ - IDENTIFIER_GLOBAL_VALUE (yyvsp[0].ttype) = error_mark_node; - IDENTIFIER_ERROR_LOCUS (yyvsp[0].ttype) = current_function_decl; - } - } - } - else if (TREE_TYPE (yyval.ttype) == error_mark_node) - yyval.ttype = error_mark_node; - else if (C_DECL_ANTICIPATED (yyval.ttype)) - { - /* The first time we see a build-in function used, - if it has not been declared. */ - C_DECL_ANTICIPATED (yyval.ttype) = 0; - if (yychar == YYEMPTY) - yychar = YYLEX; - if (yychar == '(') - { - /* Omit the implicit declaration we - would ordinarily do, so we don't lose - the actual built in type. - But print a diagnostic for the mismatch. */ - if (objc_method_context - && is_ivar (objc_ivar_chain, yyvsp[0].ttype)) - error ("Instance variable `%s' implicitly declared as function", - IDENTIFIER_POINTER (DECL_NAME (yyval.ttype))); - else - if (TREE_CODE (yyval.ttype) != FUNCTION_DECL) - error ("`%s' implicitly declared as function", - IDENTIFIER_POINTER (DECL_NAME (yyval.ttype))); - else if ((TYPE_MODE (TREE_TYPE (TREE_TYPE (yyval.ttype))) - != TYPE_MODE (integer_type_node)) - && !VOID_TYPE_P (TREE_TYPE (TREE_TYPE (yyval.ttype)))) - pedwarn ("type mismatch in implicit declaration for built-in function `%s'", - IDENTIFIER_POINTER (DECL_NAME (yyval.ttype))); - /* If it really returns void, change that to int. */ - if (TREE_TYPE (TREE_TYPE (yyval.ttype)) == void_type_node) - TREE_TYPE (yyval.ttype) - = build_function_type (integer_type_node, - TYPE_ARG_TYPES (TREE_TYPE (yyval.ttype))); - } - else - pedwarn ("built-in function `%s' used without declaration", - IDENTIFIER_POINTER (DECL_NAME (yyval.ttype))); - - /* Do what we would ordinarily do when a fn is used. */ - assemble_external (yyval.ttype); - TREE_USED (yyval.ttype) = 1; - } - else - { - assemble_external (yyval.ttype); - TREE_USED (yyval.ttype) = 1; - /* we have a definition - still check if iVariable */ - - if (!objc_receiver_context - || (objc_receiver_context - && strcmp (IDENTIFIER_POINTER (yyvsp[0].ttype), "super"))) - { - tree decl; - - if (objc_method_context - && (decl = is_ivar (objc_ivar_chain, yyvsp[0].ttype))) - { - if (IDENTIFIER_LOCAL_VALUE (yyvsp[0].ttype)) - warning ("local declaration of `%s' hides instance variable", - IDENTIFIER_POINTER (yyvsp[0].ttype)); - else - { - if (is_private (decl)) - yyval.ttype = error_mark_node; - else - yyval.ttype = build_ivar_reference (yyvsp[0].ttype); - } - } - } - else /* we have a message to super */ - yyval.ttype = get_super_receiver (); - } - - if (TREE_CODE (yyval.ttype) == CONST_DECL) - { - yyval.ttype = DECL_INITIAL (yyval.ttype); - /* This is to prevent an enum whose value is 0 - from being considered a null pointer constant. */ - yyval.ttype = build1 (NOP_EXPR, TREE_TYPE (yyval.ttype), yyval.ttype); - TREE_CONSTANT (yyval.ttype) = 1; - } + if (yychar == YYEMPTY) + yychar = YYLEX; + yyval.ttype = build_external_ref (yyvsp[0].ttype, yychar == '('); ; break;} case 92: -#line 768 "objc-parse.y" +#line 613 "objc-parse.y" { yyval.ttype = combine_strings (yyvsp[0].ttype); ; break;} case 93: -#line 770 "objc-parse.y" +#line 615 "objc-parse.y" { char class = TREE_CODE_CLASS (TREE_CODE (yyvsp[-1].ttype)); if (class == 'e' || class == '1' || class == '2' || class == '<') @@ -2892,11 +2737,11 @@ case 93: yyval.ttype = yyvsp[-1].ttype; ; break;} case 94: -#line 776 "objc-parse.y" +#line 621 "objc-parse.y" { yyval.ttype = error_mark_node; ; break;} case 95: -#line 778 "objc-parse.y" +#line 623 "objc-parse.y" { tree rtl_exp; if (pedantic) pedwarn ("ANSI C forbids braced-groups within expressions"); @@ -2921,7 +2766,7 @@ case 95: ; break;} case 96: -#line 801 "objc-parse.y" +#line 646 "objc-parse.y" { /* Make sure we call expand_end_stmt_expr. Otherwise we are likely to lose sequences and crash later. */ @@ -2932,15 +2777,15 @@ case 96: ; break;} case 97: -#line 810 "objc-parse.y" +#line 655 "objc-parse.y" { yyval.ttype = build_function_call (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 98: -#line 812 "objc-parse.y" +#line 657 "objc-parse.y" { yyval.ttype = build_array_ref (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 99: -#line 814 "objc-parse.y" +#line 659 "objc-parse.y" { if (doing_objc_thang) { @@ -2954,7 +2799,7 @@ case 99: ; break;} case 100: -#line 826 "objc-parse.y" +#line 671 "objc-parse.y" { tree expr = build_indirect_ref (yyvsp[-2].ttype, "->"); @@ -2970,79 +2815,79 @@ case 100: ; break;} case 101: -#line 840 "objc-parse.y" +#line 685 "objc-parse.y" { yyval.ttype = build_unary_op (POSTINCREMENT_EXPR, yyvsp[-1].ttype, 0); ; break;} case 102: -#line 842 "objc-parse.y" +#line 687 "objc-parse.y" { yyval.ttype = build_unary_op (POSTDECREMENT_EXPR, yyvsp[-1].ttype, 0); ; break;} case 103: -#line 844 "objc-parse.y" +#line 689 "objc-parse.y" { yyval.ttype = build_message_expr (yyvsp[0].ttype); ; break;} case 104: -#line 846 "objc-parse.y" +#line 691 "objc-parse.y" { yyval.ttype = build_selector_expr (yyvsp[0].ttype); ; break;} case 105: -#line 848 "objc-parse.y" +#line 693 "objc-parse.y" { yyval.ttype = build_protocol_expr (yyvsp[0].ttype); ; break;} case 106: -#line 850 "objc-parse.y" +#line 695 "objc-parse.y" { yyval.ttype = build_encode_expr (yyvsp[0].ttype); ; break;} case 107: -#line 852 "objc-parse.y" +#line 697 "objc-parse.y" { yyval.ttype = build_objc_string_object (yyvsp[0].ttype); ; break;} case 109: -#line 859 "objc-parse.y" +#line 704 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 111: -#line 868 "objc-parse.y" +#line 713 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 114: -#line 876 "objc-parse.y" +#line 721 "objc-parse.y" { c_mark_varargs (); if (pedantic) pedwarn ("ANSI C does not permit use of `varargs.h'"); ; break;} case 115: -#line 886 "objc-parse.y" +#line 731 "objc-parse.y" { ; break;} case 120: -#line 902 "objc-parse.y" +#line 747 "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 906 "objc-parse.y" +#line 751 "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 910 "objc-parse.y" +#line 755 "objc-parse.y" { shadow_tag_warned (yyvsp[-1].ttype, 1); pedwarn ("empty declaration"); ; break;} case 123: -#line 913 "objc-parse.y" +#line 758 "objc-parse.y" { pedwarn ("empty declaration"); ; break;} case 124: -#line 922 "objc-parse.y" +#line 767 "objc-parse.y" { ; break;} case 129: -#line 937 "objc-parse.y" +#line 782 "objc-parse.y" { pending_xref_error (); declspec_stack = tree_cons (prefix_attributes, current_declspecs, @@ -3051,127 +2896,127 @@ case 129: ¤t_declspecs, &prefix_attributes); ; break;} case 130: -#line 947 "objc-parse.y" +#line 792 "objc-parse.y" { prefix_attributes = chainon (prefix_attributes, yyvsp[0].ttype); ; break;} case 131: -#line 952 "objc-parse.y" +#line 797 "objc-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 132: -#line 956 "objc-parse.y" +#line 801 "objc-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 133: -#line 960 "objc-parse.y" +#line 805 "objc-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 134: -#line 964 "objc-parse.y" +#line 809 "objc-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 135: -#line 968 "objc-parse.y" +#line 813 "objc-parse.y" { shadow_tag (yyvsp[-1].ttype); ; break;} case 136: -#line 970 "objc-parse.y" +#line 815 "objc-parse.y" { pedwarn ("empty declaration"); ; break;} case 137: -#line 972 "objc-parse.y" +#line 817 "objc-parse.y" { RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ; break;} case 138: -#line 982 "objc-parse.y" +#line 827 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 139: -#line 984 "objc-parse.y" +#line 829 "objc-parse.y" { yyval.ttype = chainon (yyvsp[0].ttype, tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[-2].ttype)); ; break;} case 140: -#line 988 "objc-parse.y" +#line 833 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 141: -#line 990 "objc-parse.y" +#line 835 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 142: -#line 992 "objc-parse.y" +#line 837 "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 143: -#line 997 "objc-parse.y" +#line 842 "objc-parse.y" { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ; break;} case 144: -#line 1002 "objc-parse.y" +#line 847 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 145: -#line 1004 "objc-parse.y" +#line 849 "objc-parse.y" { yyval.ttype = chainon (yyvsp[0].ttype, tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[-2].ttype)); ; break;} case 146: -#line 1009 "objc-parse.y" +#line 854 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 147: -#line 1011 "objc-parse.y" +#line 856 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 148: -#line 1013 "objc-parse.y" +#line 858 "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 149: -#line 1026 "objc-parse.y" +#line 871 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 150: -#line 1028 "objc-parse.y" +#line 873 "objc-parse.y" { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, NULL_TREE); ; break;} case 151: -#line 1030 "objc-parse.y" +#line 875 "objc-parse.y" { yyval.ttype = chainon (yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 152: -#line 1032 "objc-parse.y" +#line 877 "objc-parse.y" { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ; break;} case 153: -#line 1037 "objc-parse.y" +#line 882 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); TREE_STATIC (yyval.ttype) = 1; ; break;} case 154: -#line 1040 "objc-parse.y" +#line 885 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} case 155: -#line 1042 "objc-parse.y" +#line 887 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); TREE_STATIC (yyval.ttype) = 1; ; break;} case 156: -#line 1045 "objc-parse.y" +#line 890 "objc-parse.y" { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); @@ -3179,180 +3024,180 @@ case 156: TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; break;} case 157: -#line 1059 "objc-parse.y" +#line 904 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 158: -#line 1061 "objc-parse.y" +#line 906 "objc-parse.y" { yyval.ttype = chainon (yyvsp[0].ttype, tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[-2].ttype)); ; break;} case 159: -#line 1065 "objc-parse.y" +#line 910 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 160: -#line 1067 "objc-parse.y" +#line 912 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 163: -#line 1077 "objc-parse.y" +#line 922 "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 164: -#line 1081 "objc-parse.y" +#line 926 "objc-parse.y" { yyval.ttype = get_static_reference (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 165: -#line 1083 "objc-parse.y" +#line 928 "objc-parse.y" { yyval.ttype = get_object_reference (yyvsp[0].ttype); ; break;} case 166: -#line 1088 "objc-parse.y" +#line 933 "objc-parse.y" { yyval.ttype = get_object_reference (yyvsp[0].ttype); ; break;} case 167: -#line 1090 "objc-parse.y" +#line 935 "objc-parse.y" { yyval.ttype = TREE_TYPE (yyvsp[-1].ttype); ; break;} case 168: -#line 1092 "objc-parse.y" +#line 937 "objc-parse.y" { yyval.ttype = groktypename (yyvsp[-1].ttype); ; break;} case 176: -#line 1114 "objc-parse.y" +#line 959 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 177: -#line 1116 "objc-parse.y" +#line 961 "objc-parse.y" { if (TREE_CHAIN (yyvsp[-1].ttype)) yyvsp[-1].ttype = combine_strings (yyvsp[-1].ttype); yyval.ttype = yyvsp[-1].ttype; ; break;} case 178: -#line 1123 "objc-parse.y" +#line 968 "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 179: -#line 1128 "objc-parse.y" +#line 973 "objc-parse.y" { finish_init (); finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype); ; break;} case 180: -#line 1131 "objc-parse.y" +#line 976 "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 181: -#line 1139 "objc-parse.y" +#line 984 "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 182: -#line 1144 "objc-parse.y" +#line 989 "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 183: -#line 1148 "objc-parse.y" +#line 993 "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 184: -#line 1156 "objc-parse.y" +#line 1001 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 185: -#line 1158 "objc-parse.y" +#line 1003 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 186: -#line 1163 "objc-parse.y" +#line 1008 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 187: -#line 1165 "objc-parse.y" +#line 1010 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 188: -#line 1170 "objc-parse.y" +#line 1015 "objc-parse.y" { yyval.ttype = yyvsp[-2].ttype; ; break;} case 189: -#line 1175 "objc-parse.y" +#line 1020 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 190: -#line 1177 "objc-parse.y" +#line 1022 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 191: -#line 1182 "objc-parse.y" +#line 1027 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 192: -#line 1184 "objc-parse.y" +#line 1029 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[0].ttype, NULL_TREE); ; break;} case 193: -#line 1186 "objc-parse.y" +#line 1031 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, build_tree_list (NULL_TREE, yyvsp[-1].ttype)); ; break;} case 194: -#line 1188 "objc-parse.y" +#line 1033 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-5].ttype, tree_cons (NULL_TREE, yyvsp[-3].ttype, yyvsp[-1].ttype)); ; break;} case 195: -#line 1190 "objc-parse.y" +#line 1035 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 201: -#line 1208 "objc-parse.y" +#line 1053 "objc-parse.y" { really_start_incremental_init (NULL_TREE); ; break;} case 202: -#line 1210 "objc-parse.y" +#line 1055 "objc-parse.y" { yyval.ttype = pop_init_level (0); ; break;} case 203: -#line 1212 "objc-parse.y" +#line 1057 "objc-parse.y" { yyval.ttype = error_mark_node; ; break;} case 204: -#line 1218 "objc-parse.y" +#line 1063 "objc-parse.y" { if (pedantic) pedwarn ("ANSI C forbids empty initializer braces"); ; break;} case 210: -#line 1234 "objc-parse.y" +#line 1079 "objc-parse.y" { set_init_label (yyvsp[-1].ttype); ; break;} case 213: -#line 1241 "objc-parse.y" +#line 1086 "objc-parse.y" { push_init_level (0); ; break;} case 214: -#line 1243 "objc-parse.y" +#line 1088 "objc-parse.y" { process_init_element (pop_init_level (0)); ; break;} case 215: -#line 1245 "objc-parse.y" +#line 1090 "objc-parse.y" { process_init_element (yyvsp[0].ttype); ; break;} case 219: -#line 1256 "objc-parse.y" +#line 1101 "objc-parse.y" { set_init_label (yyvsp[0].ttype); ; break;} case 220: -#line 1264 "objc-parse.y" +#line 1109 "objc-parse.y" { if (pedantic) pedwarn ("ANSI C forbids nested functions"); @@ -3366,16 +3211,16 @@ case 220: reinit_parse_for_function (); ; break;} case 221: -#line 1276 "objc-parse.y" +#line 1121 "objc-parse.y" { store_parm_decls (); ; break;} case 222: -#line 1284 "objc-parse.y" +#line 1129 "objc-parse.y" { finish_function (1); pop_function_context (); ; break;} case 223: -#line 1290 "objc-parse.y" +#line 1135 "objc-parse.y" { if (pedantic) pedwarn ("ANSI C forbids nested functions"); @@ -3389,195 +3234,195 @@ case 223: reinit_parse_for_function (); ; break;} case 224: -#line 1302 "objc-parse.y" +#line 1147 "objc-parse.y" { store_parm_decls (); ; break;} case 225: -#line 1310 "objc-parse.y" +#line 1155 "objc-parse.y" { finish_function (1); pop_function_context (); ; break;} case 228: -#line 1326 "objc-parse.y" +#line 1171 "objc-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 229: -#line 1328 "objc-parse.y" +#line 1173 "objc-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 230: -#line 1333 "objc-parse.y" +#line 1178 "objc-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 231: -#line 1335 "objc-parse.y" +#line 1180 "objc-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} case 232: -#line 1337 "objc-parse.y" +#line 1182 "objc-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 233: -#line 1344 "objc-parse.y" +#line 1189 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 236: -#line 1356 "objc-parse.y" +#line 1201 "objc-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 237: -#line 1361 "objc-parse.y" +#line 1206 "objc-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 238: -#line 1363 "objc-parse.y" +#line 1208 "objc-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} case 239: -#line 1365 "objc-parse.y" +#line 1210 "objc-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 240: -#line 1372 "objc-parse.y" +#line 1217 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 242: -#line 1381 "objc-parse.y" +#line 1226 "objc-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 243: -#line 1386 "objc-parse.y" +#line 1231 "objc-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 244: -#line 1388 "objc-parse.y" +#line 1233 "objc-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 245: -#line 1390 "objc-parse.y" +#line 1235 "objc-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 246: -#line 1392 "objc-parse.y" +#line 1237 "objc-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} case 247: -#line 1399 "objc-parse.y" +#line 1244 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 249: -#line 1405 "objc-parse.y" +#line 1250 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 250: -#line 1407 "objc-parse.y" +#line 1252 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 251: -#line 1412 "objc-parse.y" +#line 1257 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 252: -#line 1414 "objc-parse.y" +#line 1259 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 253: -#line 1419 "objc-parse.y" +#line 1264 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 254: -#line 1421 "objc-parse.y" +#line 1266 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 255: -#line 1426 "objc-parse.y" +#line 1271 "objc-parse.y" { yyval.ttype = start_struct (RECORD_TYPE, yyvsp[-1].ttype); /* Start scope of tag before parsing components. */ ; break;} case 256: -#line 1430 "objc-parse.y" +#line 1275 "objc-parse.y" { yyval.ttype = finish_struct (yyvsp[-3].ttype, yyvsp[-2].ttype, chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ; break;} case 257: -#line 1432 "objc-parse.y" +#line 1277 "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 258: -#line 1436 "objc-parse.y" +#line 1281 "objc-parse.y" { yyval.ttype = xref_tag (RECORD_TYPE, yyvsp[0].ttype); ; break;} case 259: -#line 1438 "objc-parse.y" +#line 1283 "objc-parse.y" { yyval.ttype = start_struct (UNION_TYPE, yyvsp[-1].ttype); ; break;} case 260: -#line 1440 "objc-parse.y" +#line 1285 "objc-parse.y" { yyval.ttype = finish_struct (yyvsp[-3].ttype, yyvsp[-2].ttype, chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ; break;} case 261: -#line 1442 "objc-parse.y" +#line 1287 "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 262: -#line 1446 "objc-parse.y" +#line 1291 "objc-parse.y" { yyval.ttype = xref_tag (UNION_TYPE, yyvsp[0].ttype); ; break;} case 263: -#line 1448 "objc-parse.y" +#line 1293 "objc-parse.y" { yyval.ttype = start_enum (yyvsp[-1].ttype); ; break;} case 264: -#line 1450 "objc-parse.y" +#line 1295 "objc-parse.y" { yyval.ttype = finish_enum (yyvsp[-4].ttype, nreverse (yyvsp[-3].ttype), chainon (yyvsp[-7].ttype, yyvsp[0].ttype)); ; break;} case 265: -#line 1453 "objc-parse.y" +#line 1298 "objc-parse.y" { yyval.ttype = start_enum (NULL_TREE); ; break;} case 266: -#line 1455 "objc-parse.y" +#line 1300 "objc-parse.y" { yyval.ttype = finish_enum (yyvsp[-4].ttype, nreverse (yyvsp[-3].ttype), chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ; break;} case 267: -#line 1458 "objc-parse.y" +#line 1303 "objc-parse.y" { yyval.ttype = xref_tag (ENUMERAL_TYPE, yyvsp[0].ttype); ; break;} case 271: -#line 1469 "objc-parse.y" +#line 1314 "objc-parse.y" { if (pedantic && ! flag_isoc99) pedwarn ("comma at end of enumerator list"); ; break;} case 272: -#line 1475 "objc-parse.y" +#line 1320 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 273: -#line 1477 "objc-parse.y" +#line 1322 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); pedwarn ("no semicolon at end of struct or union"); ; break;} case 274: -#line 1482 "objc-parse.y" +#line 1327 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 275: -#line 1484 "objc-parse.y" +#line 1329 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[-1].ttype); ; break;} case 276: -#line 1486 "objc-parse.y" +#line 1331 "objc-parse.y" { if (pedantic) pedwarn ("extra semicolon in struct or union specified"); ; break;} case 277: -#line 1490 "objc-parse.y" +#line 1335 "objc-parse.y" { tree interface = lookup_interface (yyvsp[-1].ttype); @@ -3592,14 +3437,14 @@ case 277: ; break;} case 278: -#line 1515 "objc-parse.y" +#line 1360 "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 279: -#line 1520 "objc-parse.y" +#line 1365 "objc-parse.y" { /* Support for unnamed structs or unions as members of structs or unions (which is [a] useful and [b] supports @@ -3614,151 +3459,151 @@ case 279: ; break;} case 280: -#line 1533 "objc-parse.y" +#line 1378 "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 281: -#line 1538 "objc-parse.y" +#line 1383 "objc-parse.y" { if (pedantic) pedwarn ("ANSI C forbids member declarations with no members"); shadow_tag(yyvsp[0].ttype); yyval.ttype = NULL_TREE; ; break;} case 282: -#line 1543 "objc-parse.y" +#line 1388 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 283: -#line 1545 "objc-parse.y" +#line 1390 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ; break;} case 285: -#line 1552 "objc-parse.y" +#line 1397 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 286: -#line 1557 "objc-parse.y" +#line 1402 "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 287: -#line 1561 "objc-parse.y" +#line 1406 "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 288: -#line 1564 "objc-parse.y" +#line 1409 "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 290: -#line 1576 "objc-parse.y" +#line 1421 "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 291: -#line 1581 "objc-parse.y" +#line 1426 "objc-parse.y" { yyval.ttype = error_mark_node; ; break;} case 292: -#line 1587 "objc-parse.y" +#line 1432 "objc-parse.y" { yyval.ttype = build_enumerator (yyvsp[0].ttype, NULL_TREE); ; break;} case 293: -#line 1589 "objc-parse.y" +#line 1434 "objc-parse.y" { yyval.ttype = build_enumerator (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 294: -#line 1594 "objc-parse.y" +#line 1439 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 295: -#line 1596 "objc-parse.y" +#line 1441 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 296: -#line 1601 "objc-parse.y" +#line 1446 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 298: -#line 1607 "objc-parse.y" +#line 1452 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} case 299: -#line 1609 "objc-parse.y" +#line 1454 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 300: -#line 1614 "objc-parse.y" +#line 1459 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 301: -#line 1616 "objc-parse.y" +#line 1461 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 302: -#line 1621 "objc-parse.y" +#line 1466 "objc-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 303: -#line 1624 "objc-parse.y" +#line 1469 "objc-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 304: -#line 1626 "objc-parse.y" +#line 1471 "objc-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); ; break;} case 305: -#line 1628 "objc-parse.y" +#line 1473 "objc-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 306: -#line 1630 "objc-parse.y" +#line 1475 "objc-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 307: -#line 1632 "objc-parse.y" +#line 1477 "objc-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} case 308: -#line 1634 "objc-parse.y" +#line 1479 "objc-parse.y" { yyval.ttype = build_nt (CALL_EXPR, NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} case 309: -#line 1636 "objc-parse.y" +#line 1481 "objc-parse.y" { yyval.ttype = build_nt (ARRAY_REF, NULL_TREE, yyvsp[-1].ttype); ; break;} case 310: -#line 1638 "objc-parse.y" +#line 1483 "objc-parse.y" { yyval.ttype = build_nt (ARRAY_REF, NULL_TREE, NULL_TREE); ; break;} case 311: -#line 1642 "objc-parse.y" +#line 1487 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 312: -#line 1651 "objc-parse.y" +#line 1496 "objc-parse.y" { if (pedantic && yyvsp[0].ends_in_label) pedwarn ("ANSI C forbids label at end of compound statement"); ; break;} case 314: -#line 1660 "objc-parse.y" +#line 1505 "objc-parse.y" { yyval.ends_in_label = yyvsp[0].ends_in_label; ; break;} case 315: -#line 1662 "objc-parse.y" +#line 1507 "objc-parse.y" { yyval.ends_in_label = 0; ; break;} case 319: -#line 1674 "objc-parse.y" +#line 1519 "objc-parse.y" { emit_line_note (input_filename, lineno); pushlevel (0); clear_last_expr (); @@ -3768,12 +3613,12 @@ case 319: ; break;} case 321: -#line 1688 "objc-parse.y" +#line 1533 "objc-parse.y" { if (pedantic) pedwarn ("ANSI C forbids label declarations"); ; break;} case 324: -#line 1699 "objc-parse.y" +#line 1544 "objc-parse.y" { tree link; for (link = yyvsp[-1].ttype; link; link = TREE_CHAIN (link)) { @@ -3784,37 +3629,37 @@ case 324: ; break;} case 325: -#line 1713 "objc-parse.y" +#line 1558 "objc-parse.y" {; break;} case 327: -#line 1717 "objc-parse.y" +#line 1562 "objc-parse.y" { compstmt_count++; ; break;} case 328: -#line 1720 "objc-parse.y" +#line 1565 "objc-parse.y" { yyval.ttype = convert (void_type_node, integer_zero_node); ; break;} case 329: -#line 1722 "objc-parse.y" +#line 1567 "objc-parse.y" { emit_line_note (input_filename, lineno); expand_end_bindings (getdecls (), 1, 0); yyval.ttype = poplevel (1, 1, 0); ; break;} case 330: -#line 1726 "objc-parse.y" +#line 1571 "objc-parse.y" { emit_line_note (input_filename, lineno); expand_end_bindings (getdecls (), kept_level_p (), 0); yyval.ttype = poplevel (kept_level_p (), 0, 0); ; break;} case 331: -#line 1730 "objc-parse.y" +#line 1575 "objc-parse.y" { emit_line_note (input_filename, lineno); expand_end_bindings (getdecls (), kept_level_p (), 0); yyval.ttype = poplevel (kept_level_p (), 0, 0); ; break;} case 332: -#line 1737 "objc-parse.y" +#line 1582 "objc-parse.y" { if (current_function_decl == 0) { error ("braced-group within expression allowed only inside a function"); @@ -3832,11 +3677,11 @@ case 332: ; break;} case 333: -#line 1754 "objc-parse.y" +#line 1599 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 336: -#line 1768 "objc-parse.y" +#line 1613 "objc-parse.y" { emit_line_note (yyvsp[-5].filename, yyvsp[-4].lineno); c_expand_start_cond (truthvalue_conversion (yyvsp[-1].ttype), 0, compstmt_count); @@ -3846,7 +3691,7 @@ case 336: position_after_white_space (); ; break;} case 337: -#line 1782 "objc-parse.y" +#line 1627 "objc-parse.y" { stmt_count++; compstmt_count++; emit_line_note (yyvsp[-2].filename, yyvsp[-1].lineno); @@ -3856,43 +3701,43 @@ case 337: position_after_white_space (); ; break;} case 338: -#line 1790 "objc-parse.y" +#line 1635 "objc-parse.y" { expand_loop_continue_here (); ; break;} case 339: -#line 1794 "objc-parse.y" +#line 1639 "objc-parse.y" { yyval.filename = input_filename; ; break;} case 340: -#line 1798 "objc-parse.y" +#line 1643 "objc-parse.y" { yyval.lineno = lineno; ; break;} case 341: -#line 1803 "objc-parse.y" +#line 1648 "objc-parse.y" { ; break;} case 342: -#line 1808 "objc-parse.y" +#line 1653 "objc-parse.y" { ; break;} case 343: -#line 1813 "objc-parse.y" +#line 1658 "objc-parse.y" { yyval.ends_in_label = yyvsp[0].ends_in_label; ; break;} case 344: -#line 1818 "objc-parse.y" +#line 1663 "objc-parse.y" { yyval.ends_in_label = 0; ; break;} case 345: -#line 1820 "objc-parse.y" +#line 1665 "objc-parse.y" { yyval.ends_in_label = 1; ; break;} case 346: -#line 1826 "objc-parse.y" +#line 1671 "objc-parse.y" { stmt_count++; ; break;} case 348: -#line 1829 "objc-parse.y" +#line 1674 "objc-parse.y" { stmt_count++; emit_line_note (yyvsp[-3].filename, yyvsp[-2].lineno); /* It appears that this should not be done--that a non-lvalue array @@ -3910,19 +3755,19 @@ case 348: iterator_expand (yyvsp[-1].ttype); ; break;} case 349: -#line 1845 "objc-parse.y" +#line 1690 "objc-parse.y" { c_expand_start_else (); yyvsp[-1].itype = stmt_count; position_after_white_space (); ; break;} case 350: -#line 1849 "objc-parse.y" +#line 1694 "objc-parse.y" { c_expand_end_cond (); if (extra_warnings && stmt_count == yyvsp[-3].itype) warning ("empty body in an else-statement"); ; break;} case 351: -#line 1853 "objc-parse.y" +#line 1698 "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 @@ -3933,11 +3778,11 @@ case 351: "empty body in an if-statement"); ; break;} case 352: -#line 1865 "objc-parse.y" +#line 1710 "objc-parse.y" { c_expand_end_cond (); ; break;} case 353: -#line 1867 "objc-parse.y" +#line 1712 "objc-parse.y" { stmt_count++; emit_line_note (yyvsp[-2].filename, yyvsp[-1].lineno); /* The emit_nop used to come before emit_line_note, @@ -3949,7 +3794,7 @@ case 353: emit_nop (); ; break;} case 354: -#line 1877 "objc-parse.y" +#line 1722 "objc-parse.y" { /* Don't start the loop till we have succeeded in parsing the end test. This is to make sure that we end every loop we start. */ @@ -3960,22 +3805,22 @@ case 354: position_after_white_space (); ; break;} case 355: -#line 1886 "objc-parse.y" +#line 1731 "objc-parse.y" { expand_end_loop (); ; break;} case 356: -#line 1889 "objc-parse.y" +#line 1734 "objc-parse.y" { emit_line_note (input_filename, lineno); expand_exit_loop_if_false (NULL_PTR, truthvalue_conversion (yyvsp[-2].ttype)); expand_end_loop (); ; break;} case 357: -#line 1895 "objc-parse.y" +#line 1740 "objc-parse.y" { expand_end_loop (); ; break;} case 358: -#line 1898 "objc-parse.y" +#line 1743 "objc-parse.y" { stmt_count++; emit_line_note (yyvsp[-5].filename, yyvsp[-4].lineno); /* See comment in `while' alternative, above. */ @@ -3988,12 +3833,12 @@ case 358: ; break;} case 359: -#line 1910 "objc-parse.y" +#line 1755 "objc-parse.y" { yyvsp[0].lineno = lineno; yyval.filename = input_filename; ; break;} case 360: -#line 1913 "objc-parse.y" +#line 1758 "objc-parse.y" { /* Start the loop. Doing this after parsing all the expressions ensures we will end the loop. */ @@ -4008,7 +3853,7 @@ case 360: position_after_white_space (); ; break;} case 361: -#line 1926 "objc-parse.y" +#line 1771 "objc-parse.y" { /* Emit the increment expression, with a line number. */ emit_line_note (yyvsp[-4].filename, yyvsp[-5].lineno); expand_loop_continue_here (); @@ -4017,44 +3862,44 @@ case 361: expand_end_loop (); ; break;} case 362: -#line 1933 "objc-parse.y" +#line 1778 "objc-parse.y" { stmt_count++; emit_line_note (yyvsp[-5].filename, yyvsp[-4].lineno); c_expand_start_case (yyvsp[-1].ttype); position_after_white_space (); ; break;} case 363: -#line 1938 "objc-parse.y" +#line 1783 "objc-parse.y" { expand_end_case (yyvsp[-3].ttype); ; break;} case 364: -#line 1940 "objc-parse.y" +#line 1785 "objc-parse.y" { stmt_count++; emit_line_note (yyvsp[-3].filename, yyvsp[-2].lineno); if ( ! expand_exit_something ()) error ("break statement not within loop or switch"); ; break;} case 365: -#line 1945 "objc-parse.y" +#line 1790 "objc-parse.y" { stmt_count++; emit_line_note (yyvsp[-3].filename, yyvsp[-2].lineno); if (! expand_continue_loop (NULL_PTR)) error ("continue statement not within a loop"); ; break;} case 366: -#line 1950 "objc-parse.y" +#line 1795 "objc-parse.y" { stmt_count++; emit_line_note (yyvsp[-3].filename, yyvsp[-2].lineno); c_expand_return (NULL_TREE); ; break;} case 367: -#line 1954 "objc-parse.y" +#line 1799 "objc-parse.y" { stmt_count++; emit_line_note (yyvsp[-4].filename, yyvsp[-3].lineno); c_expand_return (yyvsp[-1].ttype); ; break;} case 368: -#line 1958 "objc-parse.y" +#line 1803 "objc-parse.y" { stmt_count++; emit_line_note (yyvsp[-7].filename, yyvsp[-6].lineno); STRIP_NOPS (yyvsp[-2].ttype); @@ -4066,7 +3911,7 @@ case 368: error ("argument of `asm' is not a constant string"); ; break;} case 369: -#line 1969 "objc-parse.y" +#line 1814 "objc-parse.y" { stmt_count++; emit_line_note (yyvsp[-9].filename, yyvsp[-8].lineno); c_expand_asm_operands (yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE, NULL_TREE, @@ -4074,7 +3919,7 @@ case 369: input_filename, lineno); ; break;} case 370: -#line 1976 "objc-parse.y" +#line 1821 "objc-parse.y" { stmt_count++; emit_line_note (yyvsp[-11].filename, yyvsp[-10].lineno); c_expand_asm_operands (yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE, @@ -4082,7 +3927,7 @@ case 370: input_filename, lineno); ; break;} case 371: -#line 1984 "objc-parse.y" +#line 1829 "objc-parse.y" { stmt_count++; emit_line_note (yyvsp[-13].filename, yyvsp[-12].lineno); c_expand_asm_operands (yyvsp[-8].ttype, yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype, @@ -4090,7 +3935,7 @@ case 371: input_filename, lineno); ; break;} case 372: -#line 1990 "objc-parse.y" +#line 1835 "objc-parse.y" { tree decl; stmt_count++; emit_line_note (yyvsp[-4].filename, yyvsp[-3].lineno); @@ -4103,7 +3948,7 @@ case 372: ; break;} case 373: -#line 2001 "objc-parse.y" +#line 1846 "objc-parse.y" { if (pedantic) pedwarn ("ANSI C forbids `goto *expr;'"); stmt_count++; @@ -4111,7 +3956,7 @@ case 373: expand_computed_goto (convert (ptr_type_node, yyvsp[-1].ttype)); ; break;} case 376: -#line 2016 "objc-parse.y" +#line 1861 "objc-parse.y" { /* The value returned by this action is */ /* 1 if everything is OK */ @@ -4134,14 +3979,14 @@ case 376: ; break;} case 377: -#line 2037 "objc-parse.y" +#line 1882 "objc-parse.y" { if (yyvsp[-1].itype) iterator_for_loop_end (yyvsp[-3].ttype); ; break;} case 378: -#line 2068 "objc-parse.y" +#line 1913 "objc-parse.y" { register tree value = check_case_value (yyvsp[-1].ttype); register tree label = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE); @@ -4174,7 +4019,7 @@ case 378: position_after_white_space (); ; break;} case 379: -#line 2099 "objc-parse.y" +#line 1944 "objc-parse.y" { register tree value1 = check_case_value (yyvsp[-3].ttype); register tree value2 = check_case_value (yyvsp[-1].ttype); register tree label @@ -4207,7 +4052,7 @@ case 379: position_after_white_space (); ; break;} case 380: -#line 2130 "objc-parse.y" +#line 1975 "objc-parse.y" { tree duplicate; register tree label @@ -4224,7 +4069,7 @@ case 380: position_after_white_space (); ; break;} case 381: -#line 2145 "objc-parse.y" +#line 1990 "objc-parse.y" { tree label = define_label (input_filename, lineno, yyvsp[-2].ttype); stmt_count++; emit_nop (); @@ -4236,52 +4081,52 @@ case 381: position_after_white_space (); ; break;} case 382: -#line 2160 "objc-parse.y" +#line 2005 "objc-parse.y" { emit_line_note (input_filename, lineno); yyval.ttype = NULL_TREE; ; break;} case 383: -#line 2163 "objc-parse.y" +#line 2008 "objc-parse.y" { emit_line_note (input_filename, lineno); ; break;} case 384: -#line 2168 "objc-parse.y" +#line 2013 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 386: -#line 2175 "objc-parse.y" +#line 2020 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 389: -#line 2182 "objc-parse.y" +#line 2027 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 390: -#line 2187 "objc-parse.y" +#line 2032 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 391: -#line 2192 "objc-parse.y" +#line 2037 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, combine_strings (yyvsp[0].ttype), NULL_TREE); ; break;} case 392: -#line 2194 "objc-parse.y" +#line 2039 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, combine_strings (yyvsp[0].ttype), yyvsp[-2].ttype); ; break;} case 393: -#line 2200 "objc-parse.y" +#line 2045 "objc-parse.y" { pushlevel (0); clear_parm_order (); declare_parm_level (0); ; break;} case 394: -#line 2204 "objc-parse.y" +#line 2049 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; parmlist_tags_warning (); poplevel (0, 0, 0); ; break;} case 396: -#line 2212 "objc-parse.y" +#line 2057 "objc-parse.y" { tree parm; if (pedantic) pedwarn ("ANSI C forbids forward parameter declarations"); @@ -4291,19 +4136,19 @@ case 396: clear_parm_order (); ; break;} case 397: -#line 2220 "objc-parse.y" +#line 2065 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 398: -#line 2222 "objc-parse.y" +#line 2067 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, NULL_TREE); ; break;} case 399: -#line 2228 "objc-parse.y" +#line 2073 "objc-parse.y" { yyval.ttype = get_parm_info (0); ; break;} case 400: -#line 2230 "objc-parse.y" +#line 2075 "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. @@ -4315,23 +4160,23 @@ case 400: ; break;} case 401: -#line 2240 "objc-parse.y" +#line 2085 "objc-parse.y" { yyval.ttype = get_parm_info (1); ; break;} case 402: -#line 2242 "objc-parse.y" +#line 2087 "objc-parse.y" { yyval.ttype = get_parm_info (0); ; break;} case 403: -#line 2247 "objc-parse.y" +#line 2092 "objc-parse.y" { push_parm_decl (yyvsp[0].ttype); ; break;} case 404: -#line 2249 "objc-parse.y" +#line 2094 "objc-parse.y" { push_parm_decl (yyvsp[0].ttype); ; break;} case 405: -#line 2256 "objc-parse.y" +#line 2101 "objc-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -4341,7 +4186,7 @@ case 405: declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 406: -#line 2264 "objc-parse.y" +#line 2109 "objc-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -4351,7 +4196,7 @@ case 406: declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 407: -#line 2272 "objc-parse.y" +#line 2117 "objc-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -4361,7 +4206,7 @@ case 407: declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 408: -#line 2280 "objc-parse.y" +#line 2125 "objc-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -4371,7 +4216,7 @@ case 408: declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 409: -#line 2289 "objc-parse.y" +#line 2134 "objc-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -4381,19 +4226,19 @@ case 409: declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 410: -#line 2302 "objc-parse.y" +#line 2147 "objc-parse.y" { pushlevel (0); clear_parm_order (); declare_parm_level (1); ; break;} case 411: -#line 2306 "objc-parse.y" +#line 2151 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; parmlist_tags_warning (); poplevel (0, 0, 0); ; break;} case 413: -#line 2314 "objc-parse.y" +#line 2159 "objc-parse.y" { tree t; for (t = yyvsp[-1].ttype; t; t = TREE_CHAIN (t)) if (TREE_VALUE (t) == NULL_TREE) @@ -4401,29 +4246,29 @@ case 413: yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, yyvsp[-1].ttype); ; break;} case 414: -#line 2324 "objc-parse.y" +#line 2169 "objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} case 415: -#line 2326 "objc-parse.y" +#line 2171 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} case 416: -#line 2332 "objc-parse.y" +#line 2177 "objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} case 417: -#line 2334 "objc-parse.y" +#line 2179 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} case 418: -#line 2339 "objc-parse.y" +#line 2184 "objc-parse.y" { yyval.ttype = SAVE_WARN_FLAGS(); pedantic = 0; warn_pointer_arith = 0; ; break;} case 424: -#line 2353 "objc-parse.y" +#line 2198 "objc-parse.y" { if (objc_implementation_context) { @@ -4436,27 +4281,27 @@ case 424: ; break;} case 425: -#line 2368 "objc-parse.y" +#line 2213 "objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} case 426: -#line 2370 "objc-parse.y" +#line 2215 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} case 427: -#line 2375 "objc-parse.y" +#line 2220 "objc-parse.y" { objc_declare_class (yyvsp[-1].ttype); ; break;} case 428: -#line 2381 "objc-parse.y" +#line 2226 "objc-parse.y" { objc_declare_alias (yyvsp[-2].ttype, yyvsp[-1].ttype); ; break;} case 429: -#line 2387 "objc-parse.y" +#line 2232 "objc-parse.y" { objc_interface_context = objc_ivar_context = start_class (CLASS_INTERFACE_TYPE, yyvsp[-2].ttype, NULL_TREE, yyvsp[-1].ttype); @@ -4464,20 +4309,20 @@ case 429: ; break;} case 430: -#line 2393 "objc-parse.y" +#line 2238 "objc-parse.y" { continue_class (objc_interface_context); ; break;} case 431: -#line 2398 "objc-parse.y" +#line 2243 "objc-parse.y" { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ; break;} case 432: -#line 2404 "objc-parse.y" +#line 2249 "objc-parse.y" { objc_interface_context = start_class (CLASS_INTERFACE_TYPE, yyvsp[-1].ttype, NULL_TREE, yyvsp[0].ttype); @@ -4485,14 +4330,14 @@ case 432: ; break;} case 433: -#line 2411 "objc-parse.y" +#line 2256 "objc-parse.y" { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ; break;} case 434: -#line 2417 "objc-parse.y" +#line 2262 "objc-parse.y" { objc_interface_context = objc_ivar_context = start_class (CLASS_INTERFACE_TYPE, yyvsp[-4].ttype, yyvsp[-2].ttype, yyvsp[-1].ttype); @@ -4500,20 +4345,20 @@ case 434: ; break;} case 435: -#line 2423 "objc-parse.y" +#line 2268 "objc-parse.y" { continue_class (objc_interface_context); ; break;} case 436: -#line 2428 "objc-parse.y" +#line 2273 "objc-parse.y" { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ; break;} case 437: -#line 2434 "objc-parse.y" +#line 2279 "objc-parse.y" { objc_interface_context = start_class (CLASS_INTERFACE_TYPE, yyvsp[-3].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); @@ -4521,14 +4366,14 @@ case 437: ; break;} case 438: -#line 2441 "objc-parse.y" +#line 2286 "objc-parse.y" { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ; break;} case 439: -#line 2447 "objc-parse.y" +#line 2292 "objc-parse.y" { objc_implementation_context = objc_ivar_context = start_class (CLASS_IMPLEMENTATION_TYPE, yyvsp[-1].ttype, NULL_TREE, NULL_TREE); @@ -4536,14 +4381,14 @@ case 439: ; break;} case 440: -#line 2453 "objc-parse.y" +#line 2298 "objc-parse.y" { objc_ivar_chain = continue_class (objc_implementation_context); ; break;} case 441: -#line 2459 "objc-parse.y" +#line 2304 "objc-parse.y" { objc_implementation_context = start_class (CLASS_IMPLEMENTATION_TYPE, yyvsp[0].ttype, NULL_TREE, NULL_TREE); @@ -4552,7 +4397,7 @@ case 441: ; break;} case 442: -#line 2467 "objc-parse.y" +#line 2312 "objc-parse.y" { objc_implementation_context = objc_ivar_context = start_class (CLASS_IMPLEMENTATION_TYPE, yyvsp[-3].ttype, yyvsp[-1].ttype, NULL_TREE); @@ -4560,14 +4405,14 @@ case 442: ; break;} case 443: -#line 2473 "objc-parse.y" +#line 2318 "objc-parse.y" { objc_ivar_chain = continue_class (objc_implementation_context); ; break;} case 444: -#line 2479 "objc-parse.y" +#line 2324 "objc-parse.y" { objc_implementation_context = start_class (CLASS_IMPLEMENTATION_TYPE, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); @@ -4576,7 +4421,7 @@ case 444: ; break;} case 445: -#line 2487 "objc-parse.y" +#line 2332 "objc-parse.y" { objc_interface_context = start_class (CATEGORY_INTERFACE_TYPE, yyvsp[-4].ttype, yyvsp[-2].ttype, yyvsp[0].ttype); @@ -4584,14 +4429,14 @@ case 445: ; break;} case 446: -#line 2494 "objc-parse.y" +#line 2339 "objc-parse.y" { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ; break;} case 447: -#line 2500 "objc-parse.y" +#line 2345 "objc-parse.y" { objc_implementation_context = start_class (CATEGORY_IMPLEMENTATION_TYPE, yyvsp[-3].ttype, yyvsp[-1].ttype, NULL_TREE); @@ -4600,7 +4445,7 @@ case 447: ; break;} case 448: -#line 2510 "objc-parse.y" +#line 2355 "objc-parse.y" { remember_protocol_qualifiers (); objc_interface_context @@ -4608,7 +4453,7 @@ case 448: ; break;} case 449: -#line 2516 "objc-parse.y" +#line 2361 "objc-parse.y" { forget_protocol_qualifiers(); finish_protocol(objc_interface_context); @@ -4616,13 +4461,13 @@ case 449: ; break;} case 450: -#line 2525 "objc-parse.y" +#line 2370 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 452: -#line 2533 "objc-parse.y" +#line 2378 "objc-parse.y" { if (yyvsp[-2].code == LT_EXPR && yyvsp[0].code == GT_EXPR) yyval.ttype = yyvsp[-1].ttype; @@ -4631,54 +4476,54 @@ case 452: ; break;} case 455: -#line 2547 "objc-parse.y" +#line 2392 "objc-parse.y" { objc_public_flag = 2; ; break;} case 456: -#line 2548 "objc-parse.y" +#line 2393 "objc-parse.y" { objc_public_flag = 0; ; break;} case 457: -#line 2549 "objc-parse.y" +#line 2394 "objc-parse.y" { objc_public_flag = 1; ; break;} case 458: -#line 2554 "objc-parse.y" +#line 2399 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 460: -#line 2559 "objc-parse.y" +#line 2404 "objc-parse.y" { if (pedantic) pedwarn ("extra semicolon in struct or union specified"); ; break;} case 461: -#line 2577 "objc-parse.y" +#line 2422 "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 462: -#line 2582 "objc-parse.y" +#line 2427 "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 463: -#line 2587 "objc-parse.y" +#line 2432 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 464: -#line 2592 "objc-parse.y" +#line 2437 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 467: -#line 2599 "objc-parse.y" +#line 2444 "objc-parse.y" { yyval.ttype = add_instance_variable (objc_ivar_context, objc_public_flag, @@ -4687,7 +4532,7 @@ case 467: ; break;} case 468: -#line 2606 "objc-parse.y" +#line 2451 "objc-parse.y" { yyval.ttype = add_instance_variable (objc_ivar_context, objc_public_flag, @@ -4695,7 +4540,7 @@ case 468: ; break;} case 469: -#line 2612 "objc-parse.y" +#line 2457 "objc-parse.y" { yyval.ttype = add_instance_variable (objc_ivar_context, objc_public_flag, @@ -4704,7 +4549,7 @@ case 469: ; break;} case 470: -#line 2622 "objc-parse.y" +#line 2467 "objc-parse.y" { remember_protocol_qualifiers (); if (objc_implementation_context) @@ -4714,7 +4559,7 @@ case 470: ; break;} case 471: -#line 2630 "objc-parse.y" +#line 2475 "objc-parse.y" { forget_protocol_qualifiers (); add_class_method (objc_implementation_context, yyvsp[0].ttype); @@ -4723,20 +4568,20 @@ case 471: ; break;} case 472: -#line 2637 "objc-parse.y" +#line 2482 "objc-parse.y" { continue_method_def (); ; break;} case 473: -#line 2641 "objc-parse.y" +#line 2486 "objc-parse.y" { finish_method_def (); objc_method_context = NULL_TREE; ; break;} case 474: -#line 2647 "objc-parse.y" +#line 2492 "objc-parse.y" { remember_protocol_qualifiers (); if (objc_implementation_context) @@ -4746,7 +4591,7 @@ case 474: ; break;} case 475: -#line 2655 "objc-parse.y" +#line 2500 "objc-parse.y" { forget_protocol_qualifiers (); add_instance_method (objc_implementation_context, yyvsp[0].ttype); @@ -4755,28 +4600,28 @@ case 475: ; break;} case 476: -#line 2662 "objc-parse.y" +#line 2507 "objc-parse.y" { continue_method_def (); ; break;} case 477: -#line 2666 "objc-parse.y" +#line 2511 "objc-parse.y" { finish_method_def (); objc_method_context = NULL_TREE; ; break;} case 479: -#line 2678 "objc-parse.y" +#line 2523 "objc-parse.y" {yyval.ttype = NULL_TREE; ; break;} case 484: -#line 2685 "objc-parse.y" +#line 2530 "objc-parse.y" {yyval.ttype = NULL_TREE; ; break;} case 488: -#line 2695 "objc-parse.y" +#line 2540 "objc-parse.y" { /* Remember protocol qualifiers in prototypes. */ remember_protocol_qualifiers (); @@ -4784,7 +4629,7 @@ case 488: ; break;} case 489: -#line 2701 "objc-parse.y" +#line 2546 "objc-parse.y" { /* Forget protocol qualifiers here. */ forget_protocol_qualifiers (); @@ -4792,7 +4637,7 @@ case 489: ; break;} case 491: -#line 2709 "objc-parse.y" +#line 2554 "objc-parse.y" { /* Remember protocol qualifiers in prototypes. */ remember_protocol_qualifiers (); @@ -4800,7 +4645,7 @@ case 491: ; break;} case 492: -#line 2715 "objc-parse.y" +#line 2560 "objc-parse.y" { /* Forget protocol qualifiers here. */ forget_protocol_qualifiers (); @@ -4808,93 +4653,93 @@ case 492: ; break;} case 494: -#line 2725 "objc-parse.y" +#line 2570 "objc-parse.y" { yyval.ttype = build_method_decl (objc_inherit_code, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 495: -#line 2730 "objc-parse.y" +#line 2575 "objc-parse.y" { yyval.ttype = build_method_decl (objc_inherit_code, NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} case 496: -#line 2735 "objc-parse.y" +#line 2580 "objc-parse.y" { yyval.ttype = build_method_decl (objc_inherit_code, yyvsp[-3].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 497: -#line 2740 "objc-parse.y" +#line 2585 "objc-parse.y" { yyval.ttype = build_method_decl (objc_inherit_code, NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 506: -#line 2770 "objc-parse.y" +#line 2615 "objc-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 507: -#line 2774 "objc-parse.y" +#line 2619 "objc-parse.y" { shadow_tag (yyvsp[-1].ttype); ; break;} case 508: -#line 2776 "objc-parse.y" +#line 2621 "objc-parse.y" { pedwarn ("empty declaration"); ; break;} case 509: -#line 2781 "objc-parse.y" +#line 2626 "objc-parse.y" { push_parm_decl (yyvsp[0].ttype); ; break;} case 510: -#line 2783 "objc-parse.y" +#line 2628 "objc-parse.y" { push_parm_decl (yyvsp[0].ttype); ; break;} case 511: -#line 2791 "objc-parse.y" +#line 2636 "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 512: -#line 2796 "objc-parse.y" +#line 2641 "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 513: -#line 2801 "objc-parse.y" +#line 2646 "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 514: -#line 2809 "objc-parse.y" +#line 2654 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 515: -#line 2813 "objc-parse.y" +#line 2658 "objc-parse.y" { /* oh what a kludge! */ yyval.ttype = objc_ellipsis_node; ; break;} case 516: -#line 2818 "objc-parse.y" +#line 2663 "objc-parse.y" { pushlevel (0); ; break;} case 517: -#line 2822 "objc-parse.y" +#line 2667 "objc-parse.y" { /* returns a tree list node generated by get_parm_info */ yyval.ttype = yyvsp[0].ttype; @@ -4902,119 +4747,119 @@ case 517: ; break;} case 520: -#line 2837 "objc-parse.y" +#line 2682 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 525: -#line 2850 "objc-parse.y" +#line 2695 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 526: -#line 2851 "objc-parse.y" +#line 2696 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 527: -#line 2852 "objc-parse.y" +#line 2697 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 528: -#line 2853 "objc-parse.y" +#line 2698 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 529: -#line 2854 "objc-parse.y" +#line 2699 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 530: -#line 2855 "objc-parse.y" +#line 2700 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 531: -#line 2856 "objc-parse.y" +#line 2701 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 532: -#line 2857 "objc-parse.y" +#line 2702 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 533: -#line 2858 "objc-parse.y" +#line 2703 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 534: -#line 2859 "objc-parse.y" +#line 2704 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 535: -#line 2860 "objc-parse.y" +#line 2705 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 536: -#line 2861 "objc-parse.y" +#line 2706 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 537: -#line 2862 "objc-parse.y" +#line 2707 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 538: -#line 2863 "objc-parse.y" +#line 2708 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 539: -#line 2864 "objc-parse.y" +#line 2709 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 540: -#line 2865 "objc-parse.y" +#line 2710 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 541: -#line 2866 "objc-parse.y" +#line 2711 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 542: -#line 2867 "objc-parse.y" +#line 2712 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 543: -#line 2868 "objc-parse.y" +#line 2713 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 546: -#line 2874 "objc-parse.y" +#line 2719 "objc-parse.y" { yyval.ttype = build_keyword_decl (yyvsp[-5].ttype, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 547: -#line 2879 "objc-parse.y" +#line 2724 "objc-parse.y" { yyval.ttype = build_keyword_decl (yyvsp[-2].ttype, NULL_TREE, yyvsp[0].ttype); ; break;} case 548: -#line 2884 "objc-parse.y" +#line 2729 "objc-parse.y" { yyval.ttype = build_keyword_decl (NULL_TREE, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 549: -#line 2889 "objc-parse.y" +#line 2734 "objc-parse.y" { yyval.ttype = build_keyword_decl (NULL_TREE, NULL_TREE, yyvsp[0].ttype); ; break;} case 553: -#line 2902 "objc-parse.y" +#line 2747 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 554: -#line 2910 "objc-parse.y" +#line 2755 "objc-parse.y" { if (TREE_CHAIN (yyvsp[0].ttype) == NULL_TREE) /* just return the expr., remove a level of indirection */ @@ -5025,76 +4870,76 @@ case 554: ; break;} case 555: -#line 2922 "objc-parse.y" +#line 2767 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 556: -#line 2926 "objc-parse.y" +#line 2771 "objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} case 558: -#line 2934 "objc-parse.y" +#line 2779 "objc-parse.y" { yyval.ttype = get_class_reference (yyvsp[0].ttype); ; break;} case 559: -#line 2941 "objc-parse.y" +#line 2786 "objc-parse.y" { objc_receiver_context = 1; ; break;} case 560: -#line 2943 "objc-parse.y" +#line 2788 "objc-parse.y" { objc_receiver_context = 0; ; break;} case 561: -#line 2945 "objc-parse.y" +#line 2790 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 565: -#line 2958 "objc-parse.y" +#line 2803 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 566: -#line 2965 "objc-parse.y" +#line 2810 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-1].ttype, NULL_TREE); ; break;} case 567: -#line 2969 "objc-parse.y" +#line 2814 "objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, NULL_TREE); ; break;} case 568: -#line 2976 "objc-parse.y" +#line 2821 "objc-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 569: -#line 2983 "objc-parse.y" +#line 2828 "objc-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 570: -#line 2992 "objc-parse.y" +#line 2837 "objc-parse.y" { yyval.ttype = groktypename (yyvsp[-1].ttype); ; break;} } /* the action file gets copied in in place of this dollarsign */ -#line 543 "/usr/lib/bison.simple" +#line 543 "/usr/share/misc/bison.simple" yyvsp -= yylen; yyssp -= yylen; @@ -5314,5 +5159,5 @@ yyerrhandle: } return 1; } -#line 2997 "objc-parse.y" +#line 2842 "objc-parse.y" diff --git a/gcc/objc/objc-parse.y b/gcc/objc/objc-parse.y index 7bf9119175d..b6f15b20b27 100644 --- a/gcc/objc/objc-parse.y +++ b/gcc/objc/objc-parse.y @@ -213,9 +213,6 @@ static tree prefix_attributes = NULL_TREE; /* Stack of saved values of current_declspecs and prefix_attributes. */ static tree declspec_stack; -/* 1 if we explained undeclared var errors. */ -static int undeclared_variable_notice; - /* For __extension__, save/restore the warning flags which are controlled by __extension__. */ #define SAVE_WARN_FLAGS() \ @@ -607,161 +604,9 @@ expr_no_commas: primary: IDENTIFIER { - $$ = lastiddecl; - if (!$$ || $$ == error_mark_node) - { - if (yychar == YYEMPTY) - yychar = YYLEX; - if (yychar == '(') - { - tree decl; - - if (objc_receiver_context - && ! (objc_receiver_context - && strcmp (IDENTIFIER_POINTER ($1), "super"))) - /* we have a message to super */ - $$ = get_super_receiver (); - else if (objc_method_context - && (decl = is_ivar (objc_ivar_chain, $1))) - { - if (is_private (decl)) - $$ = error_mark_node; - else - $$ = build_ivar_reference ($1); - } - else - { - /* Ordinary implicit function declaration. */ - $$ = implicitly_declare ($1); - assemble_external ($$); - TREE_USED ($$) = 1; - } - } - else if (current_function_decl == 0) - { - error ("`%s' undeclared here (not in a function)", - IDENTIFIER_POINTER ($1)); - $$ = error_mark_node; - } - else - { - tree decl; - - if (objc_receiver_context - && ! strcmp (IDENTIFIER_POINTER ($1), "super")) - /* we have a message to super */ - $$ = get_super_receiver (); - else if (objc_method_context - && (decl = is_ivar (objc_ivar_chain, $1))) - { - if (is_private (decl)) - $$ = error_mark_node; - else - $$ = build_ivar_reference ($1); - } - else - { - if (IDENTIFIER_GLOBAL_VALUE ($1) != error_mark_node - || IDENTIFIER_ERROR_LOCUS ($1) != current_function_decl) - { - error ("`%s' undeclared (first use in this function)", - IDENTIFIER_POINTER ($1)); - - if (! undeclared_variable_notice) - { - error ("(Each undeclared identifier is reported only once"); - error ("for each function it appears in.)"); - undeclared_variable_notice = 1; - } - } - $$ = error_mark_node; - /* Prevent repeated error messages. */ - IDENTIFIER_GLOBAL_VALUE ($1) = error_mark_node; - IDENTIFIER_ERROR_LOCUS ($1) = current_function_decl; - } - } - } - else if (TREE_TYPE ($$) == error_mark_node) - $$ = error_mark_node; - else if (C_DECL_ANTICIPATED ($$)) - { - /* The first time we see a build-in function used, - if it has not been declared. */ - C_DECL_ANTICIPATED ($$) = 0; - if (yychar == YYEMPTY) - yychar = YYLEX; - if (yychar == '(') - { - /* Omit the implicit declaration we - would ordinarily do, so we don't lose - the actual built in type. - But print a diagnostic for the mismatch. */ - if (objc_method_context - && is_ivar (objc_ivar_chain, $1)) - error ("Instance variable `%s' implicitly declared as function", - IDENTIFIER_POINTER (DECL_NAME ($$))); - else - if (TREE_CODE ($$) != FUNCTION_DECL) - error ("`%s' implicitly declared as function", - IDENTIFIER_POINTER (DECL_NAME ($$))); - else if ((TYPE_MODE (TREE_TYPE (TREE_TYPE ($$))) - != TYPE_MODE (integer_type_node)) - && !VOID_TYPE_P (TREE_TYPE (TREE_TYPE ($$)))) - pedwarn ("type mismatch in implicit declaration for built-in function `%s'", - IDENTIFIER_POINTER (DECL_NAME ($$))); - /* If it really returns void, change that to int. */ - if (TREE_TYPE (TREE_TYPE ($$)) == void_type_node) - TREE_TYPE ($$) - = build_function_type (integer_type_node, - TYPE_ARG_TYPES (TREE_TYPE ($$))); - } - else - pedwarn ("built-in function `%s' used without declaration", - IDENTIFIER_POINTER (DECL_NAME ($$))); - - /* Do what we would ordinarily do when a fn is used. */ - assemble_external ($$); - TREE_USED ($$) = 1; - } - else - { - assemble_external ($$); - TREE_USED ($$) = 1; - /* we have a definition - still check if iVariable */ - - if (!objc_receiver_context - || (objc_receiver_context - && strcmp (IDENTIFIER_POINTER ($1), "super"))) - { - tree decl; - - if (objc_method_context - && (decl = is_ivar (objc_ivar_chain, $1))) - { - if (IDENTIFIER_LOCAL_VALUE ($1)) - warning ("local declaration of `%s' hides instance variable", - IDENTIFIER_POINTER ($1)); - else - { - if (is_private (decl)) - $$ = error_mark_node; - else - $$ = build_ivar_reference ($1); - } - } - } - else /* we have a message to super */ - $$ = get_super_receiver (); - } - - if (TREE_CODE ($$) == CONST_DECL) - { - $$ = DECL_INITIAL ($$); - /* This is to prevent an enum whose value is 0 - from being considered a null pointer constant. */ - $$ = build1 (NOP_EXPR, TREE_TYPE ($$), $$); - TREE_CONSTANT ($$) = 1; - } + if (yychar == YYEMPTY) + yychar = YYLEX; + $$ = build_external_ref ($1, yychar == '('); } | CONSTANT | string -- 2.30.2