91th Cygnus<->FSF quick merge

From-SVN: r14145
This commit is contained in:
Mike Stump 1997-06-04 17:31:55 +00:00
parent 6313a654f7
commit 013bc8afa0
5 changed files with 54 additions and 16 deletions

View File

@ -1,3 +1,25 @@
Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
* search.c (push_class_decls): A name which ambiguously refers to
several instantiations of the same template just refers to the
template.
Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
* decl.c (build_enumerator): fix problem with unsigned long
enumerated values being smashed to ints, causing overflow
when computing next enumerated value. (for enum values around
MAX_VAL).
Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
* typeck.c (build_component_ref): Only call mark_used on a decl.
Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
* typeck.c (build_c_cast): Make the check for a ptr to function
more specific before possible default_conversion call.
Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
* except.c (expand_exception_blocks): Simplify and fix and make

View File

@ -10836,7 +10836,10 @@ build_enumerator (name, value)
/* We have to always copy here; not all INTEGER_CSTs are unshared,
and there's no wedding ring. Look at size_int()...*/
value = copy_node (value);
#if 0
/* To fix MAX_VAL enum consts. (bkoz) */
TREE_TYPE (value) = integer_type_node;
#endif
}
/* C++ associates enums with global, function, or class declarations. */

View File

@ -487,18 +487,6 @@ FIELD_DECLs
@end display
@item DECL_NESTED_TYPENAME
Holds the fully qualified type name. Example, Base::Derived.
Has values of:
IDENTIFIER_NODEs
What things can this be used on:
TYPE_DECLs
@item DECL_NAME
Has values of:

View File

@ -3449,7 +3449,31 @@ push_class_decls (type)
{
tree node = TREE_VALUE (new);
while (TREE_CODE (node) == TREE_LIST)
if (TREE_CODE (node) == TYPE_DECL
&& DECL_ARTIFICIAL (node)
&& IS_AGGR_TYPE (TREE_TYPE (node))
&& CLASSTYPE_TEMPLATE_INFO (TREE_TYPE (node)))
{
tree t = CLASSTYPE_TI_TEMPLATE (TREE_TYPE (node));
tree n = new;
for (; n; n = TREE_CHAIN (n))
{
tree d = TREE_VALUE (n);
if (TREE_CODE (d) == TYPE_DECL
&& DECL_ARTIFICIAL (node)
&& IS_AGGR_TYPE (TREE_TYPE (d))
&& CLASSTYPE_TEMPLATE_INFO (TREE_TYPE (d))
&& CLASSTYPE_TI_TEMPLATE (TREE_TYPE (d)) == t)
/* OK */;
else
break;
}
if (n == NULL_TREE)
new = t;
}
else while (TREE_CODE (node) == TREE_LIST)
node = TREE_VALUE (node);
id = DECL_NAME (node);
}

View File

@ -1865,7 +1865,8 @@ build_component_ref (datum, component, basetype_path, protect)
fndecl = build_vfn_ref (&addr, datum, DECL_VINDEX (fndecl));
TREE_TYPE (fndecl) = build_pointer_type (fntype);
}
mark_used (fndecl);
else
mark_used (fndecl);
return build (OFFSET_REF, TREE_TYPE (fndecl), datum, fndecl);
}
if (access == access_protected_node)
@ -5501,8 +5502,8 @@ build_c_cast (type, expr)
|| (TREE_CODE (TREE_TYPE (value)) == METHOD_TYPE
/* Don't do the default conversion if we want a
pointer to a function. */
&& TREE_CODE (type) != POINTER_TYPE
&& TREE_CODE (TREE_TYPE (type)) != FUNCTION_TYPE)
&& ! (TREE_CODE (type) == POINTER_TYPE
&& TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE))
|| TREE_CODE (TREE_TYPE (value)) == ARRAY_TYPE
|| TREE_CODE (TREE_TYPE (value)) == REFERENCE_TYPE)
value = default_conversion (value);