This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/18183] New: Warning when supposedly unused parameters are used
- From: "terra at gnome dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Oct 2004 16:27:59 -0000
- Subject: [Bug c/18183] New: Warning when supposedly unused parameters are used
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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