silly. So instead, we just do the equivalent of a call to fatal in the
same situation (call exit). */
-/* First used: 0 (reserved), Last used: 366. Free: */
+/* First used: 0 (reserved), Last used: 367. Free: */
static int abortcount = 0;
}
}
+ if (TYPE_PTRMEMFUNC_P (type) && TREE_CODE (init) == CONSTRUCTOR
+ && TREE_TYPE (init) == NULL_TREE)
+ cp_pedwarn ("initializer list for `%T'", type);
+
/* End of special C++ code. */
/* Digest the specified initializer into an expression. */
}
init = element;
}
- while (TREE_CODE (init) == CONSTRUCTOR)
+ while (TREE_CODE (init) == CONSTRUCTOR
+ && ! (TREE_TYPE (init)
+ && TYPE_PTRMEMFUNC_P (TREE_TYPE (init))))
{
cp_pedwarn ("braces around scalar initializer for `%T'", type);
init = CONSTRUCTOR_ELTS (init);
*tail = old_tail_contents;
return process_init_constructor (type, 0, tail);
}
- else if (flag_traditional)
- /* Traditionally one can say `char x[100] = 0;'. */
- return process_init_constructor (type,
- build_nt (CONSTRUCTOR, NULL_TREE,
- tree_cons (NULL_TREE, init, NULL_TREE)),
- (tree*)0);
+
if (code != ARRAY_TYPE)
return convert_for_initialization (NULL_TREE, type, init, LOOKUP_NORMAL,
"initialization", NULL_TREE, 0);
sorry ("initializer list for object using virtual functions");
return error_mark_node;
}
-
- if (TYPE_PTRMEMFUNC_P (type))
- cp_pedwarn ("initializer list for `%T'", type);
}
for (field = TYPE_FIELDS (type); field && tail;
/* Find the first named field. ANSI decided in September 1990
that only named fields count here. */
- while (field && DECL_NAME (field) == 0)
+ while (field && (DECL_NAME (field) == 0
+ || TREE_CODE (field) != FIELD_DECL))
field = TREE_CHAIN (field);
/* If this element specifies a field, initialize via that field. */
if (type == error_mark_node)
return error_mark_node;
- if (current_template_parms)
+ if (processing_template_decl)
return build_min_nt (ARROW_EXPR, rval);
if (TREE_CODE (rval) == OFFSET_REF)
tree rettype;
tree binfo;
- if (current_template_parms)
+ if (processing_template_decl)
return build_min_nt (DOTSTAR_EXPR, datum, component);
if (TYPE_PTRMEMFUNC_P (TREE_TYPE (component)))
else
type = exp;
- if (current_template_parms)
+ if (processing_template_decl)
return build_min (CAST_EXPR, type, parms);
if (IS_SIGNATURE (type))