This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c++/5509: -Wunused-parameter and tree inlining
- From: jakub at redhat dot com
- To: gcc-gnats at gcc dot gnu dot org
- Cc: peter dot klotz at aon dot at
- Date: 28 Jan 2002 11:20:57 -0000
- Subject: c++/5509: -Wunused-parameter and tree inlining
- Reply-to: jakub at redhat dot com
>Number: 5509
>Category: c++
>Synopsis: -Wunused-parameter and tree inlining
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Jan 28 03:26:02 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: jakub@redhat.com
>Release: 3.1 20020125 (experimental)
>Organization:
>Environment:
i386-redhat-linux
>Description:
-Wunused-parameter is not signalled when using tree inlining
>How-To-Repeat:
struct A
{
A (int i) {}
int foo (int i) { return 0; }
};
struct B
{
B (int i);
int foo (int i) { return 0; }
};
B::B (int i)
{
}
inline void baz (int i)
{
}
int main(void)
{
A x(1);
B y(2);
x.foo (3);
y.foo (4);
baz (5);
return 0;
}
should issue the unused parameter warning 5 times, while
ATM it issues it 4 times (-O0) and once (-O1+).
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: