Jakub Jelinek <jj@ultra.linux.cz>
authorJakub Jelinek <jj@ultra.linux.cz>
Mon, 2 Aug 1999 23:14:31 +0000 (01:14 +0200)
committerRichard Henderson <rth@gcc.gnu.org>
Mon, 2 Aug 1999 23:14:31 +0000 (16:14 -0700)
        * java/decl.c (start_java_method): Change all uses of
        PROMOTE_PROTOTYPES, so that it tests it as a C expression.
        Ensure expr.h is included.
        * java/expr.c (pop_arguments): Ditto.
        * java/parse.y (expand_start_java_method): Ditto.

From-SVN: r28419

gcc/java/ChangeLog
gcc/java/decl.c
gcc/java/expr.c
gcc/java/parse.c
gcc/java/parse.y

index 1b6bdd26afd70bb1e8d06627c611a02412f78994..77fcd63dafe77c9e8335d41403b8de58457e0d7b 100644 (file)
@@ -1,3 +1,11 @@
+1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
+
+       * java/decl.c (start_java_method): Change all uses of
+       PROMOTE_PROTOTYPES, so that it tests it as a C expression.
+       Ensure expr.h is included.
+       * java/expr.c (pop_arguments): Ditto.
+       * java/parse.y (expand_start_java_method): Ditto.
+
 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
index ed1e7f84e5a3bcd8abff299385eeb7a9173c480c..71e84d0a819c3c756ad1cef8eecbcac0ba9fb482 100644 (file)
@@ -34,6 +34,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc.  */
 #include "toplev.h"
 #include "function.h"
 #include "except.h"
+#include "expr.h"
 
 static tree push_jvm_slot PROTO ((int, tree));
 static tree builtin_function PROTO ((const char *, tree,
@@ -1637,11 +1638,10 @@ start_java_method (fndecl)
 
       parm_decl = build_decl (PARM_DECL, parm_name, parm_type);
       DECL_CONTEXT (parm_decl) = fndecl;
-#ifdef PROMOTE_PROTOTYPES
-      if (TYPE_PRECISION (parm_type) < TYPE_PRECISION (integer_type_node)
+      if (PROMOTE_PROTOTYPES
+         && TYPE_PRECISION (parm_type) < TYPE_PRECISION (integer_type_node)
          && INTEGRAL_TYPE_P (parm_type))
        parm_type = integer_type_node;
-#endif
       DECL_ARG_TYPE (parm_decl) = parm_type;
 
       *ptr = parm_decl;
index a825e981c3518c806ce27154a118eb6444319b18..38fa5d46fbaeb133cbd5c4a2bb4f6fb1551ac4dd 100644 (file)
@@ -1448,11 +1448,10 @@ pop_arguments (arg_types)
       tree tail = pop_arguments (TREE_CHAIN (arg_types));
       tree type = TREE_VALUE (arg_types);
       tree arg = pop_value (type);
-#ifdef PROMOTE_PROTOTYPES
-      if (TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node)
+      if (PROMOTE_PROTOTYPES
+         && TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node)
          && INTEGRAL_TYPE_P (type))
        arg = convert (integer_type_node, arg);
-#endif
       return tree_cons (NULL_TREE, arg, tail);
     }
   abort ();
index 45744593f1fc1f047417c3284969b1f24c33d2aa..b8620547d7d55bebf8b6b3590a23ea2dbb839792 100644 (file)
 #include "xref.h"
 #include "function.h"
 #include "except.h"
+#include "expr.h"
 
 #ifndef DIR_SEPARATOR
 #define DIR_SEPARATOR '/'
@@ -8178,7 +8179,8 @@ expand_start_java_method (fndecl)
       tree next = TREE_CHAIN (tem);
       tree type = TREE_TYPE (tem);
 #ifdef PROMOTE_PROTOTYPES
-      if (TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node)
+      if (PROMOTE_PROTOTYPES
+         && TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node)
          && INTEGRAL_TYPE_P (type))
        type = integer_type_node;
 #endif
index deba7e9c6bf2d26beeec02dc1999813e543b71a2..e9caf8d0c63f55261ad1cb071fbe5e339e683717 100644 (file)
@@ -64,6 +64,7 @@ definitions and other extensions.  */
 #include "xref.h"
 #include "function.h"
 #include "except.h"
+#include "expr.h"
 
 #ifndef DIR_SEPARATOR
 #define DIR_SEPARATOR '/'
@@ -5593,7 +5594,8 @@ expand_start_java_method (fndecl)
       tree next = TREE_CHAIN (tem);
       tree type = TREE_TYPE (tem);
 #ifdef PROMOTE_PROTOTYPES
-      if (TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node)
+      if (PROMOTE_PROTOTYPES
+         && TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node)
          && INTEGRAL_TYPE_P (type))
        type = integer_type_node;
 #endif