This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/5509: -Wunused-parameter and tree inlining



>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]