mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-19 09:39:03 +08:00
error.c (dump_decl): operator new, not operatornew.
* error.c (dump_decl): operator new, not operatornew. * class.c (field_decl_cmp): A nontype is "greater" than a type. * search.c (lookup_field_1): Look for the last field with the desired name. From-SVN: r31262
This commit is contained in:
parent
ee07f4f4b1
commit
bff3ce71a1
@ -1,3 +1,11 @@
|
|||||||
|
2000-01-06 Jason Merrill <jason@casey.cygnus.com>
|
||||||
|
|
||||||
|
* error.c (dump_decl): operator new, not operatornew.
|
||||||
|
|
||||||
|
* class.c (field_decl_cmp): A nontype is "greater" than a type.
|
||||||
|
* search.c (lookup_field_1): Look for the last field with the
|
||||||
|
desired name.
|
||||||
|
|
||||||
2000-01-05 Nathan Sidwell <nathan@acm.org>
|
2000-01-05 Nathan Sidwell <nathan@acm.org>
|
||||||
|
|
||||||
* decl2.c (lookup_arg_dependent): Deal with FNS not being a
|
* decl2.c (lookup_arg_dependent): Deal with FNS not being a
|
||||||
@ -323,7 +331,8 @@
|
|||||||
(avoid_overlap): Moved here from tree.c.
|
(avoid_overlap): Moved here from tree.c.
|
||||||
(build_base_fields): Likewise.
|
(build_base_fields): Likewise.
|
||||||
(check_bases): New function, split out from finish_base_struct.
|
(check_bases): New function, split out from finish_base_struct.
|
||||||
(check_bases_and_members): New function, split out from finish_struct_1.
|
(check_bases_and_members): New function, split out from
|
||||||
|
finish_struct_1.
|
||||||
(struct base_info): Remove cant_have_default_ctor,
|
(struct base_info): Remove cant_have_default_ctor,
|
||||||
cant_have_const_ctor, cant_have_asn_ref.
|
cant_have_const_ctor, cant_have_asn_ref.
|
||||||
(finish_base_struct): Split semantic analysis into check_bases.
|
(finish_base_struct): Split semantic analysis into check_bases.
|
||||||
|
@ -1946,7 +1946,8 @@ field_decl_cmp (x, y)
|
|||||||
const tree *x, *y;
|
const tree *x, *y;
|
||||||
{
|
{
|
||||||
if (DECL_NAME (*x) == DECL_NAME (*y))
|
if (DECL_NAME (*x) == DECL_NAME (*y))
|
||||||
return 0;
|
/* A nontype is "greater" than a type. */
|
||||||
|
return DECL_DECLARES_TYPE_P (*y) - DECL_DECLARES_TYPE_P (*x);
|
||||||
if (DECL_NAME (*x) == NULL_TREE)
|
if (DECL_NAME (*x) == NULL_TREE)
|
||||||
return -1;
|
return -1;
|
||||||
if (DECL_NAME (*y) == NULL_TREE)
|
if (DECL_NAME (*y) == NULL_TREE)
|
||||||
|
@ -951,6 +951,8 @@ dump_decl (t, flags)
|
|||||||
{
|
{
|
||||||
const char *name_string = operator_name_string (t);
|
const char *name_string = operator_name_string (t);
|
||||||
OB_PUTS ("operator");
|
OB_PUTS ("operator");
|
||||||
|
if (ISALPHA (name_string[0]))
|
||||||
|
OB_PUTC (' ');
|
||||||
OB_PUTCP (name_string);
|
OB_PUTCP (name_string);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1282,6 +1284,8 @@ dump_function_name (t, flags)
|
|||||||
{
|
{
|
||||||
const char *name_string = operator_name_string (name);
|
const char *name_string = operator_name_string (name);
|
||||||
OB_PUTS ("operator");
|
OB_PUTS ("operator");
|
||||||
|
if (ISALPHA (name_string[0]))
|
||||||
|
OB_PUTC (' ');
|
||||||
OB_PUTCP (name_string);
|
OB_PUTCP (name_string);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -611,7 +611,16 @@ lookup_field_1 (type, name)
|
|||||||
else if (DECL_NAME (fields[i]) < name)
|
else if (DECL_NAME (fields[i]) < name)
|
||||||
lo = i + 1;
|
lo = i + 1;
|
||||||
else
|
else
|
||||||
return fields[i];
|
{
|
||||||
|
/* We might have a nested class and a field with the
|
||||||
|
same name; we sorted them appropriately via
|
||||||
|
field_decl_cmp, so just look for the last field with
|
||||||
|
this name. */
|
||||||
|
while (i + 1 < hi
|
||||||
|
&& DECL_NAME (fields[i+1]) == name)
|
||||||
|
++i;
|
||||||
|
return fields[i];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return NULL_TREE;
|
return NULL_TREE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user