gcc/gcc/c-lang.c

205 lines
5.0 KiB
C
Raw Normal View History

1991-12-25 04:55:54 +01:00
/* Language-specific hook definitions for C front end.
2000-02-26 06:45:17 +01:00
Copyright (C) 1991, 1995, 1997, 1998,
1999, 2000, 2001 Free Software Foundation, Inc.
1991-12-25 04:55:54 +01:00
Makefile.in, [...]: replace "GNU CC" with "GCC". * Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, builtin-types.def, builtins.c, builtins.def, c-aux-info.c, c-common.c, c-common.def, c-common.h, c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c, c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in, c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c, caller-save.c, calls.c, collect2.c, collect2.h, combine.c, conditions.h, config.gcc, configure.frag, configure.in, conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c, cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h, dependence.c, df.c, df.h, diagnostic.c, diagnostic.h, doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c, dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c, emit-rtl.c, errors.c, errors.h, except.c, except.h, exgettext, explow.c, expmed.c, expr.c, expr.h, final.c, fixproto, flags.h, flow.c, fold-const.c, fp-test.c, function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp, gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c, gencheck.c, gencodes.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, genmultilib, genopinit.c, genoutput.c, genpeep.c, genrecog.c, gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c, ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c, graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h, gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h, gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h, hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h, integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c, libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h, machmode.def, machmode.h, main.c, mbchar.c, mbchar.h, mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk, mkmap-symver.awk, optabs.c, output.h, params.c, params.def, params.h, predict.c, predict.def, predict.h, prefix.c, prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c, read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c, regclass.c, regmove.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c, rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h, sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c, sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c, ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c, stringpool.c, system.h, timevar.c, timevar.def, timevar.h, tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h, tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h, unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h, unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c, xcoffout.h: replace "GNU CC" with "GCC". From-SVN: r45105
2001-08-22 16:35:51 +02:00
This file is part of GCC.
1991-12-25 04:55:54 +01:00
Makefile.in, [...]: replace "GNU CC" with "GCC". * Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, builtin-types.def, builtins.c, builtins.def, c-aux-info.c, c-common.c, c-common.def, c-common.h, c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c, c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in, c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c, caller-save.c, calls.c, collect2.c, collect2.h, combine.c, conditions.h, config.gcc, configure.frag, configure.in, conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c, cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h, dependence.c, df.c, df.h, diagnostic.c, diagnostic.h, doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c, dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c, emit-rtl.c, errors.c, errors.h, except.c, except.h, exgettext, explow.c, expmed.c, expr.c, expr.h, final.c, fixproto, flags.h, flow.c, fold-const.c, fp-test.c, function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp, gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c, gencheck.c, gencodes.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, genmultilib, genopinit.c, genoutput.c, genpeep.c, genrecog.c, gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c, ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c, graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h, gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h, gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h, hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h, integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c, libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h, machmode.def, machmode.h, main.c, mbchar.c, mbchar.h, mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk, mkmap-symver.awk, optabs.c, output.h, params.c, params.def, params.h, predict.c, predict.def, predict.h, prefix.c, prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c, read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c, regclass.c, regmove.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c, rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h, sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c, sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c, ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c, stringpool.c, system.h, timevar.c, timevar.def, timevar.h, tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h, tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h, unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h, unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c, xcoffout.h: replace "GNU CC" with "GCC". From-SVN: r45105
2001-08-22 16:35:51 +02:00
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
1991-12-25 04:55:54 +01:00
Makefile.in, [...]: replace "GNU CC" with "GCC". * Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, builtin-types.def, builtins.c, builtins.def, c-aux-info.c, c-common.c, c-common.def, c-common.h, c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c, c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in, c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c, caller-save.c, calls.c, collect2.c, collect2.h, combine.c, conditions.h, config.gcc, configure.frag, configure.in, conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c, cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h, dependence.c, df.c, df.h, diagnostic.c, diagnostic.h, doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c, dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c, emit-rtl.c, errors.c, errors.h, except.c, except.h, exgettext, explow.c, expmed.c, expr.c, expr.h, final.c, fixproto, flags.h, flow.c, fold-const.c, fp-test.c, function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp, gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c, gencheck.c, gencodes.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, genmultilib, genopinit.c, genoutput.c, genpeep.c, genrecog.c, gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c, ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c, graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h, gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h, gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h, hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h, integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c, libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h, machmode.def, machmode.h, main.c, mbchar.c, mbchar.h, mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk, mkmap-symver.awk, optabs.c, output.h, params.c, params.def, params.h, predict.c, predict.def, predict.h, prefix.c, prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c, read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c, regclass.c, regmove.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c, rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h, sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c, sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c, ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c, stringpool.c, system.h, timevar.c, timevar.def, timevar.h, tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h, tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h, unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h, unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c, xcoffout.h: replace "GNU CC" with "GCC". From-SVN: r45105
2001-08-22 16:35:51 +02:00
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
1991-12-25 04:55:54 +01:00
You should have received a copy of the GNU General Public License
Makefile.in, [...]: replace "GNU CC" with "GCC". * Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, builtin-types.def, builtins.c, builtins.def, c-aux-info.c, c-common.c, c-common.def, c-common.h, c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c, c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in, c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c, caller-save.c, calls.c, collect2.c, collect2.h, combine.c, conditions.h, config.gcc, configure.frag, configure.in, conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c, cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h, dependence.c, df.c, df.h, diagnostic.c, diagnostic.h, doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c, dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c, emit-rtl.c, errors.c, errors.h, except.c, except.h, exgettext, explow.c, expmed.c, expr.c, expr.h, final.c, fixproto, flags.h, flow.c, fold-const.c, fp-test.c, function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp, gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c, gencheck.c, gencodes.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, genmultilib, genopinit.c, genoutput.c, genpeep.c, genrecog.c, gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c, ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c, graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h, gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h, gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h, hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h, integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c, libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h, machmode.def, machmode.h, main.c, mbchar.c, mbchar.h, mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk, mkmap-symver.awk, optabs.c, output.h, params.c, params.def, params.h, predict.c, predict.def, predict.h, prefix.c, prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c, read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c, regclass.c, regmove.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c, rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h, sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c, sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c, ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c, stringpool.c, system.h, timevar.c, timevar.def, timevar.h, tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h, tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h, unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h, unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c, xcoffout.h: replace "GNU CC" with "GCC". From-SVN: r45105
2001-08-22 16:35:51 +02:00
along with GCC; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
1991-12-25 04:55:54 +01:00
#include "config.h"
Major cutover to using system.h: * Makefile.in (alias.o, bitmap.o, c-aux-info.o, c-common.o, c-decl.o, c-iterate.o, c-lang.o, c-lex.o, c-pragma.o, c-typeck.o, caller-save.o, calls.o, collect2.o, combine.o, cse.o, dbxout.o, dwarf2out.o, dwarfout.o, emit-rtl.o, except.o, explow.o, expmed.o, expr.o, final.o, flow.o, function.o, getpwd.o, global.o, integrate.o, jump.o, local-alloc.o, loop.o, optabs.o, pexecute.o, prefix.o, print-rtl.o, print-tree.o, profile.o, real.o, recog.o, reg-stack.o, regclass.o, regmove.o, reload.o, reload1.o, reorg.o, rtl.o, rtlanal.o, sdbout.o, stmt.o, stor-layout.o, stupid.o, tlink.o, toplev.o, tree.o, unroll.o, varasm.o, xcoffout.o): Depend on system.h. * alias.c, bitmap.c, c-aux-info.c, c-common.c, c-decl.c, c-iterate.c, c-lang.c, c-lex.c, c-pragma.c, c-typeck.c, caller-save.c, calls.c, collect2.c, combine.c, cse.c, dbxout.c, dwarf2out.c, dwarfout.c, emit-rtl.c, except.c, explow.c, expmed.c, expr.c, final.c, flow.c, function.c, gcc.c, getpwd.c, global.c, integrate.c, jump.c, local-alloc.c, loop.c, optabs.c, pexecute.c, prefix.c, print-rtl.c, print-tree.c, profile.c, real.c, recog.c, reg-stack.c, regclass.c, regmove.c, reload.c, reload1.c, reorg.c, rtl.c, rtlanal.c, sched.c, sdbout.c, stmt.c, stor-layout.c, stupid.c, tlink.c, toplev.c, tree.c, unroll.c, varasm.c, xcoffout.c: Include system.h. Organize include ordering so that stdarg/varargs comes before other system headers. Remove spurious casts of functions assured of a prototype in system.h. From-SVN: r18726
1998-03-20 15:58:42 +01:00
#include "system.h"
1991-12-25 04:55:54 +01:00
#include "tree.h"
splay-tree.c (splay_tree_predecessor): Fix typo in comment. * splay-tree.c (splay_tree_predecessor): Fix typo in comment. Convert the C front-end to use function-at-a-time mode. * c-common.h: Include splay-tree.h. (C_DECLARED_LABEL_FLAG): New macro. (struct language_function): Add x_scope_stmt_stack and x_function_name_declared_p. (RECHAIN_STMTS): Move definition. (lang_statment_code_p): Likewise. (lang_expand_stmt): Likewise. (lang_expand_decl_stmt): New variable. (lang_expand_function_end): Likewise. (current_scope_stmt_stack): New function. (add_decl_stmt): Likewise. (add_scope_stmt): Likewise. (mark_stmt_tree): Likewise. (struct c_lang_decl): New structure. (DECL_SAVED_TREE): Define. (c_mark_lang_decl): New function. (c_expand_start_cond): Change prototype. (c_finish_then): New function. (c_finish_else): Likewise. (current_function_name_declared): Remove. (set_current_function_name_declared): Likewise. (mark_c_language_function): Declare. (case_compare): Likewise. (c_add_case_label): Likewise. (c_expand_expr): Likewise. (c_safe_from_p): Likewise. * c-common.c (lang_expand_function_end): New variable. (struct if_elt): Add if_stmt. (c_expand_start_cond): Add the if-statement to the statement-tree, rather than generating RTL. (c_finish_then): New function. (c_expand_start_else): Don't generate RTL. (c_finish_else): New function. (c_expand_expr_stmt): Don't generate RTL. (statement_code_p): Add SCOPE_STMT. (case_compare): New function. (c_add_case_label): Likewise. (mark_stmt_tree): Likewise. (c_mark_lang_decl): Likewise. (mark_c_language_function): Likewise. (c_expand_expr): Likewise. (c_safe_from_p): Likewise. * c-decl.c (c_stmt_tree): New variable (c_scope_stmt_stack): Likewise. (c_function_name_declared_p): Likewise. (lang_expand_expr_stmt): Remove. (poplevel): Don't call output_inline_function for nested functions. (pushdecl): Don't set DECL_CONTEXT for a local declaration of an `extern' function. (redeclaration_error_message): Change means of computing whether or not a function is nested. (lookup_label): Don't call label_rtx. (init_decl_processing): Add more GC roots. (start_decl): Add DECL_STMTs to the statement-tree, rather than calling rest_of_decl_compilation. (finish_decl): Don't call expand_decl. (store_parm_decls): Begin the statement-tree, but don't generate RTL. (finish_function): Tie off the statement-tree. Call c_expand_body if appropriate. (c_expand_body): New function. (push_c_function_context): Save more information. (pop_c_function_contxt): Likewise. (copy_lang_decl): Now that we use DECL_LANG_SPECIFIC, copy it. (lang_mark_tree): Mark it. (current_stmt_tree): Adjust. (current_scope_stmt_stack): New function. (do_case): Remove. (set_current_name_declared): Likewise. (c_begin_compound_stmt): Define. (c_expand_decl_stmt): Likewise. * c-lang.c: Include rtl.h and expr.h. (lang_init): Set more language-specific hooks. * c-lex.c: Include expr.h. * c-parse.in: Changes throughout to add statements to the statement-tree, rather than generating RTL after every statement. * c-semantics.c (lang_expand_decl_stmt): Define. (add_decl_stmt): New function. (add_scope_stmt): Likewise. (finish_stmt_tree): Tweak. (genrtl_expr_stmt): Likewise. (genrtl_decl_stmt): Handle local labels, and call lang_expand_decl_stmt if required. (genrtl_for_stmt): Fix line-number handling. (genrtl_case_label): Handle cleanups. (genrtl_asm_stmt): Don't call combine_strings. (genrtl_compound_stmt): Simplify. (expand_stmt): Handle SCOPE_STMTs. * c-tree.h (struct lang_decl): New structure. (C_DECLARED_LABEL_FLAG): Remove. (c_begin_compound_stmt): Declare. (c_expand_decl_stmt): Likewise. (c_expand_start_case): Rename to c_start_case. (c_finish_case): New function. * c-typeck.c (start_init): Tweak setting of constructor_incremental. (c_expand_asm_operands): Tweak error-handling. Add to the statement-tree. (c_expand_return): Add to the statement-tree. (c_expand_start_case): Rename to ... (c_start_case): ... this. (struct c_switch): New type. (switch_stack): New variable. (do_case): Simplify. (c_finish_case): New function. * dependence.c: Include expr.h. (enum dependence_type): Change spelling of enumerals. (check_node_dependence): Adjust. * expr.h (lang_safe_from_p): Declare. (safe_from_p): Likewise. * expr.c (lang_safe_from_p): New variable. (safe_from_p): Give it external linkage. Use lang_safe_from_p. * stmt.c (expand_expr_stmt): Avoid clobberring of last_expr_type. * toplev.c (rest_of_decl_compilation): Robustify. * tree.c (contains_placeholder_p): Likewise. * Makefile.in: Update dependencies. * objc/objc-act.h: Adjust calculation of value for dummy_tree_code. * objc/objc-act.c: Include rtl.h, expr.h, and c-common.h. (objc_expand_function_end): New function. (finish_method_def): Use it. (init_objc): Initialize more language-specific hooks. * objc/Make-lang.in: Update dependencies. * cp-tree.h (struct cp_language_function): Remove x_scope_stmt_stack and name_declared. (current_scope_stmt_stack): Remove. (function_name_declared_p): New macro. (struct lang_decl_flags): Use c_lang_decl as a base class. (context): Remove. (struct lang_decl): Replace saved_tree with context. (DECL_FRIEND_CONTEXT): Adjust accordingly. (SET_DECL_FRIEND_CONTEXT): Likewise. (DECL_VIRTUAL_CONTEXT): Likewise. (DECL_SAVED_TREE): Remove. (C_DECLARED_LABEL_FLAG): Likewise. (cplus_expand_expr_stmt): Don't declare. (add_decl_stmt): Likewise. (add_scope_stmt): Likewise. * decl.c (mark_stmt_tree): Remove. (case_compare): Likewise. (finish_case_label): Use c_add_case_label. (init_decl_processing): Set more language-specific hooks. (build_enumerator): Fix typo in comment. (cplus_expand_expr_stmt): Remove. (mark_lang_function): Use mark_c_language_function. (lang_mark_tree): Use c_mark_lang_decl. * decl2.c: Change order of inclusion. * except.c: Likewise. * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall back on c_expand_expr. * friend.c: Include expr.h. * init.c: Change order of inclusion. * Makefile.in: Update dependencies. * lex.h (free_lang_decl_chain): Remove. * optimize.c (maybe_clone_body): Use function_name_declared_p. * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if it doesn't exist. (instantiate_decl): Use function_name_declared_p. * semantics.c (lang_expand_expr_stmt): Remove. (set_current_function_name_declared): Likewise. (current_function_name_declared): Likewise. (begin_compound_stmt): Use function_name_declared_p. (add_decl_stmt): Remove. (setup_vtbl_ptr): Use function_name_declared_p. (add_scope_stmt): Remove. (current_scope_stmt_stack): New function. (cp_expand_stmt): Don't handle SCOPE_STMTs. (expand_body): Use function_name_declared_p. * tree.c (cp_statement_code_p): Don't include SCOPE_STMT. * typeck.c: Change order of includes. (convert_sequence): Remove. From-SVN: r36464
2000-09-17 09:38:23 +02:00
#include "c-tree.h"
#include "c-common.h"
#include "langhooks.h"
#include "langhooks-def.h"
c-common.c: Include c-lex.h. * c-common.c: Include c-lex.h. (c_common_lang_init): Change prototype. Call init_c_lex and init_pragma from here. * c-common.h (c_common_lang_init): Change prototype. * c-decl.c (init_decl_processing): Rename. Call c_parse_init. * c-lang.c (c_init): Change prototype. Update. (c_init_options): Update. * c-lex.c (cpp_filename): Remove. (init_c_lex): Update. Read the main file, and get the original file name. (yyparse): Finish the command line options. * c-parse.in (c_parse_init): Call init_reswords here. (init_parse): Remove. * c-tree.h (c_init_decl_processing): New. * cpphash.c (_cpp_init_hashtable): After initializing the hash table, populate it. * cppinit.c (read_original_filename, cpp_finish_options): New. (cpp_create_reader): New prototype. Defer hash table initialization. (cpp_start_read): Rename cpp_read_main_file. Initialize the hash table. Get the original filename. * cpplib.h (cpp_create_reader): Update. (cpp_start_read): Remove. (cpp_read_main_file, cpp_finish_options): New. * cppmain.c (main, do_preprocessing): Update. * langhooks.h (struct langhooks): Update init prototype. * toplev.c (general_init, parse_options_and_default_flags, process_options, lang_indpendent_init, lang_dependent_init, init_asm_output): New; perform the bulk of initialization. (compile_file): Move most of initialization to above functions. (debug_hooks): Initialize statically. (set_Wunused): Relocate. (toplev_main): Move most of initialization to other init functions. Have a clear logic flow. * tree.h (init_parse, init_decl_processing): Remove. ada: * misc.c (gnat_init): Change prototype. Include the functionality of the old init_parse and init_decl_processing. (gnat_init_decl_processing): New prototype. (init_parse): Remove. * utils.c (init_decl_processing): Rename gnat_init_decl_processing. cp: * cp-tree.h (init_reswords, cxx_init_decl_processing): New. (cxx_init): Update prototype. * decl.c (init_decl_processing): Rename. Move null node init to its creation time. * lex.c (cxx_init_options): Update. (cxx_init): Combine with old init_parse; also call cxx_init_decl_processing. f: * com.c (ffecom_init_decl_processing): Renamed from init_decl_processing. (init_parse): Move contents to ffe_init. (ffe_init): Update prototype. java: * decl.c (init_decl_processing): Rename java_init_decl_processing. * java-tree.h: New prototype. * lang.c (java_init): Update prototype. Combine with old init_parse. objc: * objc-act.c (objc_init): Update prototype, combine with old init_parse. (objc_init_options): Update. From-SVN: r47046
2001-11-15 11:01:10 +01:00
static const char *c_init PARAMS ((const char *));
static void c_init_options PARAMS ((void));
static void c_post_options PARAMS ((void));
/* ### When changing hooks, consider if ObjC needs changing too!! ### */
c-lang.c (LANG_HOOKS_NAME): New. * c-lang.c (LANG_HOOKS_NAME): New. (lang_hooks): Constify. (c_init_options): Update. (lang_identify): Remove. * c-parse.in (language_string): Remove. * dbxout.c: Include langhooks.h. (dbxout_symbol_location): Update. * dwarf2out.c: Include langhooks.h. (gen_compile_unit_die): Update. * dwarfout.c: Include langhooks.h. (prototyped_attribute, output_compile_unit_die): Update. * langhooks-def.h (LANG_HOOKS_NAME, LANG_HOOKS_IDENTIFIER_SIZE): New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.h (struct lang_hooks): New members. Constify. * stringpool.c: Don't include toplev.h. (set_identifier_size): Remove. * toplev.c (toplev_main): Initialize identifier size. (print_version): Update. * tree.h (language_string, init_lex, lang_identify, set_identifier_size): Remove. * Makefile.in: Update dependencies. * config/darwin.c: Include langhooks.h. (func_name_maybe_scoped): Update. * config/darwin.h (ASM_END_FILE): Update. * config/nextstep.h (ASM_END_FILE): Update. * config/nextstep21.h (ASM_END_FILE): Update. * config/i386/sun386.h (ASM_END_FILE): Update. * config/rs6000/rs6000.c (ASM_END_FILE): Include langhooks.h. (rs6000_output_function_epilogue): Update. ada: * misc.c (LANG_HOOKS_NAME, LANG_HOOKS_IDENTIFIER_SIZE): Override. (struct lang_hooks): Constify. (language_string, lang_identify): Remove. * utils.c (init_decl_processing): Update. cp: * cp-lang.c (LANG_HOOKS_NAME): Override. (struct lang_hooks): Constify. * lex.c (cxx_init_options): Update. (lang_identify): Remove. * parse.y (language_string): Remove. f: * com.c (language_string, lang_identify): Remove. (struct lang_hooks): Constify. (LANG_HOOKS_NAME): Override. (init_parse): Update. java: * jcf-parse.c (init_lex): Remove. * lang.c (language_string, lang_identify): Remove. (struct lang_hooks): Constify. (LANG_HOOKS_NAME): Override. (init_parse): Update. objc: * objc-act.c (LANG_HOOKS_NAME): Override. (struct lang_hooks): Constify. (objc_init_options): Update. (lang_identify): Remove. From-SVN: r46874
2001-11-09 08:14:20 +01:00
#undef LANG_HOOKS_NAME
#define LANG_HOOKS_NAME "GNU C"
#undef LANG_HOOKS_INIT
#define LANG_HOOKS_INIT c_init
#undef LANG_HOOKS_FINISH
#define LANG_HOOKS_FINISH c_common_finish
#undef LANG_HOOKS_INIT_OPTIONS
#define LANG_HOOKS_INIT_OPTIONS c_init_options
#undef LANG_HOOKS_DECODE_OPTION
#define LANG_HOOKS_DECODE_OPTION c_decode_option
#undef LANG_HOOKS_POST_OPTIONS
#define LANG_HOOKS_POST_OPTIONS c_post_options
alias.c (can_address_p): Compnonents are not addressable if the containing type has alias set 0. * alias.c (can_address_p): Compnonents are not addressable if the containing type has alias set 0. (get_alias_set): Rework to use STRIP_NOPS. Only call front-end routine on object, type, or object with NOPs stripped, not inner values. Use language hook to call front-end routine. * builtins.c (get_memory_rtx): Always call set_mem_attributes. (expand_builtin_apply): Call set_mem_align on MEMs we make. Don't pass alignment to emit_block_move. (expand_builtin_memcpy, expand_builtin_va_copy): Likewise. (expand_builtin_memset): Likewise, but for clear_storage. * c-common.c (lang_get_alias_set): Renamed to c_common_alias_set and remove C++ specific parts. * c-common.h (c_common_get_alias_set): Add declaration. * c-lang.c (LANG_HOOKS_GET_ALIAS_SET): New macro. * calls.c (emit_call_1): Fix typo in sibcall_pop case. (save_fixed_argument_area): Call set_mem_align. Remove alignment in call to emit_block_move. (emit_library_call_value_1, store_one_arg): Likewise. (target_for_arg): Remove; disabled long ago. * emit-rtl.c (set_mem_attributes): Rework to only call get_mem_attrs once and similar cleanups. (offset_address): Use proper introductory comment. * expr.c (emit_block_move): Use alignment from that of MEM args, not from explicit operand; all callers changed. (clear_storage): Likewise. (expand_assignment): Don't call set_mem_alias_set on to_rtx. (store_field): Remove kludge on alias set used for to_rtx. (highest_pow2_factor, case *_DIV_EXPR): Never return 0. (expand_expr_unaligned): Call set_mem_attributes instead of set_mem_alias_set. * expr.h (emit_block_move, clear_storage): Remove ALIGN argument. * function.c (assign_stack_temp_for_type): Set MEM alignment. (expand_function_end): Track MEM attributes of trampolines. * ifcvt.c (noce_try_cmove_arith): Set alignment of new MEM. * integrate.c (copy_rtx_and_substitute, case CALL): Copy memory attributes from original. * langhooks.c (lang_hook_default_get_alias_set): New function. (hook_get_alias_set_0): New function. * langhooks.h (hook_get_alias_set_0): New declaration. (lang_hook_default_get_alias_set): Likewise. (LANG_HOOKS_GET_ALIAS_SET): New macro; add to initializer. * reload1.c (alter_reg): Use adjust_address_nv. * rtl.c (get_mode_alignment): Moved to here. * rtl.h (MEM_ALIGN): Take default from mode, if not BLKmode, and change default if unknown from 1 to BITS_PER_UNIT. * stor-layout.c (get_mode_alignment): Remove from here. * toplev.h (struct lang_hoks): Add get_alias_set field. * tree.h (lang_get_alias_set): Delete declaration. * config/arc/arc.c (arc_setup_incoming_varags): Set MEM alignment. * config/i386/i386.c (ix86_setup_incoming_varargs): Likewise. (ix86_va_arg): Likewise. * config/i960/i960.c (i960_setup_incoming_varargs): Likewise. * config/pa/pa.c (hppa_builtin_saveregs): Likewise. * config/sparc/sparc.c (sparc_va_arg): Likewise. * config/rs6000/rs6000.c (setup_incoming_varargs): Likewise. (expand_block_move_mem): Remove dead code. * cp/cp-lang.c (cxx_get_alias_set): New function. Point LANG_HOOKS_GET_ALIAS_SET to it. * f/com.c (LANG_HOOKS_GET_ALIAS_SET): New macro. (lang_get_alias_set): Delete. * java/lang.c (lang_get_alias_set): Deleted. From-SVN: r46440
2001-10-23 20:51:18 +02:00
#undef LANG_HOOKS_GET_ALIAS_SET
#define LANG_HOOKS_GET_ALIAS_SET c_common_get_alias_set
Makefile.in (c-lang.o): Depends on langhooks-def.h. * Makefile.in (c-lang.o): Depends on langhooks-def.h. (expr.o, varasm.o): Depends on langhooks.h. * c-common.c (c_safe_from_p): Always declare. (c_expand_expr): Refine when declared. * c-lang.c (c-common.h): Now include. (LANG_HOOKS_SAFE_FROM_P): Define new hook. (c_init): Don't set lang_safe_from_expr. * expr.c (langhooks.h): Now include. (lang_safe_from_p): No longer define. (safe_from_p): Use lang hook. (expand_expr): Set IGNORE if VOID_TYPE result of VIEW_CONVERT_EXPR too. (expand_expr, case VIEW_CONVERT_EXPR): Pass ro_modifier down. * expr.h (lang_expand_constant, lang_safe_from_p): Delete. * langhooks-def.h (lhd_return_tree, lhd_safe_from_p): New decls. (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks. * langhooks.c (lhd_return_tree, lhd_safe_from_p): New functions. * langhooks.h (struct lang_hooks): New fields expand_constant and safe_from_p. * output.h (output_constant): Size arg is HOST_WIDE_INT. * stmt.c (expand_decl_init): No longer need to expand constant for CONST_DECL. * stor-layout.c (put_pending_size): Don't check for SAVE_EXPR. * toplev.c (lang_expand_constant): Delete var. * tree.c (save_expr): Don't put another SAVE_EXPR around simple operations on SAVE_EXPR. * varasm.c (langhooks.h): Now include. (compare_constant_1): Use lang_hooks, not lang_expand_constant. (record_constant_1, output_addressed_constants): Likewise. (initializer_constant_valid_p, output_constant): Likewise. (output_constant_def): Process no-defer of string constant. (output_addressed_constants, case ADDR_EXPR): Use handled_component_p. (output_constant): Strip more conversions. Track our size and pad for the rest. (array_size_for_constructor): Remove code for non-byte STRING_CST. (output_constructor): SIZE now HOST_WIDE_INT. * cp/Make-lang.in (cp-lang.o): Depends on c-common.h. * cp/cp-lang.c (c-common.h): Include. (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks. * cp/decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p. * cp/expr.c (init_cplus_expand): Don't set lang_expand_constant. From-SVN: r47376
2001-11-27 15:31:29 +01:00
#undef LANG_HOOKS_SAFE_FROM_P
#define LANG_HOOKS_SAFE_FROM_P c_safe_from_p
#undef LANG_HOOKS_MARK_TREE
#define LANG_HOOKS_MARK_TREE c_mark_tree
#undef LANG_HOOKS_EXPAND_EXPR
#define LANG_HOOKS_EXPAND_EXPR c_expand_expr
#undef LANG_HOOKS_PARSE_FILE
#define LANG_HOOKS_PARSE_FILE c_common_parse_file
#undef LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES
#define LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES c_insert_default_attributes
#undef LANG_HOOKS_STATICP
#define LANG_HOOKS_STATICP c_staticp
Makefile.in: Update. * Makefile.in: Update. * c-decl.c (print_lang_decl, print_lang_type): Remove. (print_lang_identifier): Rename c_print_identifier. * c-lang.c (LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): New. (print_lang_statistics, lang_print_xnode): Remove. * c-parse.in (set_yydebug): Rename c_set_yydebug. * c-tree.h (c_set_yydebug, c_print_identifier): New. * langhooks-def.h (lhd_print_tree_nothing, lhd_set_yydebug): New. LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE, LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE, LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.h (struct lang_hooks): New members. (lang_print_tree_hook): New. * langhooks.c (lhd_print_tree_nothing, lhd_set_yydebug): New. * print-tree.c: Include langhooks.h. (print_node): Update. * toplev.c (decode_d_option): Update. * tree.c: Include langhooks.h. (dump_tree_statistics): Update. * tree.h (print_lang_statistics, print_lang_decl, print_lang_type, print_lang_identifier, set_yydebug, lang_print_xnode): Remove. ada: * misc.c (gnat_print_decl, gnat_print_type): Renamed. (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE): Override. (print_lang_statistics, lang_print_xnode, print_lang_identifier, set_yydebug): Remove. cp: * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE, LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE, LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override. * cp-tree.h (print_class_statistics): Remove. (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type, cxx_print_identifier, cxx_set_yydebug): New. * lex.c (set_yydebug): Rename c_set_yydebug. * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier, lang_print_xnode): Rename. * tree.c (print_lang_statistics): Rename. f: * com.c (ffe_print_identifier): Rename. (LANG_HOOKS_PRINT_IDENTIFIER): Override. (lang_print_xnode, print_lang_decl, print_lang_statistics, print_lang_type, set_yydebug): Remove. java: * java-tree.h (java_set_yydebug): New. * jcf-parse.c (set_yydebug): Rename java_set_yydebug. * lang.c (LANG_HOOKS_SET_YYDEBUG): Override. (print_lang_decl, print_lang_type, print_lang_identifier, print_lang_statistics, lang_print_xnode): Remove. objc: * objc-act.c (LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override. (lang_print_xnode, print_lang_statistics): Remove. From-SVN: r46907
2001-11-10 00:30:44 +01:00
#undef LANG_HOOKS_PRINT_IDENTIFIER
#define LANG_HOOKS_PRINT_IDENTIFIER c_print_identifier
#undef LANG_HOOKS_SET_YYDEBUG
#define LANG_HOOKS_SET_YYDEBUG c_set_yydebug
#undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL c_dup_lang_specific_decl
alias.c (can_address_p): Compnonents are not addressable if the containing type has alias set 0. * alias.c (can_address_p): Compnonents are not addressable if the containing type has alias set 0. (get_alias_set): Rework to use STRIP_NOPS. Only call front-end routine on object, type, or object with NOPs stripped, not inner values. Use language hook to call front-end routine. * builtins.c (get_memory_rtx): Always call set_mem_attributes. (expand_builtin_apply): Call set_mem_align on MEMs we make. Don't pass alignment to emit_block_move. (expand_builtin_memcpy, expand_builtin_va_copy): Likewise. (expand_builtin_memset): Likewise, but for clear_storage. * c-common.c (lang_get_alias_set): Renamed to c_common_alias_set and remove C++ specific parts. * c-common.h (c_common_get_alias_set): Add declaration. * c-lang.c (LANG_HOOKS_GET_ALIAS_SET): New macro. * calls.c (emit_call_1): Fix typo in sibcall_pop case. (save_fixed_argument_area): Call set_mem_align. Remove alignment in call to emit_block_move. (emit_library_call_value_1, store_one_arg): Likewise. (target_for_arg): Remove; disabled long ago. * emit-rtl.c (set_mem_attributes): Rework to only call get_mem_attrs once and similar cleanups. (offset_address): Use proper introductory comment. * expr.c (emit_block_move): Use alignment from that of MEM args, not from explicit operand; all callers changed. (clear_storage): Likewise. (expand_assignment): Don't call set_mem_alias_set on to_rtx. (store_field): Remove kludge on alias set used for to_rtx. (highest_pow2_factor, case *_DIV_EXPR): Never return 0. (expand_expr_unaligned): Call set_mem_attributes instead of set_mem_alias_set. * expr.h (emit_block_move, clear_storage): Remove ALIGN argument. * function.c (assign_stack_temp_for_type): Set MEM alignment. (expand_function_end): Track MEM attributes of trampolines. * ifcvt.c (noce_try_cmove_arith): Set alignment of new MEM. * integrate.c (copy_rtx_and_substitute, case CALL): Copy memory attributes from original. * langhooks.c (lang_hook_default_get_alias_set): New function. (hook_get_alias_set_0): New function. * langhooks.h (hook_get_alias_set_0): New declaration. (lang_hook_default_get_alias_set): Likewise. (LANG_HOOKS_GET_ALIAS_SET): New macro; add to initializer. * reload1.c (alter_reg): Use adjust_address_nv. * rtl.c (get_mode_alignment): Moved to here. * rtl.h (MEM_ALIGN): Take default from mode, if not BLKmode, and change default if unknown from 1 to BITS_PER_UNIT. * stor-layout.c (get_mode_alignment): Remove from here. * toplev.h (struct lang_hoks): Add get_alias_set field. * tree.h (lang_get_alias_set): Delete declaration. * config/arc/arc.c (arc_setup_incoming_varags): Set MEM alignment. * config/i386/i386.c (ix86_setup_incoming_varargs): Likewise. (ix86_va_arg): Likewise. * config/i960/i960.c (i960_setup_incoming_varargs): Likewise. * config/pa/pa.c (hppa_builtin_saveregs): Likewise. * config/sparc/sparc.c (sparc_va_arg): Likewise. * config/rs6000/rs6000.c (setup_incoming_varargs): Likewise. (expand_block_move_mem): Remove dead code. * cp/cp-lang.c (cxx_get_alias_set): New function. Point LANG_HOOKS_GET_ALIAS_SET to it. * f/com.c (LANG_HOOKS_GET_ALIAS_SET): New macro. (lang_get_alias_set): Delete. * java/lang.c (lang_get_alias_set): Deleted. From-SVN: r46440
2001-10-23 20:51:18 +02:00
#undef LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN
#define LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN \
c_cannot_inline_tree_fn
#undef LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS
#define LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS \
c_disregard_inline_limits
#undef LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P
#define LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P \
anon_aggr_type_p
#undef LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING
#define LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING \
c_convert_parm_for_inlining
Makefile.in (convert.o, [...]): Update. * Makefile.in (convert.o, calls.o, expmed.o): Update. * attribs.c (handle_mode_attribute, handle_vector_size_attribute): Use new hooks. * builtin-types.def (BT_PTRMODE): Update. * c-common.c (type_for_size): Rename c_common_type_for_size. (type_for_mode): Similarly. (shorten_compare, pointer_int_sum, c_common_nodes_and_builtins): Use new hook. * c-bommon.h (c_common_type_for_size, c_common_type_for_mode): New. * c-decl.c (finish_enum, build_enumerator): Use new hooks. * c-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): Redefine. * c-typeck.c (common_type, comptypes, default_conversion): Use new hooks. * calls.c: Include langhooks.h. (emit_library_call_value_1): Use new hooks. Avoid redundant calls. * convert.c: Include langhooks.h (convert_to_pointer, convert_to_integer): Use new hooks. * except.c (init_eh): Similarly. * expmed.c: Include langhooks.h. (expand_mult_add): Use new hooks. * expr.c (store_expr, store_constructor, expand_expr, do_jump, try_casesi): Similarly. * fold-const.c (optimize_bit_field_compare, make_range, decode_field_reference, fold_truthop, fold): Similarly. * function.c (assign_stack_local_1, assign_stack_temp_for_type, put_var_into_stack): Similarly. * langhooks-def.h (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): New. (LANG_HOOKS_TYPES_INITIALIZER): Update. * langhooks.h (lang_hooks_for_types): New hooks. * stmt.c (expand_decl_cleanup, emit_case_nodes): Use new hooks. * tree.c (get_unwidened, get_narrower): Similarly. * tree.h (type_for_mode, type_for_size): Remove. * varasm.c (force_const_mem): Use new hooks. ada: * gigi.h (type_for_size, type_for_mode): Rename. * misc.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): Redefine. * trans.c (tree_transform): Update. * utils.c (gnat_init_decl_processing, init_gigi_decls, builtin_function, float_type_for_size, signed_or_unsigned_type, build_vms_descriptor, unchecked_convert): Update. (type_for_mode, type_for_size): Rename. * utils2.c (nonbinary_modular_operation): Update. cp: * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): Redefine. * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks. * decl.c (finish_enum): Similarly. * error.c (dump_type): Similarly. * lex.c (cxx_init): Similarly. * mangle.c (write_builtin_type): Similarly. * typeck.c (comptypes): Similarly. f: * com.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): Redefine. (type_for_mode, type_for_size): Rename. (signed_or_unsigned_type, signed_type, truthvalue_conversion, unsigned_type): Use new hooks. java: * Make-lang.in (builtins.o): Update. * boehm.c (get_boehm_type_descriptor): Update. * builtins.c: Include langhooks.h. * decl.c (java_init_decl_processing): Update. * java-tree.h (java_type_for_mode, java_type_for_size): New. * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE): Redefine. * typeck.c (type_for_mode, type_for_size): Update. objc: * objc-act.c (handle_impent): Update. * objc-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE): Redefine. From-SVN: r51571
2002-03-29 22:46:27 +01:00
#undef LANG_HOOKS_TYPE_FOR_MODE
#define LANG_HOOKS_TYPE_FOR_MODE c_common_type_for_mode
#undef LANG_HOOKS_TYPE_FOR_SIZE
#define LANG_HOOKS_TYPE_FOR_SIZE c_common_type_for_size
/* ### When changing hooks, consider if ObjC needs changing too!! ### */
/* Each front end provides its own. */
c-lang.c (LANG_HOOKS_NAME): New. * c-lang.c (LANG_HOOKS_NAME): New. (lang_hooks): Constify. (c_init_options): Update. (lang_identify): Remove. * c-parse.in (language_string): Remove. * dbxout.c: Include langhooks.h. (dbxout_symbol_location): Update. * dwarf2out.c: Include langhooks.h. (gen_compile_unit_die): Update. * dwarfout.c: Include langhooks.h. (prototyped_attribute, output_compile_unit_die): Update. * langhooks-def.h (LANG_HOOKS_NAME, LANG_HOOKS_IDENTIFIER_SIZE): New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.h (struct lang_hooks): New members. Constify. * stringpool.c: Don't include toplev.h. (set_identifier_size): Remove. * toplev.c (toplev_main): Initialize identifier size. (print_version): Update. * tree.h (language_string, init_lex, lang_identify, set_identifier_size): Remove. * Makefile.in: Update dependencies. * config/darwin.c: Include langhooks.h. (func_name_maybe_scoped): Update. * config/darwin.h (ASM_END_FILE): Update. * config/nextstep.h (ASM_END_FILE): Update. * config/nextstep21.h (ASM_END_FILE): Update. * config/i386/sun386.h (ASM_END_FILE): Update. * config/rs6000/rs6000.c (ASM_END_FILE): Include langhooks.h. (rs6000_output_function_epilogue): Update. ada: * misc.c (LANG_HOOKS_NAME, LANG_HOOKS_IDENTIFIER_SIZE): Override. (struct lang_hooks): Constify. (language_string, lang_identify): Remove. * utils.c (init_decl_processing): Update. cp: * cp-lang.c (LANG_HOOKS_NAME): Override. (struct lang_hooks): Constify. * lex.c (cxx_init_options): Update. (lang_identify): Remove. * parse.y (language_string): Remove. f: * com.c (language_string, lang_identify): Remove. (struct lang_hooks): Constify. (LANG_HOOKS_NAME): Override. (init_parse): Update. java: * jcf-parse.c (init_lex): Remove. * lang.c (language_string, lang_identify): Remove. (struct lang_hooks): Constify. (LANG_HOOKS_NAME): Override. (init_parse): Update. objc: * objc-act.c (LANG_HOOKS_NAME): Override. (struct lang_hooks): Constify. (objc_init_options): Update. (lang_identify): Remove. From-SVN: r46874
2001-11-09 08:14:20 +01:00
const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
c-common.c (c_tree_code_type, [...]): Delete. * c-common.c (c_tree_code_type, c_tree_code_length, c_tree_code_name, add_c_tree_codes): Delete. * c-common.h (add_c_tree_codes): Delete. * c-lang.c (tree_code_type, tree_code_length, tree_code_name): Define. * c-objc-common.c (c_objc_common_init): Don't call add_c_tree_codes, instead set lang_unsafe_for_reeval. * objc/objc-act.c (objc_tree_code_type, objc_tree_code_length, objc_tree_code_name, add_objc_tree_codes): Delete. (objc_init): Don't call add_objc_tree_codes. * objc/objc-lang.c (tree_code_type, tree_code_length, tree_code_name): Define. * toplev.c (lang_independent_init): Don't set tree_code_length[IDENTIFIER_NODE]. * tree.c (tree_code_type, tree_code_length, tree_code_name): Delete definitions, moved to language front-ends. * tree.def (IDENTIFIER_NODE): Hardwire the length. * tree.h (tree_code_type, tree_code_length, tree_code_name): Const-ify. (tree_code_length): Change type to unsigned char. ada: * misc.c (gnat_tree_code_type, gnat_tree_code_length, gnat_tree_code_name): Delete. (tree_code_type, tree_code_length, tree_code_name): Define. (gnat_init): Don't try to copy into the various tree_code arrays. ch: * decl.c (chill_tree_code_type, chill_tree_code_length, chill_tree_code_name): Delete. (tree_code_type, tree_code_length, tree_code_name): Define. (init_decl_processing): Don't try to copy into the various tree_code arrays. cp: * cp-lang.c (tree_code_type, tree_code_length, tree_code_name): Define. * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not tree_code_length. * lex.c (cplus_tree_code_type, cplus_tree_code_length, cplus_tree_code_name): Delete. (cxx_init): Don't call add_c_tree_codes, instead set lang_unsafe_for_reeval. Don't try to copy into the various tree_code arrays. f: * com.c (tree_code_type, tree_code_length, tree_code_name): Define. java: * lang.c (java_tree_code_type, java_tree_code_length, tree_code_name): Delete. (tree_code_type, tree_code_length, tree_code_name): Define. (java_init): Don't try to copy into the various tree_code arrays. From-SVN: r50705
2002-03-13 02:42:43 +01:00
/* Tree code classes. */
#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE,
const char tree_code_type[] = {
#include "tree.def"
'x',
#include "c-common.def"
};
#undef DEFTREECODE
/* Table indexed by tree code giving number of expression
operands beyond the fixed part of the node structure.
Not used for types or decls. */
#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) LENGTH,
const unsigned char tree_code_length[] = {
#include "tree.def"
0,
#include "c-common.def"
};
#undef DEFTREECODE
/* Names of tree components.
Used for printing out the tree and error messages. */
#define DEFTREECODE(SYM, NAME, TYPE, LEN) NAME,
const char *const tree_code_name[] = {
#include "tree.def"
"@@dummy",
#include "c-common.def"
};
#undef DEFTREECODE
/* Post-switch processing. */
static void
c_post_options ()
{
cppfiles.c (stack_include_file): Don't optimize zero-length files. * cppfiles.c (stack_include_file): Don't optimize zero-length files. (read_include_file): NUL-terminate read files. * cpplex.c (handle_newline, skip_escaped_newlines, get_effective_char, skip_whitespace, parse_identifier, parse_identifier_slow, parse_number, parse_string, _cpp_lex_direct): Optimize for the fact that buffers are guaranteed NUL-terminated. * cpplib.c (destringize_and_run, cpp_define, handle_assertion): Be sure buffers are NUL terminated. * cppmacro.c (warn_of_redefinition): Kill compile warning. * c-common.c: Include tree-inline.h. (c_language): Move separate definitions here. (c_common_init_options, c_common_post_options): New. (c_common_lang_init): Rename c_common_init. * c-common.h (c_common_lang_init): Similarly. (c_common_init_options, c_common_post_options): New. * c-lang.c (c_post_options): Move body to c_common_post_options. (c_init_options): Use c_common_init_options. (c_init): Update. * langhooks.def: Rearrange. * langhooks.h: Rearrange, and improve comments. * toplev.c (do_compile): New function. (toplev_main): Use it. (lang_independent_f_options, parse_options_and_default_flags, process_options): Remove trailing periods. * Makefile.in: Update. cp: * decl2.c (c_language): Move to c-common.c. * lex.c (cxx_post_options, cxx_init_options): Use c-common.c functions. (cxx_init): Update. objc: * objc-act.c (objc_post_options, objc_init_options): Use c-common.c functions. (ojbc_init): Update. From-SVN: r47362
2001-11-27 00:44:54 +01:00
c_common_post_options ();
}
[multiple changes] 1998-10-28 16:10 -0500 Zack Weinberg <zack@rabi.phys.columbia.edu> * c-lang.c: Declare extern char *yy_cur if USE_CPPLIB. (lang_init): Call check_newline always. * c-lex.c (init_parse) [USE_CPPLIB=1]: After calling cpp_start_read, set yy_cur and yy_lim to read from parse_in.token_buffer, so that we'll see the first #line directive. * cpplib.c (cpp_start_read): finclude the main input file before processing -include/-imacros. Process -imacros and -include separately, and handle -include by stacking a buffer for the file in question as if it'd been #included. * toplev.c (documented_lang_options) Recognize -H when USE_CPPLIB is on. 1998-10-28 16:09 -0500 Zack Weinberg <zack@rabi.phys.columbia.edu> * cpplib.c: Merge do_once into do_pragma. Break file handling code out of do_include. Move append_include_chain, deps_output, file_cleanup, redundant_include_p, import_hash, lookup_import, add_import, read_filename_string, read_name_map, open_include_file, finclude, safe_read to cppfiles.c. Move prototypes for deps_output, append_include_chain, finclude to cpplib.h. Move definition of struct file_name_list there also. * cppfiles.c: New file. Contains all the above functions broken out of cpplib.c; also hack_vms_include_specification from cccp.c and find_include_file, a new function broken out of do_include. * Makefile.in (cppmain): Depend on cppfiles.o. (fix-header): Likewise. (cppfiles.o): New target. * configure.in (--enable-c-cpplib): Add cppfiles.o to extra_c_objs. Add ../cppfiles.o to extra_cxx_objs. From-SVN: r23424
1998-10-29 12:54:13 +01:00
static void
c_init_options ()
{
cppfiles.c (stack_include_file): Don't optimize zero-length files. * cppfiles.c (stack_include_file): Don't optimize zero-length files. (read_include_file): NUL-terminate read files. * cpplex.c (handle_newline, skip_escaped_newlines, get_effective_char, skip_whitespace, parse_identifier, parse_identifier_slow, parse_number, parse_string, _cpp_lex_direct): Optimize for the fact that buffers are guaranteed NUL-terminated. * cpplib.c (destringize_and_run, cpp_define, handle_assertion): Be sure buffers are NUL terminated. * cppmacro.c (warn_of_redefinition): Kill compile warning. * c-common.c: Include tree-inline.h. (c_language): Move separate definitions here. (c_common_init_options, c_common_post_options): New. (c_common_lang_init): Rename c_common_init. * c-common.h (c_common_lang_init): Similarly. (c_common_init_options, c_common_post_options): New. * c-lang.c (c_post_options): Move body to c_common_post_options. (c_init_options): Use c_common_init_options. (c_init): Update. * langhooks.def: Rearrange. * langhooks.h: Rearrange, and improve comments. * toplev.c (do_compile): New function. (toplev_main): Use it. (lang_independent_f_options, parse_options_and_default_flags, process_options): Remove trailing periods. * Makefile.in: Update. cp: * decl2.c (c_language): Move to c-common.c. * lex.c (cxx_post_options, cxx_init_options): Use c-common.c functions. (cxx_init): Update. objc: * objc-act.c (objc_post_options, objc_init_options): Use c-common.c functions. (ojbc_init): Update. From-SVN: r47362
2001-11-27 00:44:54 +01:00
c_common_init_options (clk_c);
}
c-common.c: Include c-lex.h. * c-common.c: Include c-lex.h. (c_common_lang_init): Change prototype. Call init_c_lex and init_pragma from here. * c-common.h (c_common_lang_init): Change prototype. * c-decl.c (init_decl_processing): Rename. Call c_parse_init. * c-lang.c (c_init): Change prototype. Update. (c_init_options): Update. * c-lex.c (cpp_filename): Remove. (init_c_lex): Update. Read the main file, and get the original file name. (yyparse): Finish the command line options. * c-parse.in (c_parse_init): Call init_reswords here. (init_parse): Remove. * c-tree.h (c_init_decl_processing): New. * cpphash.c (_cpp_init_hashtable): After initializing the hash table, populate it. * cppinit.c (read_original_filename, cpp_finish_options): New. (cpp_create_reader): New prototype. Defer hash table initialization. (cpp_start_read): Rename cpp_read_main_file. Initialize the hash table. Get the original filename. * cpplib.h (cpp_create_reader): Update. (cpp_start_read): Remove. (cpp_read_main_file, cpp_finish_options): New. * cppmain.c (main, do_preprocessing): Update. * langhooks.h (struct langhooks): Update init prototype. * toplev.c (general_init, parse_options_and_default_flags, process_options, lang_indpendent_init, lang_dependent_init, init_asm_output): New; perform the bulk of initialization. (compile_file): Move most of initialization to above functions. (debug_hooks): Initialize statically. (set_Wunused): Relocate. (toplev_main): Move most of initialization to other init functions. Have a clear logic flow. * tree.h (init_parse, init_decl_processing): Remove. ada: * misc.c (gnat_init): Change prototype. Include the functionality of the old init_parse and init_decl_processing. (gnat_init_decl_processing): New prototype. (init_parse): Remove. * utils.c (init_decl_processing): Rename gnat_init_decl_processing. cp: * cp-tree.h (init_reswords, cxx_init_decl_processing): New. (cxx_init): Update prototype. * decl.c (init_decl_processing): Rename. Move null node init to its creation time. * lex.c (cxx_init_options): Update. (cxx_init): Combine with old init_parse; also call cxx_init_decl_processing. f: * com.c (ffecom_init_decl_processing): Renamed from init_decl_processing. (init_parse): Move contents to ffe_init. (ffe_init): Update prototype. java: * decl.c (init_decl_processing): Rename java_init_decl_processing. * java-tree.h: New prototype. * lang.c (java_init): Update prototype. Combine with old init_parse. objc: * objc-act.c (objc_init): Update prototype, combine with old init_parse. (objc_init_options): Update. From-SVN: r47046
2001-11-15 11:01:10 +01:00
static const char *
c_init (filename)
const char *filename;
1991-12-25 04:55:54 +01:00
{
return c_objc_common_init (filename);
1991-12-25 04:55:54 +01:00
}
/* Used by c-lex.c, but only for objc. */
1991-12-25 04:55:54 +01:00
tree
lookup_interface (arg)
Warning fixes: * Makefile.in (c-lang.o): Depend on c-tree.h, c-lex.h and toplev.h. (c-lex.o): Depend on output.h. (c-common.o): Likewise. (stmt.o): Likewise. (calls.o): Likewise. (integrate.o): Depend on toplev.h. (regclass.o): Depend on output.h. (final.o): Depend on reload.h. * c-common.c: Include output.h. (check_format_info): Remove unused variable `integral_format'. * c-decl.c (print_lang_decl): Mark parameters `file', `node' and `indent' with ATTRIBUTE_UNUSED. (print_lang_type): Likewise. (maybe_build_cleanup): Likewise for parameter `decl'. (copy_lang_decl): Likewise for parameter `node'. * c-lang.c: Include c-tree.h, c-lex.h and toplev.h. (lang_print_xnode): Mark parameters `file', `node' and `indent' with ATTRIBUTE_UNUSED. (lookup_interface): Likewise for parameter `arg'. (is_class_name): Likewise. (maybe_objc_check_decl): Likewise for parameter `decl'. (maybe_objc_comptypes): Likewise for parameters `lhs', `rhs' and `reflexive'. (maybe_objc_method_name): Likewise for parameter `decl'. (build_objc_string): Likewise for parameters `len' and `str'. * c-lex.c: Include output.h. * c-lex.h (position_after_white_space): Correct typo in prototype. * c-tree.h (finish_file, c_expand_start_cond, c_expand_start_else, c_expand_end_cond, init_iterators): Add prototypes. * caller-save.c (set_reg_live): Mark parameters `reg' and `setter' with ATTRIBUTE_UNUSED. * calls.c: Include output.h. * cccp.c (pipe_closed): Mark parameter `signo' with ATTRIBUTE_UNUSED. * combine.c: Move inclusion of expr.h to after insn-config.h. * iris6.h (ASM_IDENTIFY_GCC, ASM_IDENTIFY_LANGUAGE): Don't define as empty, rather define as ((void)0). * sparc.c (sparc_check_64): Add braces around ambiguous `else'. Add parentheses around assignment used as truth value. * cplus-dem.c (squangle_mop_up): Change return type to void. (internal_cplus_demangle): Remove unused parameter `options'. All callers changed. (cplus_demangle_opname): Remove function wide variable `int i' and replace with `size_t i' at each location where it is used. (cplus_demangle_opname): change type of `i' from int to size_t. * cppexp.c (right_shift): Mark parameter `pfile' with ATTRIBUTE_UNUSED. * cpphash.c (cpp_lookup): Likewise. (cpp_hash_cleanup): Likewise. * cpplib.c (parse_name): Add a prototype and make it static. (null_underflow): Mark parameter `pfile' with ATTRIBUTE_UNUSED. (null_cleanup): Likewise for parameters `pbuf' and `pfile'. (macro_cleanup): Likewise for parameter `pfile'. (file_cleanup): Likewise. * cpplib.h (cpp_reader_init, cpp_options_init, cpp_start_read, cpp_read_check_assertion, skip_rest_of_line): Add prototypes. * crtstuff.c (force_to_data, __CTOR_LIST__, force_to_data, __DTOR_END__, __FRAME_END__): Mark with ATTRIBUTE_UNUSED. * cse.c (cse_check_loop_start): Mark parameter `set' with ATTRIBUTE_UNUSED. * dbxout.c (flag_minimal_debug, have_used_extensions, source_label_number): Move inside macro wrapper check against defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO). * dwarf2out.c (gen_entry_point_die): Hide prototype and definition. * except.h (doing_eh): Provide prototype. * expr.c: Move inclusion of expr.h to after insn-config.h. * final.c: Include reload.h. (shorten_branches): Cast the first argument of bzero to char *. * fix-header.c (cpp_print_containing_files): Mark parameter `pfile' with ATTRIBUTE_UNUSED. (cpp_fatal): Likewise. * flow.c (find_basic_blocks_1): Cast the first argument of bzero to char *. * genattrtab.c (make_length_attrs): Change the type of variable `i' from int to size_t. (zero_fn): Mark parameter `exp' with ATTRIBUTE_UNUSED. (one_fn): Likewise. * genextract.c (main): When generating insn-extract.c, mark variable `junk' with ATTRIBUTE_UNUSED. * gengenrtl.c (gencode): When generating genrtl.c, cast the first argument of bzero to char*. * integrate.c: Include toplev.h. * libgcc2.c: Wrap `struct exception_table' and `find_exception_handler' in macro DWARF2_UNWIND_INFO. * objc/Make-lang.in (objc-act.o): Depend on toplev.h. * objc/objc-act.c: Include toplev.h. (lang_print_xnode): Mark parameters `file', `node' and `indent' with ATTRIBUTE_UNUSED. (finish_protocol): Likewise for parameter `protocol'. * output.h (declare_weak): Add prototype. (decode_reg_name): Don't wrap with TREE_CODE macro. (assemble_alias): Add prototype. * regclass.c: Include output.h. * reload.h (reloads_conflict): Add prototype. * rtl.h (print_rtl_single, mark_elimiation, reg_class_subset_p, output_func_start_profiler): Add prototypes. * rtlanal.c (reg_set_p_1): Mark parameters `x' and `pat' with ATTRIBUTE_UNUSED. * scan-decls.c: Include scan.h. * scan.h (recognized_function, recognized_extern): Add prototypes. * stmt.c: Include output.h. * toplev.c (error_for_asm, warning_for_asm): Remove prototypes. (output_lang_identify): Hide prototype and definition. (float_signal): Mark parameter `signo' with ATTRIBUTE_UNUSED. (pipe_closed): Likewise. * toplev.h (count_error, strip_off_ending, error_for_asm, warning_for_asm): Add prototypes. From-SVN: r19712
1998-05-13 14:40:39 +02:00
tree arg ATTRIBUTE_UNUSED;
1991-12-25 04:55:54 +01:00
{
return 0;
}
tree
is_class_name (arg)
Warning fixes: * Makefile.in (c-lang.o): Depend on c-tree.h, c-lex.h and toplev.h. (c-lex.o): Depend on output.h. (c-common.o): Likewise. (stmt.o): Likewise. (calls.o): Likewise. (integrate.o): Depend on toplev.h. (regclass.o): Depend on output.h. (final.o): Depend on reload.h. * c-common.c: Include output.h. (check_format_info): Remove unused variable `integral_format'. * c-decl.c (print_lang_decl): Mark parameters `file', `node' and `indent' with ATTRIBUTE_UNUSED. (print_lang_type): Likewise. (maybe_build_cleanup): Likewise for parameter `decl'. (copy_lang_decl): Likewise for parameter `node'. * c-lang.c: Include c-tree.h, c-lex.h and toplev.h. (lang_print_xnode): Mark parameters `file', `node' and `indent' with ATTRIBUTE_UNUSED. (lookup_interface): Likewise for parameter `arg'. (is_class_name): Likewise. (maybe_objc_check_decl): Likewise for parameter `decl'. (maybe_objc_comptypes): Likewise for parameters `lhs', `rhs' and `reflexive'. (maybe_objc_method_name): Likewise for parameter `decl'. (build_objc_string): Likewise for parameters `len' and `str'. * c-lex.c: Include output.h. * c-lex.h (position_after_white_space): Correct typo in prototype. * c-tree.h (finish_file, c_expand_start_cond, c_expand_start_else, c_expand_end_cond, init_iterators): Add prototypes. * caller-save.c (set_reg_live): Mark parameters `reg' and `setter' with ATTRIBUTE_UNUSED. * calls.c: Include output.h. * cccp.c (pipe_closed): Mark parameter `signo' with ATTRIBUTE_UNUSED. * combine.c: Move inclusion of expr.h to after insn-config.h. * iris6.h (ASM_IDENTIFY_GCC, ASM_IDENTIFY_LANGUAGE): Don't define as empty, rather define as ((void)0). * sparc.c (sparc_check_64): Add braces around ambiguous `else'. Add parentheses around assignment used as truth value. * cplus-dem.c (squangle_mop_up): Change return type to void. (internal_cplus_demangle): Remove unused parameter `options'. All callers changed. (cplus_demangle_opname): Remove function wide variable `int i' and replace with `size_t i' at each location where it is used. (cplus_demangle_opname): change type of `i' from int to size_t. * cppexp.c (right_shift): Mark parameter `pfile' with ATTRIBUTE_UNUSED. * cpphash.c (cpp_lookup): Likewise. (cpp_hash_cleanup): Likewise. * cpplib.c (parse_name): Add a prototype and make it static. (null_underflow): Mark parameter `pfile' with ATTRIBUTE_UNUSED. (null_cleanup): Likewise for parameters `pbuf' and `pfile'. (macro_cleanup): Likewise for parameter `pfile'. (file_cleanup): Likewise. * cpplib.h (cpp_reader_init, cpp_options_init, cpp_start_read, cpp_read_check_assertion, skip_rest_of_line): Add prototypes. * crtstuff.c (force_to_data, __CTOR_LIST__, force_to_data, __DTOR_END__, __FRAME_END__): Mark with ATTRIBUTE_UNUSED. * cse.c (cse_check_loop_start): Mark parameter `set' with ATTRIBUTE_UNUSED. * dbxout.c (flag_minimal_debug, have_used_extensions, source_label_number): Move inside macro wrapper check against defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO). * dwarf2out.c (gen_entry_point_die): Hide prototype and definition. * except.h (doing_eh): Provide prototype. * expr.c: Move inclusion of expr.h to after insn-config.h. * final.c: Include reload.h. (shorten_branches): Cast the first argument of bzero to char *. * fix-header.c (cpp_print_containing_files): Mark parameter `pfile' with ATTRIBUTE_UNUSED. (cpp_fatal): Likewise. * flow.c (find_basic_blocks_1): Cast the first argument of bzero to char *. * genattrtab.c (make_length_attrs): Change the type of variable `i' from int to size_t. (zero_fn): Mark parameter `exp' with ATTRIBUTE_UNUSED. (one_fn): Likewise. * genextract.c (main): When generating insn-extract.c, mark variable `junk' with ATTRIBUTE_UNUSED. * gengenrtl.c (gencode): When generating genrtl.c, cast the first argument of bzero to char*. * integrate.c: Include toplev.h. * libgcc2.c: Wrap `struct exception_table' and `find_exception_handler' in macro DWARF2_UNWIND_INFO. * objc/Make-lang.in (objc-act.o): Depend on toplev.h. * objc/objc-act.c: Include toplev.h. (lang_print_xnode): Mark parameters `file', `node' and `indent' with ATTRIBUTE_UNUSED. (finish_protocol): Likewise for parameter `protocol'. * output.h (declare_weak): Add prototype. (decode_reg_name): Don't wrap with TREE_CODE macro. (assemble_alias): Add prototype. * regclass.c: Include output.h. * reload.h (reloads_conflict): Add prototype. * rtl.h (print_rtl_single, mark_elimiation, reg_class_subset_p, output_func_start_profiler): Add prototypes. * rtlanal.c (reg_set_p_1): Mark parameters `x' and `pat' with ATTRIBUTE_UNUSED. * scan-decls.c: Include scan.h. * scan.h (recognized_function, recognized_extern): Add prototypes. * stmt.c: Include output.h. * toplev.c (error_for_asm, warning_for_asm): Remove prototypes. (output_lang_identify): Hide prototype and definition. (float_signal): Mark parameter `signo' with ATTRIBUTE_UNUSED. (pipe_closed): Likewise. * toplev.h (count_error, strip_off_ending, error_for_asm, warning_for_asm): Add prototypes. From-SVN: r19712
1998-05-13 14:40:39 +02:00
tree arg ATTRIBUTE_UNUSED;
{
return 0;
}
1991-12-25 04:55:54 +01:00
void
maybe_objc_check_decl (decl)
Warning fixes: * Makefile.in (c-lang.o): Depend on c-tree.h, c-lex.h and toplev.h. (c-lex.o): Depend on output.h. (c-common.o): Likewise. (stmt.o): Likewise. (calls.o): Likewise. (integrate.o): Depend on toplev.h. (regclass.o): Depend on output.h. (final.o): Depend on reload.h. * c-common.c: Include output.h. (check_format_info): Remove unused variable `integral_format'. * c-decl.c (print_lang_decl): Mark parameters `file', `node' and `indent' with ATTRIBUTE_UNUSED. (print_lang_type): Likewise. (maybe_build_cleanup): Likewise for parameter `decl'. (copy_lang_decl): Likewise for parameter `node'. * c-lang.c: Include c-tree.h, c-lex.h and toplev.h. (lang_print_xnode): Mark parameters `file', `node' and `indent' with ATTRIBUTE_UNUSED. (lookup_interface): Likewise for parameter `arg'. (is_class_name): Likewise. (maybe_objc_check_decl): Likewise for parameter `decl'. (maybe_objc_comptypes): Likewise for parameters `lhs', `rhs' and `reflexive'. (maybe_objc_method_name): Likewise for parameter `decl'. (build_objc_string): Likewise for parameters `len' and `str'. * c-lex.c: Include output.h. * c-lex.h (position_after_white_space): Correct typo in prototype. * c-tree.h (finish_file, c_expand_start_cond, c_expand_start_else, c_expand_end_cond, init_iterators): Add prototypes. * caller-save.c (set_reg_live): Mark parameters `reg' and `setter' with ATTRIBUTE_UNUSED. * calls.c: Include output.h. * cccp.c (pipe_closed): Mark parameter `signo' with ATTRIBUTE_UNUSED. * combine.c: Move inclusion of expr.h to after insn-config.h. * iris6.h (ASM_IDENTIFY_GCC, ASM_IDENTIFY_LANGUAGE): Don't define as empty, rather define as ((void)0). * sparc.c (sparc_check_64): Add braces around ambiguous `else'. Add parentheses around assignment used as truth value. * cplus-dem.c (squangle_mop_up): Change return type to void. (internal_cplus_demangle): Remove unused parameter `options'. All callers changed. (cplus_demangle_opname): Remove function wide variable `int i' and replace with `size_t i' at each location where it is used. (cplus_demangle_opname): change type of `i' from int to size_t. * cppexp.c (right_shift): Mark parameter `pfile' with ATTRIBUTE_UNUSED. * cpphash.c (cpp_lookup): Likewise. (cpp_hash_cleanup): Likewise. * cpplib.c (parse_name): Add a prototype and make it static. (null_underflow): Mark parameter `pfile' with ATTRIBUTE_UNUSED. (null_cleanup): Likewise for parameters `pbuf' and `pfile'. (macro_cleanup): Likewise for parameter `pfile'. (file_cleanup): Likewise. * cpplib.h (cpp_reader_init, cpp_options_init, cpp_start_read, cpp_read_check_assertion, skip_rest_of_line): Add prototypes. * crtstuff.c (force_to_data, __CTOR_LIST__, force_to_data, __DTOR_END__, __FRAME_END__): Mark with ATTRIBUTE_UNUSED. * cse.c (cse_check_loop_start): Mark parameter `set' with ATTRIBUTE_UNUSED. * dbxout.c (flag_minimal_debug, have_used_extensions, source_label_number): Move inside macro wrapper check against defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO). * dwarf2out.c (gen_entry_point_die): Hide prototype and definition. * except.h (doing_eh): Provide prototype. * expr.c: Move inclusion of expr.h to after insn-config.h. * final.c: Include reload.h. (shorten_branches): Cast the first argument of bzero to char *. * fix-header.c (cpp_print_containing_files): Mark parameter `pfile' with ATTRIBUTE_UNUSED. (cpp_fatal): Likewise. * flow.c (find_basic_blocks_1): Cast the first argument of bzero to char *. * genattrtab.c (make_length_attrs): Change the type of variable `i' from int to size_t. (zero_fn): Mark parameter `exp' with ATTRIBUTE_UNUSED. (one_fn): Likewise. * genextract.c (main): When generating insn-extract.c, mark variable `junk' with ATTRIBUTE_UNUSED. * gengenrtl.c (gencode): When generating genrtl.c, cast the first argument of bzero to char*. * integrate.c: Include toplev.h. * libgcc2.c: Wrap `struct exception_table' and `find_exception_handler' in macro DWARF2_UNWIND_INFO. * objc/Make-lang.in (objc-act.o): Depend on toplev.h. * objc/objc-act.c: Include toplev.h. (lang_print_xnode): Mark parameters `file', `node' and `indent' with ATTRIBUTE_UNUSED. (finish_protocol): Likewise for parameter `protocol'. * output.h (declare_weak): Add prototype. (decode_reg_name): Don't wrap with TREE_CODE macro. (assemble_alias): Add prototype. * regclass.c: Include output.h. * reload.h (reloads_conflict): Add prototype. * rtl.h (print_rtl_single, mark_elimiation, reg_class_subset_p, output_func_start_profiler): Add prototypes. * rtlanal.c (reg_set_p_1): Mark parameters `x' and `pat' with ATTRIBUTE_UNUSED. * scan-decls.c: Include scan.h. * scan.h (recognized_function, recognized_extern): Add prototypes. * stmt.c: Include output.h. * toplev.c (error_for_asm, warning_for_asm): Remove prototypes. (output_lang_identify): Hide prototype and definition. (float_signal): Mark parameter `signo' with ATTRIBUTE_UNUSED. (pipe_closed): Likewise. * toplev.h (count_error, strip_off_ending, error_for_asm, warning_for_asm): Add prototypes. From-SVN: r19712
1998-05-13 14:40:39 +02:00
tree decl ATTRIBUTE_UNUSED;
1991-12-25 04:55:54 +01:00
{
}
int
maybe_objc_comptypes (lhs, rhs, reflexive)
Warning fixes: * Makefile.in (c-lang.o): Depend on c-tree.h, c-lex.h and toplev.h. (c-lex.o): Depend on output.h. (c-common.o): Likewise. (stmt.o): Likewise. (calls.o): Likewise. (integrate.o): Depend on toplev.h. (regclass.o): Depend on output.h. (final.o): Depend on reload.h. * c-common.c: Include output.h. (check_format_info): Remove unused variable `integral_format'. * c-decl.c (print_lang_decl): Mark parameters `file', `node' and `indent' with ATTRIBUTE_UNUSED. (print_lang_type): Likewise. (maybe_build_cleanup): Likewise for parameter `decl'. (copy_lang_decl): Likewise for parameter `node'. * c-lang.c: Include c-tree.h, c-lex.h and toplev.h. (lang_print_xnode): Mark parameters `file', `node' and `indent' with ATTRIBUTE_UNUSED. (lookup_interface): Likewise for parameter `arg'. (is_class_name): Likewise. (maybe_objc_check_decl): Likewise for parameter `decl'. (maybe_objc_comptypes): Likewise for parameters `lhs', `rhs' and `reflexive'. (maybe_objc_method_name): Likewise for parameter `decl'. (build_objc_string): Likewise for parameters `len' and `str'. * c-lex.c: Include output.h. * c-lex.h (position_after_white_space): Correct typo in prototype. * c-tree.h (finish_file, c_expand_start_cond, c_expand_start_else, c_expand_end_cond, init_iterators): Add prototypes. * caller-save.c (set_reg_live): Mark parameters `reg' and `setter' with ATTRIBUTE_UNUSED. * calls.c: Include output.h. * cccp.c (pipe_closed): Mark parameter `signo' with ATTRIBUTE_UNUSED. * combine.c: Move inclusion of expr.h to after insn-config.h. * iris6.h (ASM_IDENTIFY_GCC, ASM_IDENTIFY_LANGUAGE): Don't define as empty, rather define as ((void)0). * sparc.c (sparc_check_64): Add braces around ambiguous `else'. Add parentheses around assignment used as truth value. * cplus-dem.c (squangle_mop_up): Change return type to void. (internal_cplus_demangle): Remove unused parameter `options'. All callers changed. (cplus_demangle_opname): Remove function wide variable `int i' and replace with `size_t i' at each location where it is used. (cplus_demangle_opname): change type of `i' from int to size_t. * cppexp.c (right_shift): Mark parameter `pfile' with ATTRIBUTE_UNUSED. * cpphash.c (cpp_lookup): Likewise. (cpp_hash_cleanup): Likewise. * cpplib.c (parse_name): Add a prototype and make it static. (null_underflow): Mark parameter `pfile' with ATTRIBUTE_UNUSED. (null_cleanup): Likewise for parameters `pbuf' and `pfile'. (macro_cleanup): Likewise for parameter `pfile'. (file_cleanup): Likewise. * cpplib.h (cpp_reader_init, cpp_options_init, cpp_start_read, cpp_read_check_assertion, skip_rest_of_line): Add prototypes. * crtstuff.c (force_to_data, __CTOR_LIST__, force_to_data, __DTOR_END__, __FRAME_END__): Mark with ATTRIBUTE_UNUSED. * cse.c (cse_check_loop_start): Mark parameter `set' with ATTRIBUTE_UNUSED. * dbxout.c (flag_minimal_debug, have_used_extensions, source_label_number): Move inside macro wrapper check against defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO). * dwarf2out.c (gen_entry_point_die): Hide prototype and definition. * except.h (doing_eh): Provide prototype. * expr.c: Move inclusion of expr.h to after insn-config.h. * final.c: Include reload.h. (shorten_branches): Cast the first argument of bzero to char *. * fix-header.c (cpp_print_containing_files): Mark parameter `pfile' with ATTRIBUTE_UNUSED. (cpp_fatal): Likewise. * flow.c (find_basic_blocks_1): Cast the first argument of bzero to char *. * genattrtab.c (make_length_attrs): Change the type of variable `i' from int to size_t. (zero_fn): Mark parameter `exp' with ATTRIBUTE_UNUSED. (one_fn): Likewise. * genextract.c (main): When generating insn-extract.c, mark variable `junk' with ATTRIBUTE_UNUSED. * gengenrtl.c (gencode): When generating genrtl.c, cast the first argument of bzero to char*. * integrate.c: Include toplev.h. * libgcc2.c: Wrap `struct exception_table' and `find_exception_handler' in macro DWARF2_UNWIND_INFO. * objc/Make-lang.in (objc-act.o): Depend on toplev.h. * objc/objc-act.c: Include toplev.h. (lang_print_xnode): Mark parameters `file', `node' and `indent' with ATTRIBUTE_UNUSED. (finish_protocol): Likewise for parameter `protocol'. * output.h (declare_weak): Add prototype. (decode_reg_name): Don't wrap with TREE_CODE macro. (assemble_alias): Add prototype. * regclass.c: Include output.h. * reload.h (reloads_conflict): Add prototype. * rtl.h (print_rtl_single, mark_elimiation, reg_class_subset_p, output_func_start_profiler): Add prototypes. * rtlanal.c (reg_set_p_1): Mark parameters `x' and `pat' with ATTRIBUTE_UNUSED. * scan-decls.c: Include scan.h. * scan.h (recognized_function, recognized_extern): Add prototypes. * stmt.c: Include output.h. * toplev.c (error_for_asm, warning_for_asm): Remove prototypes. (output_lang_identify): Hide prototype and definition. (float_signal): Mark parameter `signo' with ATTRIBUTE_UNUSED. (pipe_closed): Likewise. * toplev.h (count_error, strip_off_ending, error_for_asm, warning_for_asm): Add prototypes. From-SVN: r19712
1998-05-13 14:40:39 +02:00
tree lhs ATTRIBUTE_UNUSED;
tree rhs ATTRIBUTE_UNUSED;
int reflexive ATTRIBUTE_UNUSED;
{
return -1;
}
1991-12-25 04:55:54 +01:00
tree
maybe_building_objc_message_expr ()
{
return 0;
}
int
recognize_objc_keyword ()
{
return 0;
}
/* Used by c-typeck.c (build_external_ref), but only for objc. */
tree
lookup_objc_ivar (id)
tree id ATTRIBUTE_UNUSED;
{
return 0;
}
void
finish_file ()
{
c_objc_common_finish_file ();
}