This is the mail archive of the gcc@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]

Re: G++: division by zero in store_split_bit_field


> 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

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