[Bug fortran/54199] Superfluous diagnostic "is also the name of an intrinsic" for internal procedures
burnus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Aug 9 07:52:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54199
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-08-09 07:52:02 UTC ---
(In reply to comment #1)
> Maybe the second part is confusing, but a warning makes sense IMO.
> > (For module procedures, there is a different warning, which can stay:
> > "'fraction' declared at (1) may shadow the intrinsic of the same name. In
> > order to call the intrinsic, explicit INTRINSIC declarations may be
> > required.")
>
> That one would be fine for internal procedures, don't you think?
Regarding a warning: Maybe it makes sense. For independent procedures, it makes
a lot of sense as it is very likely to call the wrong procedure. For modules,
usually the module writer has a good idea about the code (unless the module is
very large) but the main problem are the module users, which inadvertently
use-associating such a procedure.
For internal procedures, the risk is much lower: such code is typically much
smaller and it cannot be accessed from the outside. For the parent procedure,
there is also no way to access the intrinsic procedure - the INTRINSIC only
allows the access for other internal procedures. Thus, the importance of the
warning is single proc > module proc > internal proc (and the question where
one stops warning with -Wall).
In any case, I concur that for internal procedures the warning wording for
module procedures is much better than the current one, whose second part is
plainly wrong.
More information about the Gcc-bugs
mailing list