[patch, fortran] PR24784, PR28004 - about unused variables

Richard Guenther richard.guenther@gmail.com
Wed Jul 4 08:28:00 GMT 2007


On 7/4/07, Daniel Franke <franke.daniel@gmail.com> wrote:
>
> Depending on the command-line arguments -Wall and -Wextra, gfortran gives
> different kinds of warnings for unused dummy arguments. In addition,
> sometimes the middle-end chimes in and emits a default warning as well
> (PR27484). Further, PR28004 requests a warning if dummy arguments of
> INTENT(out) are not set.
>
> This patch addresses all this in a single sweep, the corrected warnings are
> emitted on -Wall regardless of -Wextra (via warn_unused_variable). The
> changes should be self explanatory, those in function.c probably need to be
> approved by a C- or global maintainer?!

The function.c bits are ok.  But you need a bootstrap & regtest for all default
languages if you touch a middle-end part, so please make sure that there are
no regressions for those.

Thanks,
Richard.

>
> gcc:
> 2007-07-04  Daniel Franke  <franke.daniel@gmail.com>
>
>         * function.c (do_warn_unused_parameter): Do not warn if TREE_NO_WARNING is
>         set.
>
> gcc/fortran:
> 2007-07-04  Daniel Franke  <franke.daniel@gmail.com>
>
>         PR fortran/24784
>         PR fortran/28004
>         * trans-decl.c (generate_local_decl): Adjusted warning on unused
>         dummy arguments, tell middle-end not to emit additional warnings.
>
>
> Bootstrapped and regtested c and fortran on i686-pc-linux-gnu.
> Ok for trunk?
>
> Regards
>         Daniel
>
>



More information about the Fortran mailing list