public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/18183] New: Warning when supposedly unused parameters are used
@ 2004-10-27 16:28 terra at gnome dot org
  2004-10-27 16:34 ` [Bug c/18183] " pinskia at gcc dot gnu dot org
  2004-10-29 17:37 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: terra at gnome dot org @ 2004-10-27 16:28 UTC (permalink / raw)
  To: gcc-bugs

It would be nice to get a warning for the code below when bar is used.
Using something documented as unused is likely a bug.

void
foo (int __attribute__((unused)) bar)
{
  bar++;
}

> gcc-3.4 -W -Wunused -Wall -O2 -c ~/foo.c
>

-- 
           Summary: Warning when supposedly unused parameters are used
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: terra at gnome dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: sparc-sun-solaris2.8
  GCC host triplet: sparc-sun-solaris2.8
GCC target triplet: sparc-sun-solaris2.8


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c/18183] Warning when supposedly unused parameters are used
  2004-10-27 16:28 [Bug c/18183] New: Warning when supposedly unused parameters are used terra at gnome dot org
@ 2004-10-27 16:34 ` pinskia at gcc dot gnu dot org
  2004-10-29 17:37 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-27 16:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-27 16:34 -------
I think there was another bug about this and it was closed because we use unused to mean it might be 
unused not that it is just unused.

-- 


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c/18183] Warning when supposedly unused parameters are used
  2004-10-27 16:28 [Bug c/18183] New: Warning when supposedly unused parameters are used terra at gnome dot org
  2004-10-27 16:34 ` [Bug c/18183] " pinskia at gcc dot gnu dot org
@ 2004-10-29 17:37 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-29 17:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-29 17:37 -------
unused is really a marker for maybe unused and that is it.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-10-29 17:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-27 16:28 [Bug c/18183] New: Warning when supposedly unused parameters are used terra at gnome dot org
2004-10-27 16:34 ` [Bug c/18183] " pinskia at gcc dot gnu dot org
2004-10-29 17:37 ` pinskia 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).