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: -ff2c question: Complex type in procedure calls (related to PR 30887 / %VAL())


Hi,

Tobias Schlüter wrote:
> Brooks Moses wrote:
>> Wow, that's an ugly syntax hack.  We don't have that one documented,
>> do we?
>>
>> Honestly, I think that's counterintuitive enough that it ought to get
>> a warning at anything less than -std=legacy, besides being
>> documented, but maybe that's just me.
>
> It's completely intuitive :-) a variable defined in the legacy "type*n
> x" syntax, is a variable of type "type" with a storage size of "n"
> bytes.  People using complex*n instead of complex(n) deserve to be
> punished.

It is completely intuitive for Fortran 77 programmers as they are used
to it.

It is completely counter-intuitive for Fortran 90 programmers which
happen to modify Fortran 77 code.

I belong clearly to the latter and as c_by_val_1.f contained "integer*4"
I added without much thought also "integer*8" and "complex*8" ...

In any case, I think, we should not add a default warning as many legacy
code contains "complex*8" and "complex*16".

Tobias


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