This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: wide-int, fortran


On Sun, Nov 24, 2013 at 2:38 PM, N.M. Maclaren wrote:
> The main problem is that integer constant expressions in C are limited to
> the built-in operators, of which the only tricky ones are division and
> remainder (and, occasionally, multiplication) - see C11 6.6#3.  Fortran
> is not so limited, and there are much wider requirements for expression
> evaluation at compile time.

In gfortran there's been effectively no limit on the size of integers
since the beginning, because all integers are represented as mpz (i.e.
GMP integers) values. In fact, I'm a bit surprised that the wide_int
stuff isn't also based on GMP's integer representation, but oh well...

Point is, this wide_int stuff is for the interface between gfortran as
a front end on one side, and the rest of gcc (middle end) on the
other. At the hand-over point, gfortran will already have handled more
complex integer constant expressions as much as possible.

Ciao!
Steven


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]