This is the mail archive of the 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: [FORTRAN] New -fboz-kind option to aid compilation of legacy code

Steve Kargl wrote:
On Mon, Nov 13, 2006 at 06:36:13PM -0800, Brooks Moses wrote:
Though I agree that the "largest decimal representation" wording should be improved, I don't quite like the idea of an integer type with an "exponent range". Perhaps just "largest range"?

Check the Standard. That wording comes directly from F2003.

Fair point; it does say exactly that. I still don't like the wording despite the provenance, but I won't object if you want to leave it.

Also, there isn't a check to confirm that a valid kind type is supplied, and so I'll bet you ICE on an invalid kind. Unfortunately, this can't be checked in options.c (despite the fact that -qkind tried to do it that way), since the kind types haven't been processed when that's run.

gfc_convert_integer issues an error of the form

Error: Can't convert INTEGER(42) to INTEGER(4) at (1).

If you prefer I can add a call to gfc_validate_kind right before
the BOZ conversion.

I think a slightly clearer error would be better, yeah. I'm also still in favor of having it be a fatal error that happens once at startup before any code processing occurs, like the other errors that come from invalid options, but I wouldn't object too strenuously to having it happen at the point of conversion instead.

- Brooks

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