public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/2349: Compiler generated copy-constructor generates warning for unused argument.
@ 2001-03-22 15:26 bumgard
  0 siblings, 0 replies; only message in thread
From: bumgard @ 2001-03-22 15:26 UTC (permalink / raw)
  To: gcc-gnats

>Number:         2349
>Category:       c++
>Synopsis:       Compiler generated copy-constructor generates warning for unused argument.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 22 15:26:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Greg Bumgardner
>Release:        gcc 3.1 as of 2001-03-22
>Organization:
>Environment:
Redhat Linux 2.2.16
>Description:
Compiler generated copy-constructors produce warnings 
for unused argument if class has virtual destructor and
no members, and the compiler-generated copy-constructor 
is used to initialize an instance.

This problem seems to be very specific.
>How-To-Repeat:
c++ -W -Wall -Werror simple.cpp

produces:

cc1plus: warnings being treated as errors
simple.cpp: In method `Foo::Foo(const Foo&)':
simple.cpp:1: warning: unused parameter `const Foo&_ctor_arg'
>Fix:
Unknown.
This error was introduced sometime in the last month.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="simple.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="simple.cpp"

Y2xhc3MgRm9vIHsKICBwdWJsaWM6CiAgICB2aXJ0dWFsIH5Gb28odm9pZCkge30gLy8gV2Fybmlu
ZyByZXF1aXJlcyBleGlzdGFuY2Ugb2YgdmlydHVhbCBkZXN0cnVjdG9yIAp9OwoKY2xhc3MgQmFy
IHsKICBwdWJsaWM6CiAgICB+QmFyKHZvaWQpIHt9Cn07CgoKaW50IG1haW4oKSB7CgogIEZvbyBm
MTsKICBGb28gZjIoZjEpOyAvLyBHZW5lcmF0ZXMgd2FybmluZwogIEZvbyBmMyhGb28oKSk7IC8v
IERvZXMgbm90IGdlbmVyYXRlIHdhcm5pbmcKICAodm9pZClmMTsKICAodm9pZClmMjsKICAodm9p
ZClmMzsKCiAgQmFyIGIxOwogIEJhciBiMihiMSk7IC8vIERvZXMgbm90IGdlbmVyYXRlIHdhcm5p
bmcKICAodm9pZCliMTsKICAodm9pZCliMjsKICByZXR1cm4gMDsKfQo=


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-03-22 15:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-22 15:26 c++/2349: Compiler generated copy-constructor generates warning for unused argument bumgard

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).