linux-assembly.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* newbie question about integers size/portabilty.
@ 2004-12-28 12:29 Ribamar Santarosa de Sousa
  2004-12-28 13:35 ` Richard Cooper
  0 siblings, 1 reply; 10+ messages in thread
From: Ribamar Santarosa de Sousa @ 2004-12-28 12:29 UTC (permalink / raw)
  To: linux-assembly


Hi all,
	(about this question is about C programming, i think the
	"assemblers-guys" are most likely to answers quickly than not so
	advanced c programmers.... :)
	in the c style guide:
	http://www.psgd.org/paul/docs/cstyle/cstyle16.htm
	we can found a table (shown bellow) for integer data sizes. 
	there we can se that some architecture have more than one possible 
	value for the same size, depending on -- i guess -- the compiler.
	Does anyone know where i can get a accurate table for gcc compiler?

	
	Can those values change from a processor in the x86 to another with
	fixed-size word (e.g. 486 -> 586)? (The document provides a "safe
	minimal size" table, but note, as i am mixing several integer types
	to pass to a hardware data structure, this is not enough, i need
	exact values). 
	
TIA, Riba.

     type     pdp11  VAX/11   68000  Cray-2  Unisys  Harris      80386
	           series          family            1100    H800
	_________________________________________________________________
	char         8       8       8       8       9       8          8
	short       16      16    8/16  64(32)      18      24       8/16
	int         16      32   16/32  64(32)      36      24      16/32
	long        32      32      32      64      36      48         32
	char*       16      32      32      64      72      24   16/32/48
	int*        16      32      32  64(24)      72      24   16/32/48
	int(*)()    16      32      32      64     576      24   16/32/48


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2004-12-30  9:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-28 12:29 newbie question about integers size/portabilty Ribamar Santarosa de Sousa
2004-12-28 13:35 ` Richard Cooper
2004-12-28 15:20   ` Ribamar Santarosa de Sousa
2004-12-30  9:10     ` Frederic Marmond
2004-12-28 22:38   ` Brian Raiter
2004-12-28 23:52     ` Ribamar Santarosa de Sousa
2004-12-29  0:17       ` Brian Raiter
2004-12-29  1:05         ` Ribamar Santarosa de Sousa
2004-12-29  1:31           ` Herbert Poetzl
2004-12-29  7:21     ` OT: " Richard Cooper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).