[Patch, Fortran] PR 22552: New warning -Wimplicit-procedure
Daniel Kraft
d@domob.eu
Sat Apr 11 16:13:00 GMT 2009
Hi,
this implements the warning asked for in PR 22552. A new flag
-Wimplicit-procedure is added, that warns about usage of a procedure
never explicitly declared. That is,
EXTERNAL :: foobar
CALL foobar ()
will not trigger this warning, as -Wimplicit-interface would do. Also,
something like
INTEGER :: foobar
also prevents the warning, as does an implicit type. This means that
the warning will only ever be issued for SUBROUTINES, as FUNCTIONS need
to have a type.
See the test-case for a full example.
While I don't think this flag is very useful for new code (there
-Wimplicit-interface could be used better, I guess, when only module
procedures with explicit interfaces are used), the patch is quite
straight-forward and thus I think we can include it to help with those
codes not yet having only explicit-interface procedures.
I did build this patch on the code snipped provided by FX in the PR.
Regression-testing on GNU/Linux-x86-32 at the moment. Do you think this
new flag is ok, and ok for trunk if successful?
Yours,
Daniel
--
Done: Arc-Bar-Cav-Ran-Rog-Sam-Tou-Val-Wiz
To go: Hea-Kni-Mon-Pri
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.changelog
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090411/cd3a1467/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090411/cd3a1467/attachment-0001.ksh>
More information about the Gcc-patches
mailing list