Commit fc429748 by Mark Mitchell Committed by Mark Mitchell

re PR c++/28048 (ICE on accessing member of dependent name)

	PR c++/28048
	* semantics.c (check_accessibility_of_qualified_id): Robustify.
	PR c++/28048
	* g++.dg/template/defarg9.C: New test.

From-SVN: r115579
parent cb2eb96f
2006-07-18 Mark Mitchell <mark@codesourcery.com>
PR c++/28048
* semantics.c (check_accessibility_of_qualified_id): Robustify.
PR c++/28235
* pt.c (tsubst_decl): Handling substitutions into a static data
member from within the scope of the tempalte itself.
......
......@@ -1506,9 +1506,11 @@ check_accessibility_of_qualified_id (tree decl,
its bases. */
qualifying_type = currently_open_derived_class (scope);
if (qualifying_type && IS_AGGR_TYPE_CODE (TREE_CODE (qualifying_type)))
/* It is possible for qualifying type to be a TEMPLATE_TYPE_PARM
or similar in a default argument value. */
if (qualifying_type
/* It is possible for qualifying type to be a TEMPLATE_TYPE_PARM
or similar in a default argument value. */
&& CLASS_TYPE_P (qualifying_type)
&& !dependent_type_p (qualifying_type))
perform_or_defer_access_check (TYPE_BINFO (qualifying_type), decl);
}
......
2006-07-18 Mark Mitchell <mark@codesourcery.com>
PR c++/28048
* g++.dg/template/defarg9.C: New test.
PR c++/28235
* g++.dg/template/static27.C: New test.
// PR c++/28048
template<typename T> struct Boom;
template<typename T, bool D = Boom<T>::Internal::Value> // <--ICE
struct Foo
{
};
template<typename T> struct Boom
{
struct Internal
{
static const bool Value = false;
};
};
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