Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 30416 - -Wall does not include -Wunused-parameter
-Wall does not include -Wunused-parameter
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2001-03-02 22:10 EST by Wagner T. Correa
Modified: 2007-04-18 12:31 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-03-02 22:10:54 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Wagner T. Correa 2001-03-02 22:10:51 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.2.16-22smp i686)

According to the man page, -Wall implies -Wunused-parameter, but tests show
it doesn't.

Reproducible: Always
Steps to Reproduce:
Create a foo.c file the the following line:

int foo(int a) { return 0; }

Then, compile with:

gcc -Wall -c foo.c

You will get no warnings.

If you compile with:

gcc -Wall -Wunused-parameter -c foo.c

Then you get the warning:

foo.c: In function `foo':
foo.c:1: warning: unused parameter `a'

By the way, the -Wunused, which is also supposed to imply
-Wunused-parameter, does not work either.
Comment 1 Wagner T. Correa 2001-03-06 02:50:11 EST
Sorry. This is not a bug. I misread the man page, which says:

In order to get a warning about an unused  function
parameter, you must either specify `-W -Wunused' or
separatly specify `-Wunused-parameter'.

Note You need to log in before you can comment on or make changes to this bug.