public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: G++: division by zero in store_split_bit_field
       [not found] <200001131921.LAA27177@elmo.cygnus.com>
@ 2000-01-31 13:27 ` Jason Merrill
  0 siblings, 0 replies; only message in thread
From: Jason Merrill @ 2000-01-31 13:27 UTC (permalink / raw)
  To: Philip Blundell; +Cc: Nick Clifton, gcc

> http://gcc.gnu.org/ml/gcc-bugs/2000-01/msg00006.html

This happens because we have code like

  extern struct A a;

  struct A { int i; };

and we aren't fixing up 'a' after we've seen the definition of 'A'.
Supposedly hack_incomplete_structures is supposed to be doing that, but
it's broken.  And it can't work in general, anyway; it only looks at the
current binding level, which is OK for C, but in C++ you could have

  struct A;

  namespace B {
    extern A a;
  }

  struct A { int i; };

so we would need to munge through all the namespaces, too.  I think a
list of all namespace-scope incomplete decls is in order.

Jason

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-01-31 13:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200001131921.LAA27177@elmo.cygnus.com>
2000-01-31 13:27 ` G++: division by zero in store_split_bit_field Jason Merrill

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).