This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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: RFC: renaming -i8, -r8, and -d8


On Friday 11 March 2005 19:13, Steve Kargl wrote:
> -fi8  Promote only default INTEGER type to the next largest INTEGER KIND.
> -fr8  Promote only default REAL type to the next largest REAL KIND.
> -fd8  Equivalent to -fi8 and -fr8.

No. AFAIK these options are here for one purpose only: Compatibility with old 
64-bit Cray machines. Specifically where kind(0) == 8 kind(0.0) == 8.
-d8 is provided so that -r8 can be used without requiring an extended/quad 
precision floating point type.

I suggest:

-fdefault-real-8
Make the default real type 8 bytes wide. Does nothing if this is already the 
default.

-fdefault-int-8
Make the default integer and logical types are 8 bytes wide. Does nothing if 
this is already the default.

-fdefault-double-8
Make the "DOUBLE PRECISION" type 8 bytes wide. Should generate and error if 
-fdefault-real-8 is not also specified.
or
-fdefault-double-single
Make the "DOUBLE PRECISION" type the same as the default real type.

I see no reason to keep the cryptic short forms unless we actually call them 
-r8 and -i8.

I guess you could implement -fdefault-real=n, however that's much more work. 
For example the runtime library assumes that the default integer and real 
kinds are either 4 or 8.

> We can also (in the future) support
>
> -fI8  Promote all INTEGER types to the next largest KIND.
> -fR8  Promote all REAL types to the mext largest KIND.
> -fD8  Equivalent to -fI8 and -fR8.

I don't think we want any of this. If a user specifies a kind type that is 
what they should get. Unless you can come up with a convincing argument it 
just looks like evil hacks for the sake of it.

It might be worthwhile to allow renumbering type kinds (eg. so that 
real(kind=n) does the same thing as g77), but that should be done in some 
generic manner allowing the user to specify arbitrary numbering.

Paul


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