[Bug fortran/59107] Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising.

janus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Nov 17 15:58:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59107

--- Comment #5 from janus at gcc dot gnu.org ---
(In reply to janus from comment #4)
> For the intrinsics with arguments it does not seem to happen.

This is simply due to the fact that 'gfc_resolve_intrinsic' apparently is
called more than once (potentially for all intrinsics?).

However, for the ones with arguments, the check for 'sym->formal' exits the
function early on the second call.

For the ones without arguments this does not happen. They receive a type on the
first call, which then triggers the warning on the second call.

To fix this bug, we just have to make sure that 'gfc_resolve_intrinsic' is not
called more than once!



More information about the Gcc-bugs mailing list