+2007-07-06 Richard Guenther <rguenther@suse.de>
+
+ * c-common.c (boolean_increment): Use correctly typed
+ constant.
+
2007-07-06 Richard Sandiford <richard@codesourcery.com>
* config/mips/mips.c (mips16e_save_restore_pattern_p): Check that
boolean_increment (enum tree_code code, tree arg)
{
tree val;
- tree true_res = boolean_true_node;
+ tree true_res = build_int_cst (TREE_TYPE (arg), 1);
arg = stabilize_reference (arg);
switch (code)
+2007-07-06 Richard Guenther <rguenther@suse.de>
+
+ * init.c (build_new_1): Use the correct pointer type.
+ * typeck2.c (build_m_component_ref): Likewise.
+
2007-07-05 Mark Mitchell <mark@codesourcery.com>
PR c++/32245
{
tree cookie;
tree cookie_ptr;
+ tree size_ptr_type;
/* Adjust so we're pointing to the start of the object. */
data_addr = get_target_expr (build2 (POINTER_PLUS_EXPR, full_pointer_type,
many elements to destroy later. We use the last sizeof
(size_t) bytes to store the number of elements. */
cookie_ptr = fold_build1 (NEGATE_EXPR, sizetype, size_in_bytes (sizetype));
- cookie_ptr = build2 (POINTER_PLUS_EXPR, build_pointer_type (sizetype),
- data_addr, cookie_ptr);
+ size_ptr_type = build_pointer_type (sizetype);
+ cookie_ptr = build2 (POINTER_PLUS_EXPR, size_ptr_type,
+ fold_convert (size_ptr_type, data_addr), cookie_ptr);
cookie = build_indirect_ref (cookie_ptr, NULL);
cookie_expr = build2 (MODIFY_EXPR, sizetype, cookie, nelts);
if (TYPE_PTRMEM_P (ptrmem_type))
{
+ tree ptype;
+
/* Compute the type of the field, as described in [expr.ref].
There's no such thing as a mutable pointer-to-member, so
things are not as complex as they are for references to
/* Build an expression for "object + offset" where offset is the
value stored in the pointer-to-data-member. */
- datum = build2 (POINTER_PLUS_EXPR, build_pointer_type (type),
- datum, build_nop (sizetype, component));
+ ptype = build_pointer_type (type);
+ datum = build2 (POINTER_PLUS_EXPR, ptype,
+ fold_convert (ptype, datum),
+ build_nop (sizetype, component));
return build_indirect_ref (datum, 0);
}
else