This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [patch, fortran] PR24784, PR28004 - about unused variables
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Daniel Franke" <franke dot daniel at gmail dot com>
- Cc: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Wed, 4 Jul 2007 10:28:45 +0200
- Subject: Re: [patch, fortran] PR24784, PR28004 - about unused variables
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=SuT7XJw4vPyzi3MnRvD38pCn9YclRriVtJX+OBOo1dvkjUHHJOBtpqPS+p6Ud29ubFs8yqocquywZNd4Wcq1fjUoFbCifb+woC9mYZiFy1BlVjw7uqpFOD0eat3qJPw7GgBYoYGr9jDJienSgrphdasIJZ+ZAObFno2SassWjBg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=qwxGKEFAb7O6c0AoPgehllj24U/P5QoQbH5IrGhnKvZNShkuvCoLSb/akLglzsCjudJwNAOjFSoxVqxxI95CfxnMjzpJBCGX9gIy+cnEbi9qtQ559+uiCiEj0FMPEhqI4OR0uimL/is29Py8cFJ5C+CnSjpCL+5/UkF/hbjtHv0=
- References: <200707040757.51844.franke.daniel@gmail.com>
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