]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
treetree.c: Convert remaining K&R prototypes to ISO C90.
authorAndreas Jaeger <aj@suse.de>
Mon, 28 Jul 2003 04:39:29 +0000 (06:39 +0200)
committerAndreas Jaeger <aj@gcc.gnu.org>
Mon, 28 Jul 2003 04:39:29 +0000 (06:39 +0200)
treelang:
* treetree.c: Convert remaining K&R prototypes to ISO C90.
* tree1.c: Likewise.
* parse.y: Likewise.
* tree-convert.c: Likewise.

java:

* jvspec.c: Convert to ISO C90 prototypes.

From-SVN: r69881

gcc/java/ChangeLog
gcc/java/jvspec.c
gcc/treelang/ChangeLog
gcc/treelang/parse.y
gcc/treelang/tree-convert.c
gcc/treelang/tree1.c
gcc/treelang/treetree.c

index afbc4ffb8dfeaeff25816dc829880088d9a8f348..fba8cd5c1e6493e019923f9014531c48421d1125 100644 (file)
@@ -1,3 +1,7 @@
+2003-07-28  Andreas Jaeger  <aj@suse.de>
+
+       * jvspec.c: Convert to ISO C90 prototypes.
+
 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
 
        * decl.c (force_poplevels): Fix warning call.
index b76025ee34142616fc7302e0b3a3e381004858f0..575d9410b3815a3ad85c46f6ff4d07d2ea90a7ab 100644 (file)
@@ -84,8 +84,7 @@ static const char jvgenmain_spec[] =
 /* Return full path name of spec file if it is in DIR, or NULL if
    not.  */
 static char *
-find_spec_file (dir)
-     const char *dir;
+find_spec_file (const char *dir)
 {
   char *spec;
   int x;
@@ -116,8 +115,7 @@ find_spec_file (dir)
 /* Verify that NAME is a valid Java class name that might contain
    `main'.  Return 0 on failure.  */
 static int
-verify_class_name (name)
-     const char *name;
+verify_class_name (const char *name)
 {
   /* FIXME: what encoding do we use for command-line arguments?  For
      now we assume plain ASCII, which of course is wrong.  */
@@ -144,10 +142,8 @@ verify_class_name (name)
 }
 
 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;
 
@@ -600,7 +596,7 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries)
 }
 
 int
