+2007-03-22 Jim Wilson <wilson@specifix.com>
+ Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/31273
+ * call.c (standard_conversion): Use type_decays_to. Keep FCODE
+ consistent with FROM.
+
2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
* error.c (dump_expr): Handle dependent names that designate types.
tcode = TREE_CODE (to);
conv = build_identity_conv (from, expr);
- if (fcode == FUNCTION_TYPE)
+ if (fcode == FUNCTION_TYPE || fcode == ARRAY_TYPE)
{
- from = build_pointer_type (from);
- fcode = TREE_CODE (from);
- conv = build_conv (ck_lvalue, from, conv);
- }
- else if (fcode == ARRAY_TYPE)
- {
- from = build_pointer_type (TREE_TYPE (from));
+ from = type_decays_to (from);
fcode = TREE_CODE (from);
conv = build_conv (ck_lvalue, from, conv);
}
tree bitfield_type;
bitfield_type = is_bitfield_expr_with_lowered_type (expr);
if (bitfield_type)
- from = strip_top_quals (bitfield_type);
+ {
+ from = strip_top_quals (bitfield_type);
+ fcode = TREE_CODE (from);
+ }
}
conv = build_conv (ck_rvalue, from, conv);
}