+1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
+
+ * call.c (convert_default_arg, build_over_call): Change all uses of
+ PROMOTE_PROTOTYPES, so that it tests it as a C expression.
+ Ensure expr.h is included.
+ * decl.c (grokparams): Ditto.
+ * pt.c (tsubst_decl): Ditto.
+ * typeck.c (convert_arguments): Ditto.
+
1999-08-02 Jason Merrill <jason@yorick.cygnus.com>
* class.c (mark_overriders): Fix order of args to overrides.
#include "flags.h"
#include "rtl.h"
#include "toplev.h"
+#include "expr.h"
#include "obstack.h"
#define obstack_chunk_alloc xmalloc
arg = convert_for_initialization (0, type, arg, LOOKUP_NORMAL,
"default argument", 0, 0);
-#ifdef PROMOTE_PROTOTYPES
- if ((TREE_CODE (type) == INTEGER_TYPE
- || TREE_CODE (type) == ENUMERAL_TYPE)
+ if (PROMOTE_PROTOTYPES
+ && (TREE_CODE (type) == INTEGER_TYPE
+ || TREE_CODE (type) == ENUMERAL_TYPE)
&& (TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node)))
arg = default_conversion (arg);
-#endif
}
return arg;
val = convert_like (conv, TREE_VALUE (arg));
}
-#ifdef PROMOTE_PROTOTYPES
- if ((TREE_CODE (type) == INTEGER_TYPE
- || TREE_CODE (type) == ENUMERAL_TYPE)
+ if (PROMOTE_PROTOTYPES
+ && (TREE_CODE (type) == INTEGER_TYPE
+ || TREE_CODE (type) == ENUMERAL_TYPE)
&& (TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node)))
val = default_conversion (val);
-#endif
converted_args = expr_tree_cons (NULL_TREE, val, converted_args);
}
#include "except.h"
#include "toplev.h"
#include "../hash.h"
+#include "expr.h"
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
/* Since there is a prototype, args are passed in their own types. */
DECL_ARG_TYPE (decl) = TREE_TYPE (decl);
-#ifdef PROMOTE_PROTOTYPES
- if ((TREE_CODE (type) == INTEGER_TYPE
- || TREE_CODE (type) == ENUMERAL_TYPE)
+ if (PROMOTE_PROTOTYPES
+ && (TREE_CODE (type) == INTEGER_TYPE
+ || TREE_CODE (type) == ENUMERAL_TYPE)
&& TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node))
DECL_ARG_TYPE (decl) = integer_type_node;
-#endif
if (!any_error && init)
{
any_init++;
#include "toplev.h"
#include "rtl.h"
#include "varray.h"
+#include "expr.h"
/* The type of functions taking a tree, and some additional data, and
returning an int. */
/*complain=*/1, in_decl);
DECL_CONTEXT (r) = NULL_TREE;
-#ifdef PROMOTE_PROTOTYPES
- if ((TREE_CODE (type) == INTEGER_TYPE
- || TREE_CODE (type) == ENUMERAL_TYPE)
+ if (PROMOTE_PROTOTYPES
+ && (TREE_CODE (type) == INTEGER_TYPE
+ || TREE_CODE (type) == ENUMERAL_TYPE)
&& TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node))
DECL_ARG_TYPE (r) = integer_type_node;
-#endif
if (TREE_CHAIN (t))
TREE_CHAIN (r) = tsubst (TREE_CHAIN (t), args,
/*complain=*/1, TREE_CHAIN (t));
parmval = convert_for_initialization
(NULL_TREE, type, val, flags,
"argument passing", fndecl, i);
-#ifdef PROMOTE_PROTOTYPES
- if ((TREE_CODE (type) == INTEGER_TYPE
- || TREE_CODE (type) == ENUMERAL_TYPE)
+ if (PROMOTE_PROTOTYPES
+ && (TREE_CODE (type) == INTEGER_TYPE
+ || TREE_CODE (type) == ENUMERAL_TYPE)
&& (TYPE_PRECISION (type)
< TYPE_PRECISION (integer_type_node)))
parmval = default_conversion (parmval);
-#endif
}
if (parmval == error_mark_node)