Compiling for 64-bit, but I get 32-bit datatypes?

I am trying to get my compiler to compile 64-bit code, but when I do a simple compilation of "cout << sizeof(<datatypes>)" with

g++ -Wall -m64 -o test test.cpp
I get this:
1
2
3
4
5
6
7
8
9
char       :1
bool       :1
short int  :2
wchar_t    :4
int        :4
float      :4
double     :8
long int   :8
long double:16


Isn't int supposed to be 8 bytes on a 64-bit system?
Many compilers make int 4 bytes in 64 bit mode.
Well I suppose that answers it, I thought I was doing something wrong, but apparently not. Thanks.
...
The C language is one of the most widespread languages and it is sensitive to the change of the digit capacity of data types. Because of its low-level features, it is necessary to constantly control the correctness of the program ported to a new system in this language. It is natural that with the appearance of 64-bit systems the developers all around the world faced the problems of providing compatibility of the old source code with the new systems again. One of the indirect evidences of the difficulty of program migration is a big number of data models which must be constantly taken into consideration. Data model is a correlation of the size of base types in a programming language. Picture 1 shows the digit capacity of types in different data models, which we will refer to further on.

See Picture 1. Data Models: http://www.viva64.com/en/a/0010/
...
Topic archived. No new replies allowed.