public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: navin p <navinp1281@gmail.com>
Cc: Oleg Endo <oleg.endo@t-online.de>, gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: g++ compiler generated copy constructor
Date: Tue, 12 Aug 2014 09:44:00 -0000	[thread overview]
Message-ID: <CAH6eHdTsdXAieg=KqXw58p3NrGiLyFAS9USfF-GW1dP3+7zRuA@mail.gmail.com> (raw)
In-Reply-To: <CAKVd3pWxp-g+kuRu9McfS+WqDaBokQMGBVeZ0DOHQsFZ=4SwsA@mail.gmail.com>

On 11 August 2014 23:41, navin p wrote:
> Hi,
>    I'm maintaining an old C++ library code (written in around 2002) ,
> I get segfaults in constructor. The default constructors are generated
> by the compiler. When i compile the program with
> fno-elide-constructors it works without any problem ie it runs fine. I
> want to see what is happening with the constructor and why it is
> segfaulting. It is probably the RVO kicking in and changing the
> reference counting the library implements.

What an implicitly-defined constructor does is entirely mechanical,
you shouldn't need to read it to know what it does.

      reply	other threads:[~2014-08-12  9:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-11 17:54 navin p
2014-08-11 18:18 ` Jędrzej Dudkiewicz
2014-08-11 19:15 ` Oleg Endo
2014-08-11 22:41   ` navin p
2014-08-12  9:44     ` Jonathan Wakely [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='CAH6eHdTsdXAieg=KqXw58p3NrGiLyFAS9USfF-GW1dP3+7zRuA@mail.gmail.com' \
    --to=jwakely.gcc@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=navinp1281@gmail.com \
    --cc=oleg.endo@t-online.de \
    /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: link
Be 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).