This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

[Bug pending/17250] struct size


------- 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


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