-fdefault-integer-8 in c

Nicholas Sherlock n.sherlock@gmail.com
Wed Mar 10 00:15:00 GMT 2010


On 10/03/2010 11:41 a.m., José Luis García Pallero wrote:
> Hello,
> Is possible to force integers to be 8 bytes length in gcc as in
> gfortran? I need to do some maths and I need a matrix larger than 2GB
> but my functiosns are programmed with indexes as int.

#define int long

?

<shudders> :)

I think the best way to do that would be to replace int with some type 
like "matrix_index", that way you can either:

typedef int matrix_index;

or

typedef long matrix_index;

Depending on how much precision you want at the time.

Cheers,
Nicholas Sherlock



More information about the Gcc-help mailing list