public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/15229] Omits constructor calls for variables not used otherwise. Date: Fri, 30 Apr 2004 18:14:00 -0000 [thread overview] Message-ID: <20040430172201.18870.qmail@sources.redhat.com> (raw) In-Reply-To: <20040430155448.15229.duz@sol-3.de> ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-04-30 17:22 ------- Invalid, this code is equivent to this simplifed case: struct Lingo { Lingo (); }; struct ALingo : Lingo { ALingo(); }; int main() { ALingo a; Lingo b(a); // <-- calls the copy constrctor } Since there is no user defined copy constructor, the compiler creates one for you (by the rules of C++). So this is invalid, to solve this you need to define a copy constructor. -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15229
prev parent reply other threads:[~2004-04-30 17:22 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-04-30 16:00 [Bug c++/15229] New: " duz at sol-3 dot de 2004-04-30 16:00 ` [Bug c++/15229] " duz at sol-3 dot de 2004-04-30 16:17 ` duz at sol-3 dot de 2004-04-30 16:18 ` duz at sol-3 dot de 2004-04-30 16:19 ` duz at sol-3 dot de 2004-04-30 17:01 ` duz at sol-3 dot de 2004-04-30 18:14 ` pinskia at gcc dot gnu dot org [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20040430172201.18870.qmail@sources.redhat.com \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).