Commit d0af00af by Kriang Lerdsuwanakij Committed by Kriang Lerdsuwanakij

re PR c++/10554 (ICE with illegal using declaration)

	PR c++/10554
	* decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
	is not NULL.

	* g++.dg/lookup/using5.C: New test.

From-SVN: r66329
parent 85209a3c
2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/10554
* decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
is not NULL.
2003-05-01 Steven Bosscher <steven@gcc.gnu.org>
* cp-tree.h (struct lang_id2): Remove. Move fields from here...
......
......@@ -4458,6 +4458,7 @@ do_class_using_decl (tree decl)
tree name, value;
if (TREE_CODE (decl) != SCOPE_REF
|| !TREE_OPERAND (decl, 0)
|| !TYPE_P (TREE_OPERAND (decl, 0)))
{
error ("using-declaration for non-member at class scope");
......
2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/10554
* g++.dg/lookup/using5.C: New test.
2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/8772
* g++.dg/template/ttp5.C: New test.
......
// { dg-do compile }
// Origin: Volker Reichelt <reichelt@igpm.rwth-aachen.de>
// PR c++/10554: ICE for member using declaration with failed
// scope name lookup.
template <typename> struct A
{
typedef A X;
void foo();
};
template <typename T> struct B : A<T>
{
using X::foo; { dg-error "not a class-name|expected|non-member" }
};
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