newbie question about integers size/portabilty.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,
	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


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux