This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: SIZEOF_LONG 4 instead of 8 in 64-bits
Mark Rose-3 wrote:
>
>>
>> I need to use #define __SIZEOF_LONG__ 4 instead of #define
>> __SIZEOF_LONG__
>> 8
>> in amd64 so my program will not double the memory usage how Can i do so?
>> using debian and gcc 4.4.4
>
> Have you tried using the -m32 flag?
>
>
>
ye i did
kraiser@myhost:~/amsn_received$ g++ main.cpp -m32
In file included from /usr/include/features.h:378,
from
/usr/include/c++/4.4/x86_64-linux-gnu/32/bits/os_defines.h:39,
from
/usr/include/c++/4.4/x86_64-linux-gnu/32/bits/c++config.h:243,
from /usr/include/c++/4.4/iostream:39,
from main.cpp:1:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: Nie ma takiego pliku
ani katalogu
Tim Prince-4 wrote:
>
> On 5/18/2010 10:50 AM, Ian Lance Taylor wrote:
>> Kraiser<pietiatibia1@gmail.com> writes:
>>
>>
>>> I need to use #define __SIZEOF_LONG__ 4 instead of #define
>>> __SIZEOF_LONG__ 8
>>> in amd64 so my program will not double the memory usage how Can i do so?
>>> using debian and gcc 4.4.4
>>>
>> No, there is no support for that. Sorry.
>>
>> Perhaps you could compile with -Dlong=int. Wouldn't work if you ever
>> use the long long type, though.
>>
>> Ian
>>
> or correct your program to use int32_t if that is your intention
>
> --
> Tim Prince
>
>
>
well on windows 7 64-bit allocation just works as in 32-bit windows/linux
however not in linux i belive that's because windows 64-bit uses LPP64 and
linux LP64 ...
--
View this message in context: http://old.nabble.com/SIZEOF_LONG-4-instead-of-8-in-64-bits-tp28598575p28599469.html
Sent from the gcc - Help mailing list archive at Nabble.com.