-lang_specific_pre_link ()
+lang_specific_pre_link (void)
 {
   int err;
   if (main_class_name == NULL)
index 16398de9227ac1a8ce67f3024f08701a6022b5ba..4dc41e7d1d54834c4517a4140828263ac468b925 100644 (file)
@@ -1,3 +1,10 @@
+2003-07-28  Andreas Jaeger  <aj@suse.de>
+
+       * treetree.c: Convert remaining K&R prototypes to ISO C90.
+       * tree1.c: Likewise.
+       * parse.y: Likewise.
+       * tree-convert.c: Likewise.
+
 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * treetree.c: Remove unnecessary casts.
index 5222a885dcfa585541c58518fcd65cdfb3e7f891..f0f721d554536eae3f11cafc188836e7b2153d45 100644 (file)
 /* My yylex routine used to intercept calls to flex generated code, to
      record lex time.  */
 int yylex (void);
-static inline int my_yylex(void);
+static inline int my_yylex (void);
 /* Call lex, but ensure time is charged to TV_LEX.  */ 
-static inline int my_yylex ()
+static inline int
+my_yylex (void)
 {
   int res;
   timevar_push (TV_LEX);
index 6d50ef5a76a205ad5fbe7b2e1fc14c6f81fd827d..77741453f40c804361db52a2dad636a7ecccf4cf 100644 (file)
@@ -1,6 +1,6 @@
 /* Language-level data type conversion for Treelang.
    This is a very slightly modified copy of c-convert.c.
-   Copyright (C) 1987, 1988, 1991, 1998, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1987, 1988, 1991, 1998, 2002, 2003 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -60,8 +60,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
    not permitted by the language being compiled.  */
 
 tree
-convert (type, expr)
-     tree type, expr;
+convert (tree type, tree expr)
 {
   tree e = expr;
   enum tree_code code = TREE_CODE (type);
index 640f5f21801e08d26267c1c43a823441fb860ee8..3ee7c161944ebcf29d24ccff940c8dd9bfcc857a 100644 (file)
@@ -138,7 +138,7 @@ treelang_handle_option (size_t scode, const char *arg ATTRIBUTE_UNUSED,
 /* Language dependent parser setup.  */
 
 bool
-treelang_init ()
+treelang_init (void)
 {
   input_filename = main_input_filename;
   input_line = 0;
index 8a57e27df155f5bc4a195567baf00cb1c1d0506f..7697e3c49e51c2acf54069252933f41440c6d7be 100644 (file)
@@ -122,29 +122,26 @@ struct language_function GTY(())
   char junk; /* dummy field to ensure struct is not empty */
 };
 
-static tree tree_lang_truthvalue_conversion PARAMS((tree expr));
-static bool tree_mark_addressable PARAMS((tree exp));
-static tree tree_lang_type_for_size PARAMS((unsigned precision,
-                                           int unsignedp));
-static tree tree_lang_type_for_mode PARAMS((enum machine_mode mode,
-                                           int unsignedp));
-static tree tree_lang_unsigned_type PARAMS((tree type_node));
-static tree tree_lang_signed_type PARAMS((tree type_node));
-static tree tree_lang_signed_or_unsigned_type PARAMS((int unsignedp,
-                                                     tree type));
+static tree tree_lang_truthvalue_conversion (tree expr);
+static bool tree_mark_addressable (tree exp);
+static tree tree_lang_type_for_size (unsigned precision, int unsignedp);
+static tree tree_lang_type_for_mode (enum machine_mode mode, int unsignedp);
+static tree tree_lang_unsigned_type (tree type_node);
+static tree tree_lang_signed_type (tree type_node);
+static tree tree_lang_signed_or_unsigned_type (int unsignedp, tree type);
 
 /* XXX these should be static */
-void pushlevel PARAMS((int ignore));
-tree poplevel PARAMS((int keep, int reverse, int functionbody));
-int global_bindings_p PARAMS((void));
-void insert_block PARAMS((tree block));
-void set_block PARAMS((tree block));
-tree pushdecl PARAMS((tree decl));
-tree getdecls PARAMS((void));
-int kept_level_p PARAMS((void));
-
-static void tree_push_type_decl PARAMS((tree id, tree type_node));
-static void tree_push_atomic_type_decl PARAMS((tree id, tree type_node));
+void pushlevel (int ignore);
+tree poplevel (int keep, int reverse, int functionbody);
+int global_bindings_p (void);
+void insert_block (tree block);
+void set_block (tree block);
+tree pushdecl (tree decl);
+tree getdecls (void);
+int kept_level_p (void);
+
+static void tree_push_type_decl (tree id, tree type_node);
+static void tree_push_atomic_type_decl (tree id, tree type_node);
 
 /* The front end language hooks (addresses of code for this front
    end).  These are not really very language-dependent, i.e.
@@ -708,7 +705,8 @@ tree_code_get_integer_value (unsigned char* chars, unsigned int length)
    with tree type TYPE and with operands1 OP1, OP2 (maybe), OP3 (maybe).  */
 tree
 tree_code_get_expression (unsigned int exp_type,
-                          tree type, tree op1, tree op2, tree op3 ATTRIBUTE_UNUSED)
+                          tree type, tree op1, tree op2,
+                         tree op3 ATTRIBUTE_UNUSED)
 {
   tree ret1;
   int operator;
@@ -906,8 +904,7 @@ static GTY(()) tree signed_and_unsigned_types[MAX_BITS_PER_WORD + 1][2];
 
 /* XXX is this definition OK? */
 static tree
-tree_lang_truthvalue_conversion (expr)
-     tree expr;
+tree_lang_truthvalue_conversion (tree expr)
 {
   return expr;
 }
@@ -919,8 +916,7 @@ tree_lang_truthvalue_conversion (expr)
    This implementation was copied from c-decl.c. */
 
 static bool
-tree_mark_addressable (exp)
-     tree exp;
+tree_mark_addressable (tree exp)
 {
   register tree x = exp;
   while (1)
@@ -982,9 +978,7 @@ tree_mark_addressable (exp)
    it is a signed type.  */
   
 static tree
-tree_lang_type_for_size (precision, unsignedp)
-     unsigned precision;
-     int unsignedp;
+tree_lang_type_for_size (unsigned precision, int unsignedp)
 {
   tree t;
 
@@ -1006,9 +1000,7 @@ tree_lang_type_for_size (precision, unsignedp)
    an unsigned type; otherwise a signed type is returned.  */
 
 static tree
-tree_lang_type_for_mode (mode, unsignedp)
-     enum machine_mode mode;
-     int unsignedp;
+tree_lang_type_for_mode (enum machine_mode mode, int unsignedp)
 {
   return tree_lang_type_for_size (GET_MODE_BITSIZE (mode), unsignedp);
 }
@@ -1016,8 +1008,7 @@ tree_lang_type_for_mode (mode, unsignedp)
 /* Return the unsigned version of a TYPE_NODE, a scalar type.  */
 
 static tree
-tree_lang_unsigned_type (type_node)
-     tree type_node;
+tree_lang_unsigned_type (tree type_node)
 {
   return tree_lang_type_for_size (TYPE_PRECISION (type_node), 1);
 }
@@ -1025,8 +1016,7 @@ tree_lang_unsigned_type (type_node)
 /* Return the signed version of a TYPE_NODE, a scalar type.  */
 
 static tree
-tree_lang_signed_type (type_node)
-     tree type_node;
+tree_lang_signed_type (tree type_node)
 {
   return tree_lang_type_for_size (TYPE_PRECISION (type_node), 0);
 }
@@ -1035,9 +1025,7 @@ tree_lang_signed_type (type_node)
    UNSIGNEDP.  */
 
 static tree
-tree_lang_signed_or_unsigned_type (unsignedp, type)
-     int unsignedp;
-     tree type;
+tree_lang_signed_or_unsigned_type (int unsignedp, tree type)
 {
   if (! INTEGRAL_TYPE_P (type) || TREE_UNSIGNED (type) == unsignedp)
     return type;
@@ -1095,7 +1083,7 @@ static struct binding_level clear_binding_level = {NULL, NULL, NULL, NULL};
 /* Return non-zero if we are currently in the global binding level.  */
 
 int
-global_bindings_p ()
+global_bindings_p (void)
 {
   return current_binding_level == global_binding_level ? -1 : 0;
 }
@@ -1104,7 +1092,7 @@ global_bindings_p ()
    is in reverse order (it has to be so for back-end compatibility).  */
 
 tree
-getdecls ()
+getdecls (void)
 {
   return current_binding_level->names;
 }
@@ -1112,7 +1100,7 @@ getdecls ()
 /* Nonzero if the current level needs to have a BLOCK made.  */
 
 int
-kept_level_p ()
+kept_level_p (void)
 {
   return (current_binding_level->names != 0);
 }
@@ -1121,8 +1109,7 @@ kept_level_p ()
    specified for back-end compatibility.  */
 
 void
-pushlevel (ignore)
-     int ignore ATTRIBUTE_UNUSED;
+pushlevel (int ignore ATTRIBUTE_UNUSED)
 {
   struct binding_level *newlevel = xmalloc (sizeof (struct binding_level));
 
@@ -1150,10 +1137,7 @@ pushlevel (ignore)
    them into the BLOCK.  */
 
 tree
-poplevel (keep, reverse, functionbody)
-     int keep;
-     int reverse;
-     int functionbody;
+poplevel (int keep, int reverse, int functionbody)
 {
   /* Points to a BLOCK tree node. This is the BLOCK node construted for the
      binding level that we are about to exit and which is returned by this
@@ -1247,8 +1231,7 @@ poplevel (keep, reverse, functionbody)
    to handle the BLOCK node inside the BIND_EXPR.  */
 
 void
-insert_block (block)
-     tree block;
+insert_block (tree block)
 {
   TREE_USED (block) = 1;
   current_binding_level->blocks
@@ -1259,8 +1242,7 @@ insert_block (block)
    (the one we are currently in).  */
 
 void
-set_block (block)
-     tree block;
+set_block (tree block)
 {
   current_binding_level->block_created_by_back_end = block;
 }
@@ -1269,8 +1251,7 @@ set_block (block)
    Returns the ..._DECL node. */
 
 tree
-pushdecl (decl)
-     tree decl;
+pushdecl (tree decl)
 {
   /* External objects aren't nested, other objects may be.  */
     
@@ -1297,9 +1278,7 @@ pushdecl (decl)
 \f
 
 static void
-tree_push_type_decl(id, type_node)
-     tree id;
-     tree type_node;
+tree_push_type_decl(tree id, tree type_node)
 {
   tree decl = build_decl (TYPE_DECL, id, type_node);
   TYPE_NAME (type_node) = decl;
@@ -1312,9 +1291,7 @@ tree_push_type_decl(id, type_node)
    not for e.g. pointer or array types.  */
 
 static void
-tree_push_atomic_type_decl(id, type_node)
-     tree id;
-     tree type_node;
+tree_push_atomic_type_decl(tree id, tree type_node)
 {
   TREE_TYPE (type_node) = type_node;
   tree_push_type_decl (id, type_node);
@@ -1328,7 +1305,7 @@ tree_push_atomic_type_decl(id, type_node)
    Make definitions for built-in primitive functions.  */
 
 void
-treelang_init_decl_processing ()
+treelang_init_decl_processing (void)
 {
   current_function_decl = NULL;
   current_binding_level = NULL_BINDING_LEVEL;
@@ -1406,13 +1383,9 @@ treelang_init_decl_processing ()
 */
 
 tree
-builtin_function (name, type, function_code, class, library_name, attrs)
-     const char *name;
-     tree type;
-     int function_code;
-     enum built_in_class class;
-     const char *library_name;
-     tree attrs;
+builtin_function (const char *name, tree type, int function_code,
+                 enum built_in_class class, const char *library_name,
+                 tree attrs)
 {
   tree decl = build_decl (FUNCTION_DECL, get_identifier (name), type);
   DECL_EXTERNAL (decl) = 1;