using directives crash
Martin v. Loewis
loewis@informatik.hu-berlin.de
Wed Jun 3 10:32:00 GMT 1998
> (just add the use of TYPE_DECL) it appears to do the trick. But I may be
> missing something else. ;)
This seems to work just fine, so it should be included. When (if) the
parser gets rewritten, maybe the interface of what is passed to
do_*_using_decl can be streamlined.
Martin
1998-06-03 Martin v. Löwis <loewis@informatik.hu-berlin.de>
Suggested by Brendan Kehoe
* decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
treat it as using ::decl.
Index: decl2.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/decl2.c,v
retrieving revision 1.80
diff -c -p -r1.80 decl2.c
*** decl2.c 1998/06/01 18:25:32 1.80
--- decl2.c 1998/06/03 17:19:33
*************** do_toplevel_using_decl (decl)
*** 4386,4392 ****
scope = TREE_OPERAND (decl, 0);
name = TREE_OPERAND (decl, 1);
}
! else if (TREE_CODE (decl) == IDENTIFIER_NODE)
{
scope = global_namespace;
name = decl;
--- 4399,4406 ----
scope = TREE_OPERAND (decl, 0);
name = TREE_OPERAND (decl, 1);
}
! else if (TREE_CODE (decl) == IDENTIFIER_NODE
! || TREE_CODE (decl) == TYPE_DECL)
{
scope = global_namespace;
name = decl;
More information about the Gcc-patches
mailing list