This is the mail archive of the gcc-bugs@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]

[Bug fortran/85575] Acceptance of invalid code: ordering of declaration statements with implicit typing


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85575

--- Comment #10 from Jürgen Reuter <juergen.reuter at desy dot de> ---
(In reply to Dominique d'Humieres from comment #9)
> AFAICT
> 
> (1) The behavior is present even without module: add
> 
>   implicit none
>   integer :: cl
> 
> to the test in comment 4 and it compiles if -std=f* is not used.
> 
> (2) The extension seems to "work" as expected.
> 
> (3) The extension is not documented.
> 
> How do you expect this PR to be fixed?
> 
> (a) Remove the extension (beware benchmarks).
> (b) Limit it to codes compiled with -std=legacy.
> (c) Document it.
> ...

Tough question. Documentation never hurts, so probably yes. Now that you
mentioned that this also works for external functions, I would suppose this was
for backwards compatibility with code developed with g77. I would prefer
gfortran to follow the standard and throw an error without restricting to
-std=fXXXX, and allow the extension only for -std=legacy. But I feel that this
is the responsibility of the developer team to decide on the policy.

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