[Bug fortran/24784] Warning about unused routine argument should not read "unused variable"

2006-10-13 Thread aldot at gcc dot gnu dot org


--- Comment #2 from aldot at gcc dot gnu dot org  2006-10-13 11:46 ---
Current trunk gives:

# -Wall
 In file unused.f90:1

subroutine a(x)
 1
Warning: Unused variable x declared at (1)

# -Wall -W
 In file unused.f90:1

subroutine a(x)
 1
Warning: Unused parameter x declared at (1)
unused.f90:1: warning: unused parameter 'x'


I'm looking into the improper diagnostic emitted by the FE for -Wall only,
but to me it looks like that this is yet another case where the communication
about diagnostics between FE and ME is misbehaving / not existing.

In this case, the ME (function.c::do_warn_unused_parameter() to be specific)
emits a diagnostic that was already dealt with by the FE.

Shouldn't the diagnostic machinery use the FE's diagnostic infrastructure?
Doing so would avoid to set TREE_NO_WARNING for stuff the FE did already
diagnose.

Apart from the above issue, the fortran frontend has it's own warning
infrastructure and it's still unclear to me if it should use the generic one or
not, at least in the long run.


-- 

aldot at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||aldot at gcc dot gnu dot org


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



[Bug fortran/24784] Warning about unused routine argument should not read "unused variable"

2006-11-30 Thread dfranke at gcc dot gnu dot org


--- Comment #3 from dfranke at gcc dot gnu dot org  2006-11-30 22:34 ---
In addition to comment #2, it is to note, that "-W" alone does not give any
diagnostic at all. 

Also, the FE emits different messages, if different flags are specified:
# -Wall
Warning: Unused variable x declared at (1)

# -Wall -W
Warning: Unused parameter x declared at (1)
^


-- 


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



[Bug fortran/24784] Warning about unused routine argument should not read "unused variable"

2007-07-03 Thread dfranke at gcc dot gnu dot org


--- Comment #4 from dfranke at gcc dot gnu dot org  2007-07-03 21:00 ---
Mine.


-- 

dfranke at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |dfranke at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2005-11-10 21:24:37 |2007-07-03 21:00:03
   date||


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



[Bug fortran/24784] Warning about unused routine argument should not read "unused variable"

2007-07-03 Thread patchapp at dberlin dot org


--- Comment #5 from patchapp at dberlin dot org  2007-07-04 06:00 ---
Subject: Bug number PR24784

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2007-07/msg00326.html


-- 


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



[Bug fortran/24784] Warning about unused routine argument should not read "unused variable"

2007-07-08 Thread dfranke at gcc dot gnu dot org


--- Comment #6 from dfranke at gcc dot gnu dot org  2007-07-08 22:41 ---
Subject: Bug 24784

Author: dfranke
Date: Sun Jul  8 22:41:35 2007
New Revision: 126471

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126471
Log:
gcc:
2007-07-08  Daniel Franke  <[EMAIL PROTECTED]>

* function.c (do_warn_unused_parameter): Do not warn if
TREE_NO_WARNING is set.

gcc/fortran:
2007-07-08  Daniel Franke  <[EMAIL PROTECTED]>

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.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-decl.c
trunk/gcc/function.c


-- 


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



[Bug fortran/24784] Warning about unused routine argument should not read "unused variable"

2007-07-08 Thread dfranke at gcc dot gnu dot org


--- Comment #7 from dfranke at gcc dot gnu dot org  2007-07-08 22:45 ---
Fixed in trunk. Not a regression, no backport. Closing.


-- 

dfranke at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.3.0


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



[Bug fortran/24784] Warning about unused routine argument should not read "unused variable"

2005-11-10 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2005-11-10 21:24 ---
Hmm, there is something weird going on here.
If I do -W -Wall, then I get:
t.f90: In function 'a':
t.f90:1: warning: unused parameter 'x'
t.f90: At top level:
t.f90:1: warning: unused parameter 'x'

But if I just do -Wall, I get:
t.f90: In function 'a':
t.f90:1: warning: unused variable 'x'

This is not the case for C code though.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
  GCC build triplet|powerpc-apple-darwin8.3.0   |
   GCC host triplet|powerpc-apple-darwin8.3.0   |
 GCC target triplet|powerpc-apple-darwin8.3.0   |
   Keywords||diagnostic
   Last reconfirmed|-00-00 00:00:00 |2005-11-10 21:24:37
   date||


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