------- Comment #7 from drow at gcc dot gnu dot org 2006-07-23 19:55 ------- grokvardecl uses a NULL scope to indicate the current scope, and current_scope never returns NULL. It used to, before revision 89627, but then grokvardecl explicitly tried current_namespace.
This patch instituted the NULL context for globals, presumably: 1998-06-24 Martin v. Löwis <[EMAIL PROTECTED]> Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace. It did so by introducing FROB_CONTEXT. Right now, FROB_CONTEXT is used at a number of places which set DECL_CONTEXT, but not at a number of others (13 with, 55 without). Some of those without obviously don't need it. Others are less clear. But after going through them all, I think only two need it. The obvious patch works for my testcase. I will regression test it more thoroughly. -- drow at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |drow at gcc dot gnu dot org |dot org | Status|NEW |ASSIGNED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28460