cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/03/23:47:53

From: elric AT wheel DOT dcn DOT davis DOT ca DOT us (Jeffrey Taylor)
Newsgroups: comp.os.msdos.djgpp
Subject: Re:
Date: 3 Dec 1996 17:17:48 GMT
Organization: Davis Community Network - Davis, California, USA
Lines: 23
Message-ID: <581nbs$m2s@mark.ucdavis.edu>
References: <19961128 DOT 160923 DOT 4455 DOT 7 DOT chambersb AT juno DOT com> <329D0008 DOT 4057 AT gbrmpa DOT gov DOT au>
NNTP-Posting-Host: wheel.dcn.davis.ca.us
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Leath Muller (leathm AT gbrmpa DOT gov DOT au) wrote:
: Benjamin D Chambers wrote:
: > 
: > I just wanted to check:
: > What are the bit-sizes of data types in DJGPP?
: > As in, which is 8-bit, 16-bit, and 32-bit types?
: > I thought int was 16-bit, but now I'm not so sure...
: 
: char = 8 bits
: short int = 16 bit (I think, I use asm a lot... :)
: int = 32 bit
: (void *), (char *) etc = 32 bit
: 
: Leathal.

The above is correct but if you are using structures, fields are often
aligned to 4 byte boundaries.  For example, two adjacent shorts may have
two bytes of padding in between them.  If this is the case, see info gcc,
look under C extensions, read the alignment, variables attributes, and
type attributes (I'm using DJGPP 2.01, but I expect it to be the same
under other verions).

Jeff

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019