Bug 58908 - No unused parameter warning from gcc 3.1-0.18
Summary: No unused parameter warning from gcc 3.1-0.18
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: gcc3
Version: 1.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-01-27 18:39 UTC by Peter Klotz
Modified: 2007-04-18 16:39 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-10-02 20:06:24 UTC
Embargoed:


Attachments (Terms of Use)

Description Peter Klotz 2002-01-27 18:39:34 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

Description of problem:
gcc 3.1-0.18 does not emit a warning when a parameter is not used
in a constructor body. gcc 2.95.3 does.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. g++ -W -Wall -Wunused-parameter warning.cpp
2.
3.
	

Actual Results:  No warning is displayed

Expected Results:  Something like this (taken from gcc 2.95.3)

warning.cpp: In method `A::A(int)':
warning.cpp:4: warning: unused parameter `int i'

Additional info:

class A
{
public:
    A(int i) {};
};

int main(void)
{
    A(3);
    return 0;
}

Comment 1 Jakub Jelinek 2004-10-02 20:06:24 UTC
Sounds like PR c++/9848, fixed ATM in GCC 3.4.x and later.
Though, there are now 2 warnings emitted instead of one, filed
as http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17796


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