genextract.c: Convert remaining prototypes to ISO C90.

2003-07-07  Andreas Jaeger  <aj@suse.de>

	* genextract.c: Convert remaining prototypes to ISO C90.

	* cpplex.c (_cpp_free_buff): Convert prototype to ISO C90.
	* fold-const.c (fold_single_bit_test): Likewise.
	* diagnostic.c (default_diagnostic_finalizer): Likewise.
	* cfgrtl.c (rtl_redirect_edge_and_branch): Likewise.

	* gengtype.c (write_array): Generate ISO C90 prototypes.

	* genflags.c (gen_proto): Generate ISO C90 prototypes.


For cp:
2003-07-07  Andreas Jaeger  <aj@suse.de>

	* friend.c: Convert to ISO C90 prototypes.

	* Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
	language.
	* cfns.h: Regenerate.

	* typeck.c: Convert remaining prototypes to ISO C90.
	* search.c: Likewise.

	* decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
	* semantics.c (expand_or_defer_fn): Likewise
	* mangle.c (discriminator_for_string_literal): Likewise.
	* g++spec.c (lang_specific_driver): Likewise.

	* search.c (lookup_base_r): Remove unused variable.

From-SVN: r69050
This commit is contained in:
Andreas Jaeger 2003-07-07 21:11:59 +02:00 committed by Andreas Jaeger
parent 2c430630da
commit 5671bf2771
18 changed files with 86 additions and 115 deletions

View File

@ -1,3 +1,16 @@
2003-07-07 Andreas Jaeger <aj@suse.de>
* genextract.c: Convert remaining prototypes to ISO C90.
* cpplex.c (_cpp_free_buff): Convert prototype to ISO C90.
* fold-const.c (fold_single_bit_test): Likewise.
* diagnostic.c (default_diagnostic_finalizer): Likewise.
* cfgrtl.c (rtl_redirect_edge_and_branch): Likewise.
* gengtype.c (write_array): Generate ISO C90 prototypes.
* genflags.c (gen_proto): Generate ISO C90 prototypes.
2003-07-07 Roger Sayle <roger@eyesopen.com>
PR optimization/11059

View File

@ -936,9 +936,7 @@ redirect_branch_edge (edge e, basic_block target)
stream. */
static bool
rtl_redirect_edge_and_branch (e, target)
edge e;
basic_block target;
rtl_redirect_edge_and_branch (edge e, basic_block target)
{
if (e->flags & (EDGE_ABNORMAL_CALL | EDGE_EH))
return false;

View File

@ -1,3 +1,21 @@
2003-07-07 Andreas Jaeger <aj@suse.de>
* friend.c: Convert to ISO C90 prototypes.
* Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
language.
* cfns.h: Regenerate.
* typeck.c: Convert remaining prototypes to ISO C90.
* search.c: Likewise.
* decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
* semantics.c (expand_or_defer_fn): Likewise
* mangle.c (discriminator_for_string_literal): Likewise.
* g++spec.c (lang_specific_driver): Likewise.
* search.c (lookup_base_r): Remove unused variable.
2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
* semantics.c: (genrtl_try_block) Adjust emit_line_note

View File

@ -99,7 +99,7 @@ cc1plus$(exeext): $(CXX_OBJS) $(CXX_C_OBJS) $(BACKEND) \
# Special build rules.
$(srcdir)/cp/cfns.h: $(srcdir)/cp/cfns.gperf
gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' \
gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
$(srcdir)/cp/cfns.gperf > $(srcdir)/cp/cfns.h
gtype-cp.h gt-cp-call.h gt-cp-decl.h gt-cp-decl2.h : s-gtype; @true

View File

@ -1,5 +1,5 @@
/* C code produced by gperf version 2.7.2 */
/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p ../../../src-gcc/gcc/cp/cfns.gperf */
/* ANSI-C code produced by gperf version 2.7.2 */
/* Command-line: gperf -o -L ANSI-C -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cp/cfns.gperf */
#ifdef __GNUC__
__inline
#endif
@ -18,9 +18,7 @@ inline
#endif
#endif
static unsigned int
hash (str, len)
register const char *str;
register unsigned int len;
hash (register const char *str, register unsigned int len)
{
static const unsigned short asso_values[] =
{
@ -77,9 +75,7 @@ hash (str, len)
__inline
#endif
const char *
libc_name_p (str, len)
register const char *str;
register unsigned int len;
libc_name_p (register const char *str, register unsigned int len)
{
enum
{

View File

@ -2942,8 +2942,7 @@ finish_file ()
performing semantic analysis. */
tree
build_expr_from_tree (t)
tree t;
build_expr_from_tree (tree t)
{
if (t == NULL_TREE || t == error_mark_node)
return t;

View File

@ -47,10 +47,8 @@ Boston, MA 02111-1307, USA. */
#endif
void
lang_specific_driver (in_argc, in_argv, in_added_libraries)
int *in_argc;
const char *const **in_argv;
int *in_added_libraries;
lang_specific_driver (int *in_argc, const char *const **in_argv,
int *in_added_libraries)
{
int i, j;

View File

@ -1333,9 +1333,8 @@ discriminator_for_local_entity (tree entity)
string literals used in FUNCTION. */
static int
discriminator_for_string_literal (function, string)
tree function ATTRIBUTE_UNUSED;
tree string ATTRIBUTE_UNUSED;
discriminator_for_string_literal (tree function ATTRIBUTE_UNUSED,
tree string ATTRIBUTE_UNUSED)
{
/* For now, we don't discriminate amongst string literals. */
return 0;

View File

@ -43,10 +43,8 @@ static struct obstack search_obstack;
/* Methods for pushing and popping objects to and from obstacks. */
struct stack_level *
push_stack_level (obstack, tp, size)
struct obstack *obstack;
char *tp; /* Sony NewsOS 5.0 compiler doesn't like void * here. */
int size;
push_stack_level (struct obstack *obstack, char *tp,/* Sony NewsOS 5.0 compiler doesn't like void * here. */
int size)
{
struct stack_level *stack;
obstack_grow (obstack, tp, size);
@ -59,8 +57,7 @@ push_stack_level (obstack, tp, size)
}
struct stack_level *
pop_stack_level (stack)
struct stack_level *stack;
pop_stack_level (struct stack_level *stack)
{
struct stack_level *tem = stack;
struct obstack *obstack = tem->obstack;

View File

@ -2351,8 +2351,7 @@ expand_body (tree fn)
/* Generate RTL for FN. */
void
expand_or_defer_fn (fn)
tree fn;
expand_or_defer_fn (tree fn)
{
/* When the parser calls us after finishing the body of a template
function, we don't really want to expand the body. When we're

View File

@ -166,8 +166,7 @@ complete_type_or_diagnostic (tree type, tree value, int diag_type)
/* Return truthvalue of whether type of EXP is instantiated. */
int
type_unknown_p (exp)
tree exp;
type_unknown_p (tree exp)
{
return (TREE_CODE (exp) == OVERLOAD
|| TREE_CODE (exp) == TREE_LIST
@ -185,8 +184,7 @@ type_unknown_p (exp)
signatures of T1 and T2: [expr.rel], [expr.eq]. */
static tree
qualify_type_recursive (t1, t2)
tree t1, t2;
qualify_type_recursive (tree t1, tree t2)
{
if ((TYPE_PTR_P (t1) && TYPE_PTR_P (t2))
|| (TYPE_PTRMEM_P (t1) && TYPE_PTRMEM_P (t2)))
@ -231,8 +229,7 @@ qualify_type_recursive (t1, t2)
lists are already common. */
tree
commonparms (p1, p2)
tree p1, p2;
commonparms (tree p1, tree p2)
{
tree oldargs = p1, newargs, n;
int i, len;
@ -293,8 +290,7 @@ commonparms (p1, p2)
/* Given a type, perhaps copied for a typedef,
find the "original" version of it. */
tree
original_type (t)
tree t;
original_type (tree t)
{
while (TYPE_NAME (t) != NULL_TREE)
{
@ -314,9 +310,7 @@ original_type (t)
T2 as described in [expr]. */
tree
type_after_usual_arithmetic_conversions (t1, t2)
tree t1;
tree t2;
type_after_usual_arithmetic_conversions (tree t1, tree t2)
{
enum tree_code code1 = TREE_CODE (t1);
enum tree_code code2 = TREE_CODE (t2);
@ -459,12 +453,8 @@ type_after_usual_arithmetic_conversions (t1, t2)
string describing the current location, in case an error occurs. */
tree
composite_pointer_type (t1, t2, arg1, arg2, location)
tree t1;
tree t2;
tree arg1;
tree arg2;
const char* location;
composite_pointer_type (tree t1, tree t2, tree arg1, tree arg2,
const char* location)
{
tree result_type;
tree attributes;
@ -547,8 +537,7 @@ composite_pointer_type (t1, t2, arg1, arg2, location)
differences would cause the two types to compare unalike. */
tree
merge_types (t1, t2)
tree t1, t2;
merge_types (tree t1, tree t2)
{
register enum tree_code code1;
register enum tree_code code2;
@ -695,8 +684,7 @@ merge_types (t1, t2)
if the operands have the given two types. */
tree
common_type (t1, t2)
tree t1, t2;
common_type (tree t1, tree t2)
{
enum tree_code code1;
enum tree_code code2;
@ -2210,9 +2198,7 @@ build_ptrmemfunc_access_expr (tree ptrmem, tree member_name)
Must also handle REFERENCE_TYPEs for C++. */
tree
build_x_indirect_ref (ptr, errorstring)
tree ptr;
const char *errorstring;
build_x_indirect_ref (tree ptr, const char *errorstring)
{
tree rval;
@ -2227,9 +2213,7 @@ build_x_indirect_ref (ptr, errorstring)
}
tree
build_indirect_ref (ptr, errorstring)
tree ptr;
const char *errorstring;
build_indirect_ref (tree ptr, const char *errorstring)
{
register tree pointer, type;
@ -2309,8 +2293,7 @@ build_indirect_ref (ptr, errorstring)
will inherit the type of the array, which will be some pointer type. */
tree
build_array_ref (array, idx)
tree array, idx;
build_array_ref (tree array, tree idx)
{
if (idx == 0)
{
@ -2466,9 +2449,7 @@ build_array_ref (array, idx)
later has the right member. */
tree
get_member_function_from_ptrfunc (instance_ptrptr, function)
tree *instance_ptrptr;
tree function;
get_member_function_from_ptrfunc (tree *instance_ptrptr, tree function)
{
if (TREE_CODE (function) == OFFSET_REF)
function = TREE_OPERAND (function, 1);
@ -2570,8 +2551,7 @@ get_member_function_from_ptrfunc (instance_ptrptr, function)
}
tree
build_function_call (function, params)
tree function, params;
build_function_call (tree function, tree params)
{
register tree fntype, fndecl;
register tree coerced_params;
@ -2689,9 +2669,7 @@ build_function_call (function, params)
default arguments, if such were specified. Do so here. */
tree
convert_arguments (typelist, values, fndecl, flags)
tree typelist, values, fndecl;
int flags;
convert_arguments (tree typelist, tree values, tree fndecl, int flags)
{
register tree typetail, valtail;
register tree result = NULL_TREE;
@ -2848,9 +2826,7 @@ convert_arguments (typelist, values, fndecl, flags)
conversions on the operands. CODE is the kind of expression to build. */
tree
build_x_binary_op (code, arg1, arg2)
enum tree_code code;
tree arg1, arg2;
build_x_binary_op (enum tree_code code, tree arg1, tree arg2)
{
if (processing_template_decl)
return build_min_nt (code, arg1, arg2);
@ -3057,10 +3033,8 @@ build_template_expr (enum tree_code code, tree op0, tree op1, tree op2)
multiple inheritance, and deal with pointer to member functions. */
tree
build_binary_op (code, orig_op0, orig_op1, convert_p)
enum tree_code code;
tree orig_op0, orig_op1;
int convert_p ATTRIBUTE_UNUSED;
build_binary_op (enum tree_code code, tree orig_op0, tree orig_op1,
int convert_p ATTRIBUTE_UNUSED)
{
tree op0, op1;
register enum tree_code code0, code1;
@ -3792,9 +3766,8 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
of pointer PTROP and integer INTOP. */
static tree
cp_pointer_int_sum (resultcode, ptrop, intop)
enum tree_code resultcode;
register tree ptrop, intop;
cp_pointer_int_sum (enum tree_code resultcode, register tree ptrop,
register tree intop)
{
tree res_type = TREE_TYPE (ptrop);
@ -3812,9 +3785,7 @@ cp_pointer_int_sum (resultcode, ptrop, intop)
The resulting tree has type int. */
static tree
pointer_diff (op0, op1, ptrtype)
register tree op0, op1;
register tree ptrtype;
pointer_diff (register tree op0, register tree op1, register tree ptrtype)
{
register tree result, folded;
tree restype = ptrdiff_type_node;
@ -3868,9 +3839,7 @@ pointer_diff (op0, op1, ptrtype)
and XARG is the operand. */
tree
build_x_unary_op (code, xarg)
enum tree_code code;
tree xarg;
build_x_unary_op (enum tree_code code, tree xarg)
{
tree exp;
int ptrmem = 0;
@ -3947,8 +3916,7 @@ build_x_unary_op (code, xarg)
-1. */
tree
cp_truthvalue_conversion (expr)
tree expr;
cp_truthvalue_conversion (tree expr)
{
tree type = TREE_TYPE (expr);
if (TYPE_PTRMEM_P (type))
@ -3960,8 +3928,7 @@ cp_truthvalue_conversion (expr)
/* Just like cp_truthvalue_conversion, but we want a CLEANUP_POINT_EXPR. */
tree
condition_conversion (expr)
tree expr;
condition_conversion (tree expr)
{
tree t;
if (processing_template_decl)

View File

@ -1422,8 +1422,7 @@ _cpp_extend_buff (cpp_reader *pfile, _cpp_buff **pbuff, size_t min_extra)
/* Free a chain of buffers starting at BUFF. */
void
_cpp_free_buff (buff)
_cpp_buff *buff;
_cpp_free_buff (_cpp_buff *buff)
{
_cpp_buff *next;

View File

@ -1004,9 +1004,8 @@ default_diagnostic_starter (diagnostic_context *context,
}
static void
default_diagnostic_finalizer (context, diagnostic)
diagnostic_context *context;
diagnostic_info *diagnostic __attribute__((unused));
default_diagnostic_finalizer (diagnostic_context *context,
diagnostic_info *diagnostic __attribute__((unused)))
{
output_destroy_prefix (&context->buffer);
}

View File

@ -4784,11 +4784,8 @@ fold_inf_compare (enum tree_code code, tree type, tree arg0, tree arg1)
NULL. TYPE is the desired result type. */
tree
fold_single_bit_test (code, arg0, arg1, result_type)
enum tree_code code;
tree arg0;
tree arg1;
tree result_type;
fold_single_bit_test (enum tree_code code, tree arg0, tree arg1,
tree result_type)
{
/* If this is a TRUTH_NOT_EXPR, it may have a single bit test inside
operand 0. */

View File

@ -490,8 +490,7 @@ from the machine description file `md'. */\n\n");
/* Define this so we can link with print-rtl.o to get debug_rtx function. */
const char *
get_insn_name (code)
int code ATTRIBUTE_UNUSED;
get_insn_name (int code ATTRIBUTE_UNUSED)
{
if (code < insn_name_ptr_size)
return insn_name_ptr[code];
@ -500,9 +499,7 @@ get_insn_name (code)
}
static void
record_insn_name (code, name)
int code;
const char *name;
record_insn_name (int code, const char *name)
{
static const char *last_real_name = "insn";
static int last_real_code = 0;

View File

@ -179,13 +179,11 @@ gen_proto (rtx insn)
{
putchar ('(');
for (i = 0; i < num-1; i++)
printf ("%c, ", 'a' + i);
printf ("%c)\n", 'a' + i);
for (i = 0; i < num; i++)
printf (" rtx %c ATTRIBUTE_UNUSED;\n", 'a' + i);
printf ("rtx %c ATTRIBUTE_UNUSED, ", 'a' + i);
printf ("rtx %c ATTRIBUTE_UNUSED)\n", 'a' + i);
}
else
puts ("()");
puts ("(void)");
puts ("{\n return 0;\n}");
}

View File

@ -2623,12 +2623,11 @@ write_array (outf_p f, pair_p v, const struct write_types_data *wtd)
oprintf (f, "static void gt_%sa_%s\n", wtd->param_prefix, v->name);
oprintf (f,
" (void *, void *, gt_pointer_operator, void *);\n");
oprintf (f, "static void gt_%sa_%s (this_obj, x_p, op, cookie)\n",
oprintf (f, "static void gt_%sa_%s (void *this_obj ATTRIBUTE_UNUSED,\n",
wtd->param_prefix, v->name);
oprintf (d.of, " void *this_obj ATTRIBUTE_UNUSED;\n");
oprintf (d.of, " void *x_p ATTRIBUTE_UNUSED;\n");
oprintf (d.of, " gt_pointer_operator op ATTRIBUTE_UNUSED;\n");
oprintf (d.of, " void *cookie ATTRIBUTE_UNUSED;\n");
oprintf (d.of, " void *x_p ATTRIBUTE_UNUSED,\n");
oprintf (d.of, " gt_pointer_operator op ATTRIBUTE_UNUSED,\n");
oprintf (d.of, " void *cookie ATTRIBUTE_UNUSED)\n");
oprintf (d.of, "{\n");
d.prev_val[0] = d.prev_val[1] = d.prev_val[2] = d.val = v->name;
d.process_field = write_types_local_process_field;
@ -2639,9 +2638,8 @@ write_array (outf_p f, pair_p v, const struct write_types_data *wtd)
d.opt = v->opt;
oprintf (f, "static void gt_%sa_%s (void *);\n",
wtd->prefix, v->name);
oprintf (f, "static void\ngt_%sa_%s (x_p)\n",
oprintf (f, "static void\ngt_%sa_%s (void *x_p ATTRIBUTE_UNUSED)\n",
wtd->prefix, v->name);
oprintf (f, " void *x_p ATTRIBUTE_UNUSED;\n");
oprintf (f, "{\n");
d.prev_val[0] = d.prev_val[1] = d.prev_val[2] = d.val = v->name;
d.process_field = write_types_process_field;

View File

@ -360,8 +360,7 @@ replacement_quality (rtx reg)
/* Return 1 if INSN might end a basic block. */
static int perhaps_ends_bb_p (insn)
rtx insn;
static int perhaps_ends_bb_p (rtx insn)
{
switch (GET_CODE (insn))
{