This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/28460] [4.0/4.1/4.2 Regression] g++ emits bogus namespace DIE



------- 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  <loewis@informatik.hu-berlin.de>

        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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]