typeck2.c (process_init_constructor): Use same_type_p.
* typeck2.c (process_init_constructor): Use same_type_p. Fixes 834Y21a * decl.c (check_tag_decl): Don't warn about null decl inside a class. Fixes _113Y11a From-SVN: r23982
This commit is contained in:
parent
9f3d9e461c
commit
7e2067caa6
@ -1,5 +1,10 @@
|
||||
1998-11-29 Jason Merrill <jason@yorick.cygnus.com>
|
||||
|
||||
* typeck2.c (process_init_constructor): Use same_type_p.
|
||||
|
||||
* decl.c (check_tag_decl): Don't warn about null decl inside a
|
||||
class.
|
||||
|
||||
* pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
|
||||
UNIFY_ALLOW_NONE.
|
||||
(convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
|
||||
|
@ -6462,7 +6462,6 @@ check_tag_decl (declspecs)
|
||||
tree declspecs;
|
||||
{
|
||||
int found_type = 0;
|
||||
int friendp = 0;
|
||||
tree ob_modifier = NULL_TREE;
|
||||
register tree link;
|
||||
register tree t = NULL_TREE;
|
||||
@ -6486,8 +6485,6 @@ check_tag_decl (declspecs)
|
||||
if (current_class_type == NULL_TREE
|
||||
|| current_scope () != current_class_type)
|
||||
ob_modifier = value;
|
||||
else
|
||||
friendp = 1;
|
||||
}
|
||||
else if (value == ridpointers[(int) RID_STATIC]
|
||||
|| value == ridpointers[(int) RID_EXTERN]
|
||||
@ -6503,13 +6500,12 @@ check_tag_decl (declspecs)
|
||||
|
||||
if (found_type > 1)
|
||||
error ("multiple types in one declaration");
|
||||
|
||||
if (t == NULL_TREE)
|
||||
{
|
||||
if (! friendp)
|
||||
pedwarn ("declaration does not declare anything");
|
||||
}
|
||||
else if (ANON_UNION_TYPE_P (t))
|
||||
|
||||
/* Inside a class, we might be in a friend or access declaration.
|
||||
Until we have a good way of detecting the latter, don't warn. */
|
||||
if (t == NULL_TREE && ! current_class_type)
|
||||
pedwarn ("declaration does not declare anything");
|
||||
else if (t && ANON_UNION_TYPE_P (t))
|
||||
/* Anonymous unions are objects, so they can have specifiers. */;
|
||||
else if (ob_modifier)
|
||||
{
|
||||
|
@ -925,9 +925,10 @@ process_init_constructor (type, init, elts)
|
||||
tree tail1 = tail;
|
||||
next1 = digest_init (TREE_TYPE (type),
|
||||
TREE_VALUE (tail), &tail1);
|
||||
my_friendly_assert (TYPE_MAIN_VARIANT (TREE_TYPE (type))
|
||||
== TYPE_MAIN_VARIANT (TREE_TYPE (next1)),
|
||||
981123);
|
||||
my_friendly_assert
|
||||
(same_type_p (TYPE_MAIN_VARIANT (TREE_TYPE (type)),
|
||||
TYPE_MAIN_VARIANT (TREE_TYPE (next1))),
|
||||
981123);
|
||||
my_friendly_assert (tail1 == 0
|
||||
|| TREE_CODE (tail1) == TREE_LIST, 319);
|
||||
if (tail == tail1 && len < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user