This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: G++: division by zero in store_split_bit_field
- To: Philip Blundell <Philip dot Blundell at pobox dot com>
- Subject: Re: G++: division by zero in store_split_bit_field
- From: Jason Merrill <jason at cygnus dot com>
- Date: 31 Jan 2000 13:26:55 -0800
- Cc: Nick Clifton <nickc at cygnus dot com>, gcc at gcc dot gnu dot org
- References: <200001131921.LAA27177@elmo.cygnus.com>
> 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