This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: -m32 and int128
- From: Paolo Bolzoni <paolo dot bolzoni dot brown at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 1 Jan 2014 16:00:35 +0100
- Subject: Re: -m32 and int128
- Authentication-results: sourceware.org; auth=none
- References: <CAO4LoOxjveu80FfRGg7JmN0XFk9DDX3Wm45E5c94H=2bV6TeKA at mail dot gmail dot com> <alpine dot DEB dot 2 dot 10 dot 1401011431280 dot 3653 at laptop-mg dot saclay dot inria dot fr>
Dear Marc Glisse,
thanks a lot! Your comment pointed me to the right direction,
in my distro is a different package for "64bit only" and "multilib"
gcc and I had installed the former.
On Wed, Jan 1, 2014 at 2:36 PM, Marc Glisse <marc.glisse@inria.fr> wrote:
> On Wed, 1 Jan 2014, Paolo Bolzoni wrote:
>
>> [Please put me in CC since I am not part of this list]
>>
>> Dear list,
>> I was playing around with g++ when I got this weird behavior:
>>
>> % cat a.cpp
>> #include <iostream>
>> #include <limits>
>>
>> int main() {
>> }
>>
>>
>> % g++ a.cpp
>> % g++ -m32 a.cpp
>> In file included from a.cpp:2:0:
>> /usr/include/c++/4.8.2/limits:1405:35: error: template argument 1 is
>> invalid
>> struct numeric_limits<__int128>
>> ^
>> /usr/include/c++/4.8.2/limits:1479:44: error: template argument 1 is
>> invalid
>> struct numeric_limits<unsigned __int128>
>> ^
>> %
>>
>> Compiling with -m32 breaks programs which include <limits>.
>> Is that a bug? Is there a work-around? Thanks.
>
>
> Compile with the -v flag and compare the include search paths for -m64 and
> for -m32. g++ is using the wrong bits/c++config.h with -m32, probably
> because of some variable in your environment.
>
> --
> Marc Glisse