This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
sizeof(long)
- From: Jason Foat <jfoat at seasoar2 dot ucsd dot edu>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 2 Jul 2002 18:20:58 -0700
- Subject: sizeof(long)
Hi Folks,
Here's another problem for the collective wisdom of the group:
The follow-code
#include <stdio.h>
int main(int argc, char **argv)
{
printf("int: %d \n",sizeof(int));
printf("long: %d \n",sizeof(long));
}
returns:
int: 4
long: 4
I'm using gcc version 2.96 with linux 7.2 for i686. My questions:
1) Does this seem right? Shouldn't longs have more bytes?
2) Is this a product of some compile option or something?
3) How can I fix this? (I need an int with more oomph!)
Thanks,
Jason Foat
UCSD