This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug pending/17250] struct size
- From: "falk at debian dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Aug 2004 13:00:10 -0000
- Subject: [Bug pending/17250] struct size
- References: <20040831125324.17250.david@xhell.goo>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From falk at debian dot org 2004-08-31 13:00 -------
(In reply to comment #0)
> typedef struct tagBITMAPFILEHEADER {
> unsigned short bfType;
> unsigned long bfSize;
> unsigned short bfReserved1;
> unsigned short bfReserved2;
> unsigned long bfOffBits;
> } BITMAPFILEHEADER;
>
> When I try to find the size of the structure above using sizeof I get 16 but
it supposed to be 14.
No, it's not; there are two padding bytes before bfSize to ensure it is 4-byte
aligned.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
Summary| |struct size
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17250