c++/1628: Bogus (but annoying) warning about unused parameter

wolfgang.bangerth@iwr.uni-heidelberg.de wolfgang.bangerth@iwr.uni-heidelberg.de
Fri Jan 12 00:56:00 GMT 2001


>Number:         1628
>Category:       c++
>Synopsis:       Bogus (but annoying) warning about unused parameter
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 12 00:56:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Wolfgang Bangerth
>Release:        unknown-1.0
>Organization:
>Environment:
Yesterdays CVS (2000/01/11)
>Description:
The following is quite annoying, since one often denotes
the meaning of a parameter by its name at the point of
declaration (and documentation):

deal.II/base> cat t.cc
  class X {    X (const int i);  };
  X::X (int) {};
deal.II/base> c++ -W -Wall -c t.cc -o /dev/null
  t.cc: In method `X::X(int)':
  t.cc:1: warning: unused parameter `const int i'
  t.cc: In method `X::X(int)':
  t.cc:1: warning: unused parameter `const int i'

(Yes, the message is repeated twice.)

Regards
  Wolfgang
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the Gcc-bugs mailing list