Commit 013bc8af by Mike Stump

91th Cygnus<->FSF quick merge

From-SVN: r14145
parent 6313a654
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> Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
* except.c (expand_exception_blocks): Simplify and fix and make * except.c (expand_exception_blocks): Simplify and fix and make
......
...@@ -10836,7 +10836,10 @@ build_enumerator (name, value) ...@@ -10836,7 +10836,10 @@ build_enumerator (name, value)
/* We have to always copy here; not all INTEGER_CSTs are unshared, /* We have to always copy here; not all INTEGER_CSTs are unshared,
and there's no wedding ring. Look at size_int()...*/ and there's no wedding ring. Look at size_int()...*/
value = copy_node (value); value = copy_node (value);
#if 0
/* To fix MAX_VAL enum consts. (bkoz) */
TREE_TYPE (value) = integer_type_node; TREE_TYPE (value) = integer_type_node;
#endif
} }
/* C++ associates enums with global, function, or class declarations. */ /* C++ associates enums with global, function, or class declarations. */
......
...@@ -487,18 +487,6 @@ FIELD_DECLs ...@@ -487,18 +487,6 @@ FIELD_DECLs
@end display @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 @item DECL_NAME
Has values of: Has values of:
......
...@@ -3449,7 +3449,31 @@ push_class_decls (type) ...@@ -3449,7 +3449,31 @@ push_class_decls (type)
{ {
tree node = TREE_VALUE (new); 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); node = TREE_VALUE (node);
id = DECL_NAME (node); id = DECL_NAME (node);
} }
......
...@@ -1865,7 +1865,8 @@ build_component_ref (datum, component, basetype_path, protect) ...@@ -1865,7 +1865,8 @@ build_component_ref (datum, component, basetype_path, protect)
fndecl = build_vfn_ref (&addr, datum, DECL_VINDEX (fndecl)); fndecl = build_vfn_ref (&addr, datum, DECL_VINDEX (fndecl));
TREE_TYPE (fndecl) = build_pointer_type (fntype); TREE_TYPE (fndecl) = build_pointer_type (fntype);
} }
mark_used (fndecl); else
mark_used (fndecl);
return build (OFFSET_REF, TREE_TYPE (fndecl), datum, fndecl); return build (OFFSET_REF, TREE_TYPE (fndecl), datum, fndecl);
} }
if (access == access_protected_node) if (access == access_protected_node)
...@@ -5501,8 +5502,8 @@ build_c_cast (type, expr) ...@@ -5501,8 +5502,8 @@ build_c_cast (type, expr)
|| (TREE_CODE (TREE_TYPE (value)) == METHOD_TYPE || (TREE_CODE (TREE_TYPE (value)) == METHOD_TYPE
/* Don't do the default conversion if we want a /* Don't do the default conversion if we want a
pointer to a function. */ pointer to a function. */
&& TREE_CODE (type) != POINTER_TYPE && ! (TREE_CODE (type) == POINTER_TYPE
&& TREE_CODE (TREE_TYPE (type)) != FUNCTION_TYPE) && TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE))
|| TREE_CODE (TREE_TYPE (value)) == ARRAY_TYPE || TREE_CODE (TREE_TYPE (value)) == ARRAY_TYPE
|| TREE_CODE (TREE_TYPE (value)) == REFERENCE_TYPE) || TREE_CODE (TREE_TYPE (value)) == REFERENCE_TYPE)
value = default_conversion (value); value = default_conversion (value);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment