Commit b77ead33 by Jason Merrill Committed by Jason Merrill

* decl.c (make_typename_type): Use currently_open_class.

From-SVN: r19832
parent e5966228
Mon May 18 03:00:57 1998 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (make_typename_type): Use currently_open_class.
* class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
Mon May 18 01:43:01 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
......
......@@ -4619,7 +4619,7 @@ make_typename_type (context, name)
my_friendly_abort (2000);
if (! uses_template_parms (context)
|| context == current_class_type)
|| currently_open_class (context))
{
if (TREE_CODE (fullname) == TEMPLATE_ID_EXPR)
{
......@@ -4797,7 +4797,10 @@ lookup_name_real (name, prefer_type, nonclass)
locval = classval = NULL_TREE;
if (!current_binding_level->namespace_p
&& IDENTIFIER_LOCAL_VALUE (name))
&& IDENTIFIER_LOCAL_VALUE (name)
/* Kludge to avoid infinite recursion with identifier_type_value. */
&& (prefer_type <= 0
|| TREE_CODE (IDENTIFIER_LOCAL_VALUE (name)) == TYPE_DECL))
locval = IDENTIFIER_LOCAL_VALUE (name);
/* In C++ class fields are between local and global scope,
......@@ -4908,7 +4911,7 @@ lookup_name_real (name, prefer_type, nonclass)
|| TREE_CODE (val) == TYPE_DECL || prefer_type <= 0)
;
/* Caller wants a class-or-namespace-name. */
else if(prefer_type == 1 && TREE_CODE (val) == NAMESPACE_DECL)
else if (prefer_type == 1 && TREE_CODE (val) == NAMESPACE_DECL)
;
else if (IDENTIFIER_HAS_TYPE_VALUE (name))
val = TYPE_MAIN_DECL (IDENTIFIER_TYPE_VALUE (name));
......
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