+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
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;
+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
# 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
-/* 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
#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[] =
{
__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
{
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;
#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;
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;
/* 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);
}
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;
/* 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
/* 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
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)))
lists are already common. */
tree
-commonparms (p1, p2)
- tree p1, p2;
+commonparms (tree p1, tree p2)
{
tree oldargs = p1, newargs, n;
int i, len;
/* 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)
{
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);
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;
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;
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;
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;
}
tree
-build_indirect_ref (ptr, errorstring)
- tree ptr;
- const char *errorstring;
+build_indirect_ref (tree ptr, const char *errorstring)
{
register tree pointer, type;
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)
{
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);
}
tree
-build_function_call (function, params)
- tree function, params;
+build_function_call (tree function, tree params)
{
register tree fntype, fndecl;
register tree coerced_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;
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);
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;
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);
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;
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;
-1. */
tree
-cp_truthvalue_conversion (expr)
- tree expr;
+cp_truthvalue_conversion (tree expr)
{
tree type = TREE_TYPE (expr);
if (TYPE_PTRMEM_P (type))
/* 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)
/* 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;
}
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);
}
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. */
/* 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];
}
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;
{
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}");
}
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;
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;
\f
/* 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))
{