gcc/gcc/gencheck.c

83 lines
2.0 KiB
C
Raw Permalink Normal View History

/* Generate check macros for tree codes.
Copyright (C) 1998-2017 Free Software Foundation, Inc.
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.
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 3, or (at your option) any later
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
version.
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.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
2014-05-06 18:25:05 +02:00
/* We don't have insn-modes.h, but we include tm.h. */
#define BITS_PER_UNIT 8
#include "bconfig.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#define DEFTREECODE(SYM, NAME, TYPE, LEN) #SYM,
tree.h (enum tree_code): Include all-tree.def, not tree.def. * tree.h (enum tree_code): Include all-tree.def, not tree.def. Define END_OF_BASE_TREE_CODES around inclusion. * tree.c (tree_code_type): New global array. (tree_code_length, tree_code_name): Likewise. * Makefile.in (TREE_H): Add all-tree.def, c-common.def, and $(lang_tree_files). (all-tree.def, s-alltree): New targets. (gencheck.h, s-gencheck): Remove. (tree.o): Depend upon all-tree.def. (build/gencheck.o): Remove gencheck.h dependency. (mostlyclean): Don't remove gencheck.h. * c-common.h (enum c_tree_code): Remove. * c-lang.c (tree_code_type): Remove. (tree_code_length, tree_code_name): Remove. * gencheck.c (tree_codes): Include all-tree.def, rather than tree.def, c-common.def, and gencheck.h. Undefined DEFTREECODE after it is used. * tree-browser.c (tb_tree_codes): Include all-tree.def, rather than tree.def. * cp/cp-tree.h (enum cplus_tree_code): Remove. (operator_name_info): Size to MAX_TREE_CODES. (assignment_operator_name_info): Likewise. * cp/cp-lang.c (tree_code_type): Remove. (tree_code_length, tree_code_name): Remove. * cp/lex.c (operator_name_info): Size to MAX_TREE_CODES. (assignment_operator_name_info): Likewise. * cp/decl.c (grok_op_properties): Change LAST_CPLUS_TREE_CODE to MAX_TREE_CODES. * cp/mangle.c (write_expression): Likewise. * cp/Make-lang.in (CXX_TREE_H): Remove cp/cp-tree.def. * fortran/f95-lang.c (tree_code_type): Remove. (tree_code_length, tree_code_name): Remove. * java/java-tree.h (enum java_tree_code): Remove. * java/lang.c (tree_code_type): Remove. (tree_code_length, tree_code_name): Remove. * java/Make-lang.in (JAVA_TREE_H): Remove java/java-tree.def. * objc/objc-act.h (enum objc_tree_code): Remove. * objc/objc-lang.c (tree_code_type): Remove. (tree_code_length, tree_code_name): Remove. * objcp/objcp-lang.c (tree_code_type): Remove. (tree_code_length, tree_code_name): Remove. * ada/ada-tree.h (enum gnat_tree_code): Remove. * ada/Make-lang.in (ADA_TREE_H): Remove ada/ada-tre.def. * ada/misc.c (tree_code_type): Remove. (tree_code_length, tree_code_name): Remove. From-SVN: r137006
2008-06-21 23:17:40 +02:00
#define END_OF_BASE_TREE_CODES
c-common.c (c_tree_code_name): Const-ification. * c-common.c (c_tree_code_name): Const-ification. * c-decl.c (c_decode_option): Likewise. * c-typeck.c (warn_for_assignment): Likewise. * collect2.c (libexts, is_ctor_dtor, main, ignore_library): Likewise. * cppinit.c (output_deps): Likewise. * dependence.c (dependence_string, direction_string): Likewise. * dwarf2out.c (output_ranges): Likewise. * fixinc/fixfixes.c (emit_gnu_type): Likewise. * fixinc/gnu-regex.c (re_error_msgid): Likewise. * gcc.c (standard_exec_prefix, standard_exec_prefix_1, standard_startfile_prefix, standard_startfile_prefix_1, standard_startfile_prefix_2, tooldir_base_prefix, standard_bindir_prefix, find_a_file): Likewise. * genattrtab.c (make_length_attrs): Likewise. * gencheck.c (tree_codes): Likewise. * genemit.c (gen_split): Likewise. * genrecog.c (special_mode_pred_table): Likewise. * graph.c (graph_ext): Likewise. * protoize (default_include): Likewise. * reload.c (reload_when_needed_name): Likewise. * sched-vis.c (visualize_stall_cycles): Likewise. * tlink.c (recompile_files): Likewise. * toplev.c (decode_g_option): Likewise. * tradcpp.c (output_deps): Likewise. * varasm.c (decode_reg_name): Likewise. * arm.c (arm_condition_codes, strings_fpa, thumb_condition_code): Const-ification. * arm.md: Likewise. * avr.c (avr_regnames, encode_section_info): Likewise. * c4x.c (float_reg_names): Likewise. * darwin.h (ASM_GLOBALIZE_LABEL): Likewise. * elfos.h (const_section): Likewise. * i386.c (ix86_comp_type_attributes): Likewise. * i386/win32.h (STRIP_NAME_ENCODING): Likewise. * ia64/aix.h (UNIQUE_SECTION): Likewise. * ia64.c (type_names): Likewise. * m68hc11.c (reg_class_names): Likewise. * m88k.c (m_options): Likewise. * mips.c (mips_output_conditional_branch, mips_unique_section): Likewise. * rs6000/sysv4.h (ASM_DECLARE_FUNCTION_NAME): Likewise. * sparc.c (sparc_flat_function_prologue, sparc_flat_function_epilogue, ultra_code_names): Likewise. * sparc.h (OVERRIDE_OPTIONS): Likewise. From-SVN: r45567
2001-09-12 19:18:03 +02:00
static const char *const tree_codes[] = {
tree.h (enum tree_code): Include all-tree.def, not tree.def. * tree.h (enum tree_code): Include all-tree.def, not tree.def. Define END_OF_BASE_TREE_CODES around inclusion. * tree.c (tree_code_type): New global array. (tree_code_length, tree_code_name): Likewise. * Makefile.in (TREE_H): Add all-tree.def, c-common.def, and $(lang_tree_files). (all-tree.def, s-alltree): New targets. (gencheck.h, s-gencheck): Remove. (tree.o): Depend upon all-tree.def. (build/gencheck.o): Remove gencheck.h dependency. (mostlyclean): Don't remove gencheck.h. * c-common.h (enum c_tree_code): Remove. * c-lang.c (tree_code_type): Remove. (tree_code_length, tree_code_name): Remove. * gencheck.c (tree_codes): Include all-tree.def, rather than tree.def, c-common.def, and gencheck.h. Undefined DEFTREECODE after it is used. * tree-browser.c (tb_tree_codes): Include all-tree.def, rather than tree.def. * cp/cp-tree.h (enum cplus_tree_code): Remove. (operator_name_info): Size to MAX_TREE_CODES. (assignment_operator_name_info): Likewise. * cp/cp-lang.c (tree_code_type): Remove. (tree_code_length, tree_code_name): Remove. * cp/lex.c (operator_name_info): Size to MAX_TREE_CODES. (assignment_operator_name_info): Likewise. * cp/decl.c (grok_op_properties): Change LAST_CPLUS_TREE_CODE to MAX_TREE_CODES. * cp/mangle.c (write_expression): Likewise. * cp/Make-lang.in (CXX_TREE_H): Remove cp/cp-tree.def. * fortran/f95-lang.c (tree_code_type): Remove. (tree_code_length, tree_code_name): Remove. * java/java-tree.h (enum java_tree_code): Remove. * java/lang.c (tree_code_type): Remove. (tree_code_length, tree_code_name): Remove. * java/Make-lang.in (JAVA_TREE_H): Remove java/java-tree.def. * objc/objc-act.h (enum objc_tree_code): Remove. * objc/objc-lang.c (tree_code_type): Remove. (tree_code_length, tree_code_name): Remove. * objcp/objcp-lang.c (tree_code_type): Remove. (tree_code_length, tree_code_name): Remove. * ada/ada-tree.h (enum gnat_tree_code): Remove. * ada/Make-lang.in (ADA_TREE_H): Remove ada/ada-tre.def. * ada/misc.c (tree_code_type): Remove. (tree_code_length, tree_code_name): Remove. From-SVN: r137006
2008-06-21 23:17:40 +02:00
#include "all-tree.def"
(char*) 0
};
tree.h (enum tree_code): Include all-tree.def, not tree.def. * tree.h (enum tree_code): Include all-tree.def, not tree.def. Define END_OF_BASE_TREE_CODES around inclusion. * tree.c (tree_code_type): New global array. (tree_code_length, tree_code_name): Likewise. * Makefile.in (TREE_H): Add all-tree.def, c-common.def, and $(lang_tree_files). (all-tree.def, s-alltree): New targets. (gencheck.h, s-gencheck): Remove. (tree.o): Depend upon all-tree.def. (build/gencheck.o): Remove gencheck.h dependency. (mostlyclean): Don't remove gencheck.h. * c-common.h (enum c_tree_code): Remove. * c-lang.c (tree_code_type): Remove. (tree_code_length, tree_code_name): Remove. * gencheck.c (tree_codes): Include all-tree.def, rather than tree.def, c-common.def, and gencheck.h. Undefined DEFTREECODE after it is used. * tree-browser.c (tb_tree_codes): Include all-tree.def, rather than tree.def. * cp/cp-tree.h (enum cplus_tree_code): Remove. (operator_name_info): Size to MAX_TREE_CODES. (assignment_operator_name_info): Likewise. * cp/cp-lang.c (tree_code_type): Remove. (tree_code_length, tree_code_name): Remove. * cp/lex.c (operator_name_info): Size to MAX_TREE_CODES. (assignment_operator_name_info): Likewise. * cp/decl.c (grok_op_properties): Change LAST_CPLUS_TREE_CODE to MAX_TREE_CODES. * cp/mangle.c (write_expression): Likewise. * cp/Make-lang.in (CXX_TREE_H): Remove cp/cp-tree.def. * fortran/f95-lang.c (tree_code_type): Remove. (tree_code_length, tree_code_name): Remove. * java/java-tree.h (enum java_tree_code): Remove. * java/lang.c (tree_code_type): Remove. (tree_code_length, tree_code_name): Remove. * java/Make-lang.in (JAVA_TREE_H): Remove java/java-tree.def. * objc/objc-act.h (enum objc_tree_code): Remove. * objc/objc-lang.c (tree_code_type): Remove. (tree_code_length, tree_code_name): Remove. * objcp/objcp-lang.c (tree_code_type): Remove. (tree_code_length, tree_code_name): Remove. * ada/ada-tree.h (enum gnat_tree_code): Remove. * ada/Make-lang.in (ADA_TREE_H): Remove ada/ada-tre.def. * ada/misc.c (tree_code_type): Remove. (tree_code_length, tree_code_name): Remove. From-SVN: r137006
2008-06-21 23:17:40 +02:00
#undef DEFTREECODE
#undef END_OF_BASE_TREE_CODES
static void usage (void);
static void
usage (void)
{
fputs ("Usage: gencheck\n", stderr);
}
int
main (int argc, char ** ARG_UNUSED (argv))
{
int i, j;
switch (argc)
{
case 1:
break;
default:
usage ();
return (1);
}
puts ("/* This file is generated using gencheck. Do not edit. */\n");
puts ("#ifndef GCC_TREE_CHECK_H");
puts ("#define GCC_TREE_CHECK_H\n");
/* Print macros for checks based on each of the tree code names. However,
since we include the tree nodes from all languages, we must check
for duplicate names to avoid defining the same macro twice. */
for (i = 0; tree_codes[i]; i++)
{
for (j = 0; j < i; j++)
if (strcmp (tree_codes[i], tree_codes[j]) == 0)
break;
if (i == j)
printf ("#define %s_CHECK(t)\tTREE_CHECK (t, %s)\n",
tree_codes[i], tree_codes[i]);
}
puts ("\n#endif /* GCC_TREE_CHECK_H */");
return 0;
}