Commit b746c5dc by Gabriel Dos Reis Committed by Gabriel Dos Reis

Remove traditional C constructs 3/n.

	* cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
	build_up_reference, warn_ref_binding, convert_to_reference,
	convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
	convert_to_void, convert, convert_force, build_type_conversion,
	build_expr_type_conversion, type_promotes_to,
	perform_qualification_conversions): Use C90 prototyping style.
	* decl2.c (grok_array_decl): Use boolean constant.
	(delete_sanity): Likewise.
	* typeck.c (build_unary_op): Likewise.
	* semantics.c (finish_switch_cond): Likewise.
	* parser.c (cp_parser_direct_new_declarator): Likewise.
	* init.c (build_new): Likewise.

From-SVN: r60574
parent b9b21a05
2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
Remove traditional C constructs 3/n.
* cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
build_up_reference, warn_ref_binding, convert_to_reference,
convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
convert_to_void, convert, convert_force, build_type_conversion,
build_expr_type_conversion, type_promotes_to,
perform_qualification_conversions): Use C90 prototyping style.
* decl2.c (grok_array_decl): Use boolean constant.
(delete_sanity): Likewise.
* typeck.c (build_unary_op): Likewise.
* semantics.c (finish_switch_cond): Likewise.
* parser.c (cp_parser_direct_new_declarator): Likewise.
* init.c (build_new): Likewise.
2002-12-27 Mark Mitchell <mark@codesourcery.com> 2002-12-27 Mark Mitchell <mark@codesourcery.com>
* Make-lang.in (po-generated): Remove parse.c. * Make-lang.in (po-generated): Remove parse.c.
...@@ -196,29 +212,30 @@ ...@@ -196,29 +212,30 @@
2002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net> 2002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
* call.c (tourney, build_field_call, equal_functions, joust) Remove traditional C constructs 2/n.
(compare_ics, build_over_call, build_java_interface_fn_ref) * call.c (tourney, build_field_call, equal_functions, joust,
(convert_like_real, op_error, build_object_call, resolve_args) compare_ics, build_over_call, build_java_interface_fn_ref,
(build_vfield_ref, check_dtor_name, build_scoped_method_call) convert_like_real, op_error, build_object_call, resolve_args,
(build_addr_func, build_call, build_method_call, null_ptr_cst_p) build_vfield_ref, check_dtor_name, build_scoped_method_call,
(sufficient_parms_p, build_conv, non_reference, strip_top_quals) build_addr_func, build_call, build_method_call, null_ptr_cst_p,
(standard_conversion, reference_related_p) sufficient_parms_p, build_conv, non_reference, strip_top_quals,
(reference_compatible_p, convert_class_to_reference) standard_conversion, reference_related_p,
(direct_reference_binding, reference_binding) reference_compatible_p, convert_class_to_reference,
(implicit_conversion, is_complete, promoted_arithmetic_type_p) direct_reference_binding, reference_binding,
(add_template_conv_candidate, any_viable, any_strictly_viable) ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
(build_this, splice_viable, print_z_candidates) add_template_conv_candidate, any_viable, any_strictly_viable,
(build_user_type_conversion, build_new_function_call) build_this, splice_viable, print_z_candidates,
(conditional_conversion, build_conditional_expr, build_new_op) build_user_type_conversion, build_new_function_call,
(build_op_delete_call, enforce_access, call_builtin_trap) conditional_conversion, build_conditional_expr, build_new_op,
(convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to) build_op_delete_call, enforce_access, call_builtin_trap,
(convert_default_arg, type_passed_as, convert_for_arg_passing) convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
(in_charge_arg_for_name, is_properly_derived_from) convert_default_arg, type_passed_as, convert_for_arg_passing,
(maybe_handle_implicit_object, maybe_handle_ref_bind) in_charge_arg_for_name, is_properly_derived_from,
(source_type, add_warning, can_convert, can_convert_arg) maybe_handle_implicit_object, maybe_handle_ref_bind,
(perform_implicit_conversion, can_convert_arg_bad) source_type, add_warning, can_convert, can_convert_arg,
(initialize_reference, add_conv_candidate) perform_implicit_conversion, can_convert_arg_bad,
(add_template_candidate_real, add_template_candidate): Ansify. initialize_reference, add_conv_candidate,
add_template_candidate_real, add_template_candidate): Ansify.
2002-12-22 Nathan Sidwell <nathan@codesourcery.com> 2002-12-22 Nathan Sidwell <nathan@codesourcery.com>
......
...@@ -3641,17 +3641,17 @@ extern tree get_vtt_name PARAMS ((tree)); ...@@ -3641,17 +3641,17 @@ extern tree get_vtt_name PARAMS ((tree));
extern tree get_primary_binfo PARAMS ((tree)); extern tree get_primary_binfo PARAMS ((tree));
/* in cvt.c */ /* in cvt.c */
extern tree convert_to_reference PARAMS ((tree, tree, int, int, tree)); extern tree convert_to_reference (tree, tree, int, int, tree);
extern tree convert_from_reference PARAMS ((tree)); extern tree convert_from_reference (tree);
extern tree convert_lvalue PARAMS ((tree, tree)); extern tree convert_lvalue (tree, tree);
extern tree ocp_convert PARAMS ((tree, tree, int, int)); extern tree ocp_convert (tree, tree, int, int);
extern tree cp_convert PARAMS ((tree, tree)); extern tree cp_convert (tree, tree);
extern tree convert_to_void PARAMS ((tree, const char */*implicit context*/)); extern tree convert_to_void (tree, const char */*implicit context*/);
extern tree convert_force PARAMS ((tree, tree, int)); extern tree convert_force (tree, tree, int);
extern tree build_type_conversion PARAMS ((tree, tree, int)); extern tree build_type_conversion (tree, tree, int);
extern tree build_expr_type_conversion PARAMS ((int, tree, int)); extern tree build_expr_type_conversion (int, tree, bool);
extern tree type_promotes_to PARAMS ((tree)); extern tree type_promotes_to (tree);
extern tree perform_qualification_conversions PARAMS ((tree, tree)); extern tree perform_qualification_conversions (tree, tree);
extern void clone_function_decl PARAMS ((tree, int)); extern void clone_function_decl PARAMS ((tree, int));
extern void adjust_clone_args PARAMS ((tree)); extern void adjust_clone_args PARAMS ((tree));
......
...@@ -37,10 +37,10 @@ Boston, MA 02111-1307, USA. */ ...@@ -37,10 +37,10 @@ Boston, MA 02111-1307, USA. */
#include "toplev.h" #include "toplev.h"
#include "decl.h" #include "decl.h"
static tree cp_convert_to_pointer PARAMS ((tree, tree, int)); static tree cp_convert_to_pointer (tree, tree, bool);
static tree convert_to_pointer_force PARAMS ((tree, tree)); static tree convert_to_pointer_force (tree, tree);
static tree build_up_reference PARAMS ((tree, tree, int, tree)); static tree build_up_reference (tree, tree, int, tree);
static void warn_ref_binding PARAMS ((tree, tree, tree)); static void warn_ref_binding (tree, tree, tree);
/* Change of width--truncation and extension of integers or reals-- /* Change of width--truncation and extension of integers or reals--
is represented with NOP_EXPR. Proper functioning of many things is represented with NOP_EXPR. Proper functioning of many things
...@@ -74,9 +74,7 @@ static void warn_ref_binding PARAMS ((tree, tree, tree)); ...@@ -74,9 +74,7 @@ static void warn_ref_binding PARAMS ((tree, tree, tree));
but not static_cast). */ but not static_cast). */
static tree static tree
cp_convert_to_pointer (type, expr, force) cp_convert_to_pointer (tree type, tree expr, bool force)
tree type, expr;
int force;
{ {
register tree intype = TREE_TYPE (expr); register tree intype = TREE_TYPE (expr);
register enum tree_code form; register enum tree_code form;
...@@ -92,7 +90,7 @@ cp_convert_to_pointer (type, expr, force) ...@@ -92,7 +90,7 @@ cp_convert_to_pointer (type, expr, force)
return error_mark_node; return error_mark_node;
} }
rval = build_type_conversion (type, expr, 1); rval = build_type_conversion (type, expr, true);
if (rval) if (rval)
{ {
if (rval == error_mark_node) if (rval == error_mark_node)
...@@ -292,8 +290,7 @@ cp_convert_to_pointer (type, expr, force) ...@@ -292,8 +290,7 @@ cp_convert_to_pointer (type, expr, force)
(such as conversion from sub-type to private super-type). */ (such as conversion from sub-type to private super-type). */
static tree static tree
convert_to_pointer_force (type, expr) convert_to_pointer_force (tree type, tree expr)
tree type, expr;
{ {
register tree intype = TREE_TYPE (expr); register tree intype = TREE_TYPE (expr);
register enum tree_code form = TREE_CODE (intype); register enum tree_code form = TREE_CODE (intype);
...@@ -340,7 +337,7 @@ convert_to_pointer_force (type, expr) ...@@ -340,7 +337,7 @@ convert_to_pointer_force (type, expr)
} }
} }
return cp_convert_to_pointer (type, expr, 1); return cp_convert_to_pointer (type, expr, true);
} }
/* We are passing something to a function which requires a reference. /* We are passing something to a function which requires a reference.
...@@ -352,9 +349,7 @@ convert_to_pointer_force (type, expr) ...@@ -352,9 +349,7 @@ convert_to_pointer_force (type, expr)
If DIRECT_BIND is set, DECL is the reference we're binding to. */ If DIRECT_BIND is set, DECL is the reference we're binding to. */
static tree static tree
build_up_reference (type, arg, flags, decl) build_up_reference (tree type, tree arg, int flags, tree decl)
tree type, arg, decl;
int flags;
{ {
tree rval; tree rval;
tree argtype = TREE_TYPE (arg); tree argtype = TREE_TYPE (arg);
...@@ -441,8 +436,7 @@ build_up_reference (type, arg, flags, decl) ...@@ -441,8 +436,7 @@ build_up_reference (type, arg, flags, decl)
non-volatile const type. */ non-volatile const type. */
static void static void
warn_ref_binding (reftype, intype, decl) warn_ref_binding (tree reftype, tree intype, tree decl)
tree reftype, intype, decl;
{ {
tree ttl = TREE_TYPE (reftype); tree ttl = TREE_TYPE (reftype);
...@@ -471,10 +465,8 @@ warn_ref_binding (reftype, intype, decl) ...@@ -471,10 +465,8 @@ warn_ref_binding (reftype, intype, decl)
we know it's an initialization. */ we know it's an initialization. */
tree tree
convert_to_reference (reftype, expr, convtype, flags, decl) convert_to_reference (tree reftype, tree expr, int convtype,
tree reftype, expr; int flags, tree decl)
int convtype, flags;
tree decl;
{ {
register tree type = TYPE_MAIN_VARIANT (TREE_TYPE (reftype)); register tree type = TYPE_MAIN_VARIANT (TREE_TYPE (reftype));
register tree intype; register tree intype;
...@@ -591,8 +583,7 @@ convert_to_reference (reftype, expr, convtype, flags, decl) ...@@ -591,8 +583,7 @@ convert_to_reference (reftype, expr, convtype, flags, decl)
way down to its lowest form. */ way down to its lowest form. */
tree tree
convert_from_reference (val) convert_from_reference (tree val)
tree val;
{ {
tree type = TREE_TYPE (val); tree type = TREE_TYPE (val);
...@@ -607,8 +598,7 @@ convert_from_reference (val) ...@@ -607,8 +598,7 @@ convert_from_reference (val)
preserving cv-qualification. */ preserving cv-qualification. */
tree tree
convert_lvalue (totype, expr) convert_lvalue (tree totype, tree expr)
tree totype, expr;
{ {
totype = cp_build_qualified_type (totype, TYPE_QUALS (TREE_TYPE (expr))); totype = cp_build_qualified_type (totype, TYPE_QUALS (TREE_TYPE (expr)));
totype = build_reference_type (totype); totype = build_reference_type (totype);
...@@ -620,8 +610,7 @@ convert_lvalue (totype, expr) ...@@ -620,8 +610,7 @@ convert_lvalue (totype, expr)
/* C++ conversions, preference to static cast conversions. */ /* C++ conversions, preference to static cast conversions. */
tree tree
cp_convert (type, expr) cp_convert (tree type, tree expr)
tree type, expr;
{ {
return ocp_convert (type, expr, CONV_OLD_CONVERT, LOOKUP_NORMAL); return ocp_convert (type, expr, CONV_OLD_CONVERT, LOOKUP_NORMAL);
} }
...@@ -631,9 +620,7 @@ cp_convert (type, expr) ...@@ -631,9 +620,7 @@ cp_convert (type, expr)
FLAGS indicates how we should behave. */ FLAGS indicates how we should behave. */
tree tree
ocp_convert (type, expr, convtype, flags) ocp_convert (tree type, tree expr, int convtype, int flags)
tree type, expr;
int convtype, flags;
{ {
register tree e = expr; register tree e = expr;
register enum tree_code code = TREE_CODE (type); register enum tree_code code = TREE_CODE (type);
...@@ -732,7 +719,7 @@ ocp_convert (type, expr, convtype, flags) ...@@ -732,7 +719,7 @@ ocp_convert (type, expr, convtype, flags)
} }
if (code == POINTER_TYPE || code == REFERENCE_TYPE if (code == POINTER_TYPE || code == REFERENCE_TYPE
|| TYPE_PTRMEMFUNC_P (type)) || TYPE_PTRMEMFUNC_P (type))
return fold (cp_convert_to_pointer (type, e, 0)); return fold (cp_convert_to_pointer (type, e, false));
if (code == VECTOR_TYPE) if (code == VECTOR_TYPE)
return fold (convert_to_vector (type, e)); return fold (convert_to_vector (type, e));
if (code == REAL_TYPE || code == COMPLEX_TYPE) if (code == REAL_TYPE || code == COMPLEX_TYPE)
...@@ -817,9 +804,7 @@ ocp_convert (type, expr, convtype, flags) ...@@ -817,9 +804,7 @@ ocp_convert (type, expr, convtype, flags)
IMPLICIT is tells us the context of an implicit void conversion. */ IMPLICIT is tells us the context of an implicit void conversion. */
tree tree
convert_to_void (expr, implicit) convert_to_void (tree expr, const char *implicit)
tree expr;
const char *implicit;
{ {
if (expr == error_mark_node if (expr == error_mark_node
|| TREE_TYPE (expr) == error_mark_node) || TREE_TYPE (expr) == error_mark_node)
...@@ -957,8 +942,7 @@ convert_to_void (expr, implicit) ...@@ -957,8 +942,7 @@ convert_to_void (expr, implicit)
do a little bit more work. */ do a little bit more work. */
tree tree
convert (type, expr) convert (tree type, tree expr)
tree type, expr;
{ {
tree intype; tree intype;
...@@ -982,10 +966,7 @@ convert (type, expr) ...@@ -982,10 +966,7 @@ convert (type, expr)
(such as conversion from sub-type to private super-type). */ (such as conversion from sub-type to private super-type). */
tree tree
convert_force (type, expr, convtype) convert_force (tree type, tree expr, int convtype)
tree type;
tree expr;
int convtype;
{ {
register tree e = expr; register tree e = expr;
register enum tree_code code = TREE_CODE (type); register enum tree_code code = TREE_CODE (type);
...@@ -1032,9 +1013,7 @@ convert_force (type, expr, convtype) ...@@ -1032,9 +1013,7 @@ convert_force (type, expr, convtype)
(jason 8/9/95) */ (jason 8/9/95) */
tree tree
build_type_conversion (xtype, expr, for_sure) build_type_conversion (tree xtype, tree expr, int for_sure)
tree xtype, expr;
int for_sure;
{ {
/* C++: check to see if we can convert this aggregate type /* C++: check to see if we can convert this aggregate type
into the required type. */ into the required type. */
...@@ -1044,14 +1023,11 @@ build_type_conversion (xtype, expr, for_sure) ...@@ -1044,14 +1023,11 @@ build_type_conversion (xtype, expr, for_sure)
/* Convert the given EXPR to one of a group of types suitable for use in an /* Convert the given EXPR to one of a group of types suitable for use in an
expression. DESIRES is a combination of various WANT_* flags (q.v.) expression. DESIRES is a combination of various WANT_* flags (q.v.)
which indicates which types are suitable. If COMPLAIN is 1, complain which indicates which types are suitable. If COMPLAIN is true, complain
about ambiguity; otherwise, the caller will deal with it. */ about ambiguity; otherwise, the caller will deal with it. */
tree tree
build_expr_type_conversion (desires, expr, complain) build_expr_type_conversion (int desires, tree expr, bool complain)
int desires;
tree expr;
int complain;
{ {
tree basetype = TREE_TYPE (expr); tree basetype = TREE_TYPE (expr);
tree conv = NULL_TREE; tree conv = NULL_TREE;
...@@ -1162,8 +1138,7 @@ build_expr_type_conversion (desires, expr, complain) ...@@ -1162,8 +1138,7 @@ build_expr_type_conversion (desires, expr, complain)
/* Implements integral promotion (4.1) and float->double promotion. */ /* Implements integral promotion (4.1) and float->double promotion. */
tree tree
type_promotes_to (type) type_promotes_to (tree type)
tree type;
{ {
int type_quals; int type_quals;
...@@ -1217,9 +1192,7 @@ type_promotes_to (type) ...@@ -1217,9 +1192,7 @@ type_promotes_to (type)
the conversion was impossible. */ the conversion was impossible. */
tree tree
perform_qualification_conversions (type, expr) perform_qualification_conversions (tree type, tree expr)
tree type;
tree expr;
{ {
if (TREE_CODE (type) == POINTER_TYPE if (TREE_CODE (type) == POINTER_TYPE
&& TREE_CODE (TREE_TYPE (expr)) == POINTER_TYPE && TREE_CODE (TREE_TYPE (expr)) == POINTER_TYPE
......
...@@ -448,15 +448,15 @@ grok_array_decl (array_expr, index_exp) ...@@ -448,15 +448,15 @@ grok_array_decl (array_expr, index_exp)
if (TREE_CODE (type) == ARRAY_TYPE) if (TREE_CODE (type) == ARRAY_TYPE)
p1 = array_expr; p1 = array_expr;
else else
p1 = build_expr_type_conversion (WANT_POINTER, array_expr, 0); p1 = build_expr_type_conversion (WANT_POINTER, array_expr, false);
if (TREE_CODE (TREE_TYPE (index_exp)) == ARRAY_TYPE) if (TREE_CODE (TREE_TYPE (index_exp)) == ARRAY_TYPE)
p2 = index_exp; p2 = index_exp;
else else
p2 = build_expr_type_conversion (WANT_POINTER, index_exp, 0); p2 = build_expr_type_conversion (WANT_POINTER, index_exp, false);
i1 = build_expr_type_conversion (WANT_INT | WANT_ENUM, array_expr, 0); i1 = build_expr_type_conversion (WANT_INT | WANT_ENUM, array_expr, false);
i2 = build_expr_type_conversion (WANT_INT | WANT_ENUM, index_exp, 0); i2 = build_expr_type_conversion (WANT_INT | WANT_ENUM, index_exp, false);
if ((p1 && i2) && (i1 && p2)) if ((p1 && i2) && (i1 && p2))
error ("ambiguous conversion for array subscript"); error ("ambiguous conversion for array subscript");
...@@ -511,7 +511,7 @@ delete_sanity (exp, size, doing_vec, use_global_delete) ...@@ -511,7 +511,7 @@ delete_sanity (exp, size, doing_vec, use_global_delete)
exp = resolve_offset_ref (exp); exp = resolve_offset_ref (exp);
exp = convert_from_reference (exp); exp = convert_from_reference (exp);
t = stabilize_reference (exp); t = stabilize_reference (exp);
t = build_expr_type_conversion (WANT_POINTER, t, 1); t = build_expr_type_conversion (WANT_POINTER, t, true);
if (t == NULL_TREE || t == error_mark_node) if (t == NULL_TREE || t == error_mark_node)
{ {
......
...@@ -1958,7 +1958,7 @@ build_new (placement, decl, init, use_global_new) ...@@ -1958,7 +1958,7 @@ build_new (placement, decl, init, use_global_new)
else else
{ {
if (build_expr_type_conversion (WANT_INT | WANT_ENUM, if (build_expr_type_conversion (WANT_INT | WANT_ENUM,
this_nelts, 0) this_nelts, false)
== NULL_TREE) == NULL_TREE)
pedwarn ("size in array new must have integral type"); pedwarn ("size in array new must have integral type");
......
...@@ -4863,7 +4863,7 @@ cp_parser_direct_new_declarator (parser) ...@@ -4863,7 +4863,7 @@ cp_parser_direct_new_declarator (parser)
expression expression
= build_expr_type_conversion (WANT_INT | WANT_ENUM, = build_expr_type_conversion (WANT_INT | WANT_ENUM,
expression, expression,
/*complain=*/1); /*complain=*/true);
if (!expression) if (!expression)
{ {
error ("expression in new-declarator must have integral or enumeration type"); error ("expression in new-declarator must have integral or enumeration type");
......
...@@ -553,7 +553,7 @@ finish_switch_cond (cond, switch_stmt) ...@@ -553,7 +553,7 @@ finish_switch_cond (cond, switch_stmt)
tree index; tree index;
/* Convert the condition to an integer or enumeration type. */ /* Convert the condition to an integer or enumeration type. */
cond = build_expr_type_conversion (WANT_INT | WANT_ENUM, cond, 1); cond = build_expr_type_conversion (WANT_INT | WANT_ENUM, cond, true);
if (cond == NULL_TREE) if (cond == NULL_TREE)
{ {
error ("switch quantity not an integer"); error ("switch quantity not an integer");
......
...@@ -3951,7 +3951,7 @@ build_unary_op (code, xarg, noconvert) ...@@ -3951,7 +3951,7 @@ build_unary_op (code, xarg, noconvert)
is enough to prevent anybody from looking inside for is enough to prevent anybody from looking inside for
associativity, but won't generate any code. */ associativity, but won't generate any code. */
if (!(arg = build_expr_type_conversion if (!(arg = build_expr_type_conversion
(WANT_ARITH | WANT_ENUM | WANT_POINTER, arg, 1))) (WANT_ARITH | WANT_ENUM | WANT_POINTER, arg, true)))
errstring = "wrong type argument to unary plus"; errstring = "wrong type argument to unary plus";
else else
{ {
...@@ -3963,7 +3963,7 @@ build_unary_op (code, xarg, noconvert) ...@@ -3963,7 +3963,7 @@ build_unary_op (code, xarg, noconvert)
break; break;
case NEGATE_EXPR: case NEGATE_EXPR:
if (!(arg = build_expr_type_conversion (WANT_ARITH | WANT_ENUM, arg, 1))) if (!(arg = build_expr_type_conversion (WANT_ARITH | WANT_ENUM, arg, true)))
errstring = "wrong type argument to unary minus"; errstring = "wrong type argument to unary minus";
else if (!noconvert) else if (!noconvert)
arg = default_conversion (arg); arg = default_conversion (arg);
...@@ -3977,14 +3977,14 @@ build_unary_op (code, xarg, noconvert) ...@@ -3977,14 +3977,14 @@ build_unary_op (code, xarg, noconvert)
arg = default_conversion (arg); arg = default_conversion (arg);
} }
else if (!(arg = build_expr_type_conversion (WANT_INT | WANT_ENUM, else if (!(arg = build_expr_type_conversion (WANT_INT | WANT_ENUM,
arg, 1))) arg, true)))
errstring = "wrong type argument to bit-complement"; errstring = "wrong type argument to bit-complement";
else if (!noconvert) else if (!noconvert)
arg = default_conversion (arg); arg = default_conversion (arg);
break; break;
case ABS_EXPR: case ABS_EXPR:
if (!(arg = build_expr_type_conversion (WANT_ARITH | WANT_ENUM, arg, 1))) if (!(arg = build_expr_type_conversion (WANT_ARITH | WANT_ENUM, arg, true)))
errstring = "wrong type argument to abs"; errstring = "wrong type argument to abs";
else if (!noconvert) else if (!noconvert)
arg = default_conversion (arg); arg = default_conversion (arg);
...@@ -3992,7 +3992,7 @@ build_unary_op (code, xarg, noconvert) ...@@ -3992,7 +3992,7 @@ build_unary_op (code, xarg, noconvert)
case CONJ_EXPR: case CONJ_EXPR:
/* Conjugating a real value is a no-op, but allow it anyway. */ /* Conjugating a real value is a no-op, but allow it anyway. */
if (!(arg = build_expr_type_conversion (WANT_ARITH | WANT_ENUM, arg, 1))) if (!(arg = build_expr_type_conversion (WANT_ARITH | WANT_ENUM, arg, true)))
errstring = "wrong type argument to conjugation"; errstring = "wrong type argument to conjugation";
else if (!noconvert) else if (!noconvert)
arg = default_conversion (arg); arg = default_conversion (arg);
...@@ -4052,7 +4052,7 @@ build_unary_op (code, xarg, noconvert) ...@@ -4052,7 +4052,7 @@ build_unary_op (code, xarg, noconvert)
/* Report invalid types. */ /* Report invalid types. */
if (!(arg = build_expr_type_conversion (WANT_ARITH | WANT_POINTER, if (!(arg = build_expr_type_conversion (WANT_ARITH | WANT_POINTER,
arg, 1))) arg, true)))
{ {
if (code == PREINCREMENT_EXPR) if (code == PREINCREMENT_EXPR)
errstring ="no pre-increment operator for type"; errstring ="no pre-increment operator for type";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment