diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2001-05-16 09:34:24 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2001-05-16 09:34:24 +0000 |
commit | 3f0a9b3563fa102e975854ecdd17980550c9cd22 (patch) | |
tree | 3763ba89d727eec4a2a351db78494d45942e5b90 /gcc/cp/init.c | |
parent | f94557fb739bf07401ac6a1ab09e49879e945ecb (diff) | |
download | gcc-3f0a9b3563fa102e975854ecdd17980550c9cd22.tar.gz |
init.c (member_init_ok_or_else): Take a tree rather than string for name.
cp:
* init.c (member_init_ok_or_else): Take a tree rather than
string for name.
(expand_member_init): Adjust.
testsuite:
* g++.pt/inherit2.C: Remove XFAIL.
* g++.pt/crash66.C: New test.
From-SVN: r42142
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r-- | gcc/cp/init.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 589f7af05c0..1ac6f739de8 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -42,7 +42,7 @@ static tree build_vec_delete_1 PARAMS ((tree, tree, tree, special_function_kind, static void perform_member_init PARAMS ((tree, tree, int)); static void sort_base_init PARAMS ((tree, tree, tree *, tree *)); static tree build_builtin_delete_call PARAMS ((tree)); -static int member_init_ok_or_else PARAMS ((tree, tree, const char *)); +static int member_init_ok_or_else PARAMS ((tree, tree, tree)); static void expand_virtual_init PARAMS ((tree, tree)); static tree sort_member_init PARAMS ((tree, tree)); static tree initializing_context PARAMS ((tree)); @@ -1043,19 +1043,19 @@ static int member_init_ok_or_else (field, type, member_name) tree field; tree type; - const char *member_name; + tree member_name; { if (field == error_mark_node) return 0; if (field == NULL_TREE || initializing_context (field) != type) { - cp_error ("class `%T' does not have any field named `%s'", type, + cp_error ("class `%T' does not have any field named `%D'", type, member_name); return 0; } if (TREE_STATIC (field)) { - cp_error ("field `%#D' is static; only point of initialization is its declaration", + cp_error ("field `%#D' is static; the only point of initialization is its definition", field); return 0; } @@ -1162,7 +1162,7 @@ expand_member_init (exp, name, init) try_member: field = lookup_field (type, name, 1, 0); - if (! member_init_ok_or_else (field, type, IDENTIFIER_POINTER (name))) + if (! member_init_ok_or_else (field, type, name)) return NULL_TREE; init = build_tree_list (field, init); |