Re: Unexpected compiler error ( error: template argument 1 is invalid ) when using <limits> and using -m32 option on 64-bit system.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 24/05/12 17:42, Ángel González wrote:
> On 24/05/12 15:27, Delcypher wrote:
>> $ g++ -m64 limits.cpp
>> 
>> compilation succeeds. However if I compile as follows I get a
>> rather unhelpful error.
>> 
>> $ g++ -m32 limits.cpp In file included from limits.cpp:1:0: 
>> /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/limits:1405:35:
>>
>> 
error: template argument 1 is invalid
>> /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/limits:1479:44:
>>
>> 
error: template argument 1 is invalid
>> 
>> Seems a very strange error message to give as I took a look at
>> the numeric_limits templates in the <limits> header file and it
>> looks perfectly valid.
>> 
>> Is this a bug or a "feature"?
>> 
>> Regards, Dan.
> Works for me with the same version.
> 
Perhaps it is an issue with my distribution then. Are you using Arch
Linux on a 64-bit system?

I have the output of running
$ g++ -v -m32 limits.cpp

here: http://pastebin.com/JRJcVDX2

It is showing some header mismatch issues but I do not know if it is
related to my issue.

Any ideas what might be wrong?


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux