Bug 30416 - -Wall does not include -Wunused-parameter
Summary: -Wall does not include -Wunused-parameter
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
(Show other bugs)
Version: 7.0
Hardware: i386 Linux
medium
low
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-03-03 03:10 UTC by Wagner T. Correa
Modified: 2007-04-18 16:31 UTC (History)
0 users

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


Attachments (Terms of Use)

Description Wagner T. Correa 2001-03-03 03:10:51 UTC
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 07:50:11 UTC
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.