public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14573] New: -Wunused-parameter does not warn unused parameter in ctor
@ 2004-03-14 20:57 chlunde+bug at ifi dot uio dot no
  2004-03-14 21:06 ` [Bug c++/14573] " chlunde+bug at ifi dot uio dot no
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: chlunde+bug at ifi dot uio dot no @ 2004-03-14 20:57 UTC (permalink / raw)
  To: gcc-bugs

In the following code:

class C {
public:
  C(int i) {}
  void f(int j) {}
};

No warning is given about the unused `i', only `j'.

It seems to work fine in 2.95, 3.2 and 3.4.0 (debian-snapshot).

-- 
           Summary: -Wunused-parameter does not warn unused parameter in
                    ctor
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: chlunde+bug at ifi dot uio dot no
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14573


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/14573] -Wunused-parameter does not warn unused parameter in ctor
  2004-03-14 20:57 [Bug c++/14573] New: -Wunused-parameter does not warn unused parameter in ctor chlunde+bug at ifi dot uio dot no
@ 2004-03-14 21:06 ` chlunde+bug at ifi dot uio dot no
  2004-03-14 21:08 ` [Bug c++/14573] [3.3 Regression] " pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: chlunde+bug at ifi dot uio dot no @ 2004-03-14 21:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From chlunde+bug at ifi dot uio dot no  2004-03-14 21:06 -------
Sorry, doesn't work in 3.2 either.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14573


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/14573] [3.3 Regression] -Wunused-parameter does not warn unused parameter in ctor
  2004-03-14 20:57 [Bug c++/14573] New: -Wunused-parameter does not warn unused parameter in ctor chlunde+bug at ifi dot uio dot no
  2004-03-14 21:06 ` [Bug c++/14573] " chlunde+bug at ifi dot uio dot no
@ 2004-03-14 21:08 ` pinskia at gcc dot gnu dot org
  2004-04-22  2:42 ` pinskia at gcc dot gnu dot org
  2004-04-27  7:05 ` gdr at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-14 21:08 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-14 21:08 -------
I have not tested a newer 3.3.x yet.
Here is the corrected testcase which should warn about i also but only warns about j:
class C {
public:
  C(int i) {}
  void f(int j) {}
};
C c(0);
void t()
{
  c.f(0);
}

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
      Known to fail|                            |3.0.4 3.3.1 3.2.3 3.2.2
      Known to work|                            |2.95.3 3.4.0 3.5.0
            Summary|-Wunused-parameter does not |[3.3 Regression] -Wunused-
                   |warn unused parameter in    |parameter does not warn
                   |ctor                        |unused parameter in ctor
   Target Milestone|---                         |3.3.4


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14573


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/14573] [3.3 Regression] -Wunused-parameter does not warn unused parameter in ctor
  2004-03-14 20:57 [Bug c++/14573] New: -Wunused-parameter does not warn unused parameter in ctor chlunde+bug at ifi dot uio dot no
  2004-03-14 21:06 ` [Bug c++/14573] " chlunde+bug at ifi dot uio dot no
  2004-03-14 21:08 ` [Bug c++/14573] [3.3 Regression] " pinskia at gcc dot gnu dot org
@ 2004-04-22  2:42 ` pinskia at gcc dot gnu dot org
  2004-04-27  7:05 ` gdr at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-22  2:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-21 23:28 -------
Confirmed already.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-04-21 23:28:47
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14573


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/14573] [3.3 Regression] -Wunused-parameter does not warn unused parameter in ctor
  2004-03-14 20:57 [Bug c++/14573] New: -Wunused-parameter does not warn unused parameter in ctor chlunde+bug at ifi dot uio dot no
                   ` (2 preceding siblings ...)
  2004-04-22  2:42 ` pinskia at gcc dot gnu dot org
@ 2004-04-27  7:05 ` gdr at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: gdr at gcc dot gnu dot org @ 2004-04-27  7:05 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at gcc dot gnu dot org  2004-04-27 06:57 -------
Fixed in 3.4.0.  Won't fix in 3.3.x

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|3.3.4                       |3.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14573


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-04-27  6:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-14 20:57 [Bug c++/14573] New: -Wunused-parameter does not warn unused parameter in ctor chlunde+bug at ifi dot uio dot no
2004-03-14 21:06 ` [Bug c++/14573] " chlunde+bug at ifi dot uio dot no
2004-03-14 21:08 ` [Bug c++/14573] [3.3 Regression] " pinskia at gcc dot gnu dot org
2004-04-22  2:42 ` pinskia at gcc dot gnu dot org
2004-04-27  7:05 ` gdr at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).