Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Siva Chandra <sivachandra@google.com>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH 4/4] PR c++/13403 and PR c++/15154: Fix gnuv3_pass_by_reference to treat dynamic classes as non-trivial
Date: Tue, 14 Oct 2014 21:01:00 -0000	[thread overview]
Message-ID: <21565.36622.673293.934684@ruffy2.mtv.corp.google.com> (raw)
In-Reply-To: <CAGyQ6gw+4OZgoaj3P+Nv+wjTKqCtde_zZ9nP9qDLfd4wxFsYpA@mail.gmail.com>

Siva Chandra writes:
 > On Mon, Sep 29, 2014 at 1:08 AM, Doug Evans <dje@google.com> wrote:
 > >> 2014-09-11  Siva Chandra Reddy  <sivachandra@google.com>
 > >>
 > >>         * gnu-v3-abi.c (gnuv3_pass_by_reference): Treat dynamic classes
 > >>         as non-trivial.
 > >
 > > This looks ok to me.
 > > I couldn't find anything in the ABI to guide me (could certainly have
 > > missed it), though it seems reasonable and it does fix the testcase.
 > 
 > The ABI defers the definition of triviality of copy constructors and
 > destructors to the C++ 98 final draft standard. The point under
 > question in this patch is under -6- here:
 > http://www.kouzdra.org/page/docs/isocpp/special.html#class.copy

Ah.  Thanks for the reference.

LGTM with one nit.

It'd be really nice to include a reference to the spec here.
I don't know about others, but this stuff is not the kind of
thing I tend to keep in cache, and when reading such code
it's really nice to be able to find the relevant sections
of the spec without any effort.

Does the following make sense?

+  /* A dynamic class has a non-trivial copy constructor.
+     See c++98 section 12.8 Copying class objects [class.copy].  */
+  if (gnuv3_dynamic_class (type))
+    return 1;
+


  reply	other threads:[~2014-10-14 21:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-11 18:38 Siva Chandra
2014-09-29  8:08 ` Doug Evans
2014-09-29 22:29   ` Siva Chandra
2014-10-14 21:01     ` Doug Evans [this message]
2014-10-15  1:10       ` Siva Chandra

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=21565.36622.673293.934684@ruffy2.mtv.corp.google.com \
    --to=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=sivachandra@google.com \
    /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