public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/21918] New: Warnings about unused variables should point to the declaration
@ 2005-06-04 23:03 schnetter at aei dot mpg dot de
2005-06-05 6:39 ` [Bug fortran/21918] " pinskia at gcc dot gnu dot org
2005-06-23 20:48 ` tobi at gcc dot gnu dot org
0 siblings, 2 replies; 9+ messages in thread
From: schnetter at aei dot mpg dot de @ 2005-06-04 23:03 UTC (permalink / raw)
To: gcc-bugs
Warnings about unused variables should point to the declaration of the
variable. Currently the warning points to the first line of the procedure
where the variable is declared:
subroutine a (x, y)
implicit none
integer x
integer y
x = 1
end subroutine a
$ ~/gcc/bin/gfortran -c -Wall unused.f90
unused.f90: In function 'a':
unused.f90:1: warning: unused variable 'y'
--
Summary: Warnings about unused variables should point to the
declaration
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: schnetter at aei dot mpg dot de
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21918
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/21918] Warnings about unused variables should point to the declaration
2005-06-04 23:03 [Bug fortran/21918] New: Warnings about unused variables should point to the declaration schnetter at aei dot mpg dot de
@ 2005-06-05 6:39 ` pinskia at gcc dot gnu dot org
2005-06-23 20:48 ` tobi at gcc dot gnu dot org
1 sibling, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-05 6:39 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-05 06:39 -------
Confirmed, all variables have the same location for some reason, even parameters.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |diagnostic
Last reconfirmed|0000-00-00 00:00:00 |2005-06-05 06:39:21
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21918
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/21918] Warnings about unused variables should point to the declaration
2005-06-04 23:03 [Bug fortran/21918] New: Warnings about unused variables should point to the declaration schnetter at aei dot mpg dot de
2005-06-05 6:39 ` [Bug fortran/21918] " pinskia at gcc dot gnu dot org
@ 2005-06-23 20:48 ` tobi at gcc dot gnu dot org
1 sibling, 0 replies; 9+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-06-23 20:48 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tobi at gcc dot gnu dot org 2005-06-23 20:47 -------
We have a declared_at field in gfc_symbol, with this, this is easily fixed.
Index: trans-decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/trans-decl.c,v
retrieving revision 1.61
diff -u -p -r1.61 trans-decl.c
--- trans-decl.c 11 Jun 2005 22:29:17 -0000 1.61
+++ trans-decl.c 23 Jun 2005 20:44:39 -0000
@@ -2222,12 +2222,14 @@ generate_local_decl (gfc_symbol * sym)
if (sym->attr.referenced)
gfc_get_symbol_decl (sym);
else if (sym->attr.dummy && warn_unused_parameter)
- warning (0, "unused parameter %qs", sym->name);
+ gfc_warning ("Unused parameter %s declared at %L", sym->name,
+ sym->declared_at);
/* Warn for unused variables, but not if they're inside a common
block or are use-associated. */
else if (warn_unused_variable
&& !(sym->attr.in_common || sym->attr.use_assoc))
- warning (0, "unused variable %qs", sym->name);
+ gfc_warning ("unused variable %s declared at %L", sym->name,
+ sym->declared_at);
}
}
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |tobi at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2005-06-05 06:39:21 |2005-06-23 20:47:57
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21918
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/21918] Warnings about unused variables should point to the declaration
[not found] <bug-21918-7427@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2006-09-18 6:56 ` pault at gcc dot gnu dot org
@ 2006-09-18 22:02 ` pault at gcc dot gnu dot org
5 siblings, 0 replies; 9+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-09-18 22:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from pault at gcc dot gnu dot org 2006-09-18 22:02 -------
Subject: Bug 21918
Author: pault
Date: Mon Sep 18 22:02:24 2006
New Revision: 117038
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117038
Log:
2006-09-18 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29060
* iresolve.c (resolve_spread): Build shape for result if the
source shape is available and dim and ncopies are constants.
PR fortran/28817
PR fortran/21918
* trans-decl.c (generate_local_decl): Change from 'warning' to
'gfc_warning' to have line numbers correctly reported.
2006-09-18 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29060
* gfortran.dg/spread_shape_1.f90: New test.
Modified:
branches/gcc-4_1-branch/gcc/fortran/ChangeLog
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/spread_shape_1.f90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21918
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/21918] Warnings about unused variables should point to the declaration
[not found] <bug-21918-7427@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2006-09-18 6:47 ` pault at gcc dot gnu dot org
@ 2006-09-18 6:56 ` pault at gcc dot gnu dot org
2006-09-18 22:02 ` pault at gcc dot gnu dot org
5 siblings, 0 replies; 9+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-09-18 6:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from pault at gcc dot gnu dot org 2006-09-18 06:56 -------
Fixed on trunk and 4.1
Paul
Thanks, Tobi!
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21918
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/21918] Warnings about unused variables should point to the declaration
[not found] <bug-21918-7427@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2006-09-18 6:25 ` pault at gcc dot gnu dot org
@ 2006-09-18 6:47 ` pault at gcc dot gnu dot org
2006-09-18 6:56 ` pault at gcc dot gnu dot org
2006-09-18 22:02 ` pault at gcc dot gnu dot org
5 siblings, 0 replies; 9+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-09-18 6:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pault at gcc dot gnu dot org 2006-09-18 06:46 -------
Subject: Bug 21918
Author: pault
Date: Mon Sep 18 06:46:36 2006
New Revision: 117015
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117015
Log:
2006-09-18 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29060
* iresolve.c (resolve_spread): Build shape for result if the
source shape is available and dim and ncopies are constants.
PR fortran/28817
PR fortran/21918
* trans-decl.c (generate_local_decl): Change from 'warning' to
'gfc_warning' to have line numbers correctly reported.
2006-09-18 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29060
* gfortran.dg/spread_shape_1.f90: New test.
Added:
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/spread_shape_1.f90
Modified:
branches/gcc-4_1-branch/gcc/fortran/ChangeLog
branches/gcc-4_1-branch/gcc/fortran/iresolve.c
branches/gcc-4_1-branch/gcc/fortran/trans-decl.c
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21918
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/21918] Warnings about unused variables should point to the declaration
[not found] <bug-21918-7427@http.gcc.gnu.org/bugzilla/>
2006-01-06 15:03 ` pinskia at gcc dot gnu dot org
2006-09-16 20:07 ` aldot at gcc dot gnu dot org
@ 2006-09-18 6:25 ` pault at gcc dot gnu dot org
2006-09-18 6:47 ` pault at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-09-18 6:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pault at gcc dot gnu dot org 2006-09-18 06:25 -------
Subject: Bug 21918
Author: pault
Date: Mon Sep 18 06:24:54 2006
New Revision: 117014
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117014
Log:
2006-09-18 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29060
* iresolve.c (resolve_spread): Build shape for result if the
source shape is available and dim and ncopies are constants.
PR fortran/28817
PR fortran/21918
* trans-decl.c (generate_local_decl): Change from 'warning' to
'gfc_warning' to have line numbers correctly reported.
2006-09-18 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29060
* gfortran.dg/spread_shape_1.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/spread_shape_1.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/iresolve.c
trunk/gcc/fortran/trans-decl.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21918
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/21918] Warnings about unused variables should point to the declaration
[not found] <bug-21918-7427@http.gcc.gnu.org/bugzilla/>
2006-01-06 15:03 ` pinskia at gcc dot gnu dot org
@ 2006-09-16 20:07 ` aldot at gcc dot gnu dot org
2006-09-18 6:25 ` pault at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: aldot at gcc dot gnu dot org @ 2006-09-16 20:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from aldot at gcc dot gnu dot org 2006-09-16 20:07 -------
Note that there are other (wrong) occurances of the non gfc_*() warnings in
trans-decl.c.
These other "warning()" calls too should be converted to the respective
gfc_warning*() calls.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21918
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/21918] Warnings about unused variables should point to the declaration
[not found] <bug-21918-7427@http.gcc.gnu.org/bugzilla/>
@ 2006-01-06 15:03 ` pinskia at gcc dot gnu dot org
2006-09-16 20:07 ` aldot at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-06 15:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2006-01-06 15:02 -------
*** Bug 25693 has been marked as a duplicate of this bug. ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |eedelman at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21918
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2006-09-18 22:02 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-04 23:03 [Bug fortran/21918] New: Warnings about unused variables should point to the declaration schnetter at aei dot mpg dot de
2005-06-05 6:39 ` [Bug fortran/21918] " pinskia at gcc dot gnu dot org
2005-06-23 20:48 ` tobi at gcc dot gnu dot org
[not found] <bug-21918-7427@http.gcc.gnu.org/bugzilla/>
2006-01-06 15:03 ` pinskia at gcc dot gnu dot org
2006-09-16 20:07 ` aldot at gcc dot gnu dot org
2006-09-18 6:25 ` pault at gcc dot gnu dot org
2006-09-18 6:47 ` pault at gcc dot gnu dot org
2006-09-18 6:56 ` pault at gcc dot gnu dot org
2006-09-18 22:02 ` pault at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).