problem with LONG_MAX on mips-sgi-irix6

Swen Thuemmler swen@uni-paderborn.de
Thu Oct 9 07:42:00 GMT 1997


Hi,

while trying to compile perl5 on mips-sgi-irix6.2, I stumbled over a
problem with LONG_MAX. The default abi is -mabi=n32, and sizeof long is 4,
but still specs defines __LONG_MAX__ as 9223372036854775807LL, which is
wrong. And -mlong64 does not work, sizeof long is still 64, and with
-mno-long64 I get cc1: Invalid option `no-long64'

This seems to come from mips.h including abi64.h, but there are a lot of
question marks in this file...

I changed 
*long_max_spec:
%{!mno-long64:-D__LONG_MAX__=9223372036854775807LL}

to 
*long_max_spec:
%{mlong64:-D__LONG_MAX__=9223372036854775807LL}

in specs, which is probably still wrong, since -mlong64 does not work, but
the default is ok then, I hope. Sorry, I cannot provide a real fix.

Cheers, Swen





More information about the Gcc-bugs mailing list