]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2003-07-07 Andreas Jaeger <aj@suse.de>
authoraj <aj@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 7 Jul 2003 19:11:59 +0000 (19:11 +0000)
committeraj <aj@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 7 Jul 2003 19:11:59 +0000 (19:11 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69050 138bc75d-0d04-0410-961f-82ee72b054a4

18 files changed:
gcc/ChangeLog
gcc/cfgrtl.c
gcc/cp/ChangeLog
gcc/cp/Make-lang.in
gcc/cp/cfns.h
gcc/cp/decl2.c
gcc/cp/g++spec.c
gcc/cp/mangle.c
gcc/cp/search.c
gcc/cp/semantics.c
gcc/cp/typeck.c
gcc/cpplex.c
gcc/diagnostic.c
gcc/fold-const.c
gcc/genextract.c
gcc/genflags.c
gcc/gengtype.c
gcc/regmove.c

index c5e3dfdb5f998faa8d066ba1d443be3836a61ce4..5543c98f8c475b5566ca28cb37aadaf010e554b6 100644 (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
index 09e2e1c93951500b0e0056c4f1a996bff4a46913..d197b79380a177b994b21c50258f56b1f100c475 100644 (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;
index 9ad4f98116577d33feace01f3018c41a9f4d479e..8da2d01a4c36f8fc38a826590dfa4b66b4ab72ab 100644 (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
index d6b871a981d07d1ba7cbd46374cf6ad554c5fb65..df1d8a79216553ace201df25fa9c265e79622951 100644 (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
index 8f8f3eaa35a92a1de0559159fdd9263ef3ed7edb..415518bf85473c7b36fde183cc23ef3faa942a14 100644 (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
     {
index 661786d036cc8fed3b7b78fff0ab9872f0ddee7a..39f6ca5536917e0fba46e94b63a729862feac36d 100644 (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;
index 1850db421d7ecea63452d2f977403a7c3950f69b..26bc383799d100a89ef669d10a67bf4443ac6c48 100644 (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;
 
index 48ad68b47c92dd8362a4cdb4eea9202f1dbeb860..49a956886a71c63dc53efa9e782cdfbb2c18ac0d 100644 (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;
index b53784de427d7b3cd6681b61355f9320bb390aa5..cee35ff2d525d5245d715bc8c52d63079289f95c 100644 (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;
index 599aa1677601919a16c48ee899e84d0bf15bcb6d..9301e6595361c9adf820be4edc1285a656f861a0 100644 (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
index b2a674cd1cc0a45d180c337adef3fd2f471d4f3f..5be6aa88602919c1ffc5298686d4de82ef973c78 100644 (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)
index edb765dc61b47cb9466ea8a1b1ed8e7e4d38c46e..463064546fdd069909f3b83fc62f09cd9b2627aa 100644 (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;
 
index 29cfaabe8783eb1618fe5e0e6c959b927b8063d2..c9bef1a7e4a8c8e83ab5c6730a0bde329000f86b 100644 (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);
 }
index 64a30f4b82522ea0706fc9a566f67057d908095e..e4f57b8cfa326191c9f8900b1fc061ed0b8b6127 100644 (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.  */
index cf2f2ab50fd04126beb66e0d02c3d5283535fc23..ef53050fbca7fe09dd3e024f93a047acef2685f8 100644 (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;
index 1eb3a730823b191add49385313e7b35b8f1d2e02..268da76ee671b4cf0b9d3f2ed11fcc4c096d2b00 100644 (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}");
     }
 
index 101b37825114d869e46d0ad337e263bbeb974fe3..79e763cc7e1775c113f79fbe44fac661191346fd 100644 (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;
index 7085ce8696b6da3637da648672abc43dbfff3963..cfc45f4ee53b097ec932ebea57bbc6f38d7e5852 100644 (file)
@@ -360,8 +360,7 @@ replacement_quality (rtx reg)
 \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))
     {