8sa1-gcc/gcc/gencheck.c
Kaveh R. Ghazi 27c38fbec7 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 17:18:03 +00:00

94 lines
2.2 KiB
C

/* Generate check macros for tree codes.
Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
#include "hconfig.h"
#include "system.h"
#define DEFTREECODE(SYM, NAME, TYPE, LEN) STRINGX(SYM),
static const char *const tree_codes[] = {
#include "tree.def"
#include "c-common.def"
#include "gencheck.h"
(char*)0
};
static void usage PARAMS ((void));
static void
usage ()
{
fputs ("Usage: gencheck\n", stderr);
}
extern int main PARAMS ((int, char **));
int
main (argc, argv)
int argc;
char **argv ATTRIBUTE_UNUSED;
{
int i;
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");
for (i = 0; tree_codes[i]; i++)
{
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;
}
#if defined(USE_C_ALLOCA)
/* FIXME: We only need an xmalloc definition because we are forced to
link with alloca.o on some platforms. This should go away if/when
we link against libiberty.a. (ghazi@caip.rutgers.edu 6/3/98) */
PTR
xmalloc (nbytes)
size_t nbytes;
{
register PTR tmp = (PTR) really_call_malloc (nbytes);
if (!tmp)
{
fprintf (stderr, "can't allocate %d bytes (out of virtual memory)\n",
nbytes);
exit (FATAL_EXIT_CODE);
}
return tmp;
}
#endif /* USE_C_ALLOCA */