This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Size of C/C++ data type from GNU GCC/g++ compiled ELF 64-bit LSB executable, AMD x86-64 vs. ELF 32-bit LSB executable, Intel 80386
- From: tom peng <tompeng at microsoft dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 18 Jun 2007 14:08:10 -0700 (PDT)
- Subject: Size of C/C++ data type from GNU GCC/g++ compiled ELF 64-bit LSB executable, AMD x86-64 vs. ELF 32-bit LSB executable, Intel 80386
Hi,
I posted this message on gcc/bug forum earlier. I repost the same contents
here. I need experts to shed light on C/C++ data type size inconsistencies
when running 64-bit and 32-bit ELF executables compiled by GNU/GCC g++/gcc
Following are results of C/C++ data type size from code " cout << "data
type" << sizeof(data type) << endl " :
| 32-bit | 64-bit
-------------------------------
int | 4 | 4
-------------------------------
long int | 4 | 8
-------------------------------
signed long int | 4 | 4
-------------------------------
ulong | 4 | 8 (sys/types.h)
-------------------------------
long double | 12 | 16
Thank in advance,
Tom
--
View this message in context: http://www.nabble.com/Size-of-C-C%2B%2B-data-type-from-GNU-GCC-g%2B%2B-compiled-ELF-64-bit-LSB-executable%2C-AMD-x86-64-vs.-ELF-32-bit-LSB-executable%2C-Intel-80386-tf3942845.html#a11184115
Sent from the gcc - Help mailing list archive at Nabble.com.