Bizaare non-constant class sizes.
Nathan Sidwell
nathan@codesourcery.com
Fri May 12 01:56:00 GMT 2000
Andrew Over wrote:
>
> Now, if I print sizeof(class c) in one file, I get 12. If I do it in
> a different file, I get 8 (clearly too small). foo = new c() in this
> file results in a segfault. Obviously the value should be constant
> across every file that includes this definition.
When I've found such weirdness it's been because NFS timestamps across
machines with unsynchronized clocks. That confused make sufficiently that it
did not rebuild one of the object files.
You need to generate the two .ii files, and then progressively strip
them down to find what's causing gcc to get different sizes. Like Martin,
I recon it's something in your sources that's doing this, not a bug in gcc.
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
More information about the Gcc-bugs
mailing list