-ff2c question: Complex type in procedure calls (related to PR 30887 / %VAL())
Brooks Moses
brooks.moses@codesourcery.com
Thu Feb 22 20:41:00 GMT 2007
Tobias SchlÃŒter wrote:
> Tobias Burnus wrote:
>> In the test case, I have:
>> external c_to_c8
>> complex(8) u8, v8, w8, c_to_c8
>
> No, you have not :-) You wrote complex*8, which gets the following
> special treatment in gfc_match_old_kind_spec:
>
> /* Massage the kind numbers for complex types. */
> if (ts->type == BT_COMPLEX)
> {
> if (ts->kind % 2)
> {
> gfc_error ("Old-style type declaration %s*%d not supported at %C",
> gfc_basic_typename (ts->type), original_kind);
> return MATCH_ERROR;
> }
> ts->kind /= 2;
> }
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.
- Brooks
More information about the Fortran
mailing list