This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/32016] sizeof(class) always a multiple of 4 on 32 bit machine
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 May 2007 22:53:15 -0000
- Subject: [Bug c++/32016] sizeof(class) always a multiple of 4 on 32 bit machine
- References: <bug-32016-9370@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from pinskia at gcc dot gnu dot org 2007-05-21 23:53 -------
(In reply to comment #5)
> (In reply to comment #3)
>
> > Try:
> > struct a33
> > {
> > struct Char1 a1;
> > struct Char1 a2;
> > };
> > And see what size/offset the structs are at. Again this is an ABI issue
>
> Simply saying it's an ABI issue doesn't make it so. Please explain.
>
> Microsoft GNU
> sizeof(a33) 2 8
> offsetof(a1) 0 0
> offsetof(a2) 1 4
>
> So what's the point? What would you expect?
That shows you exactly that this is an ABI issue, if you cannot believe me,
then I have no clue why you think it is not. As you just showed the offset of
two structs are different between the compilers. Anyways arm-elf has no
defined abi except by deciding what is implementing inside GCC itself.
arm-eabi on the other hand does. So this issue is invalid based on that GCC
defines the ABI for arm-elf (but not arm-eabi).
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32016