public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com>
To: Mark Mitchell <mark@codesourcery.com>
Cc: Franz Sirl <Franz.Sirl-kernel@lauterbach.com>,
	"gcc@gcc.gnu.org" <gcc@gcc.gnu.org>,
	"Kevin B. Hendricks" <kevin.hendricks@sympatico.ca>,
	Jakub Jelinek <jakub@redhat.com>,
	"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: GCC 3.2
Date: Thu, 01 Aug 2002 14:42:00 -0000	[thread overview]
Message-ID: <wvl8z3qjlxc.fsf@prospero.cambridge.redhat.com> (raw)
In-Reply-To: <3000000.1028131037@gandalf.codesourcery.com> (Mark Mitchell's message of "Wed, 31 Jul 2002 08:57:17 -0700")

On Wed, 31 Jul 2002 08:57:17 -0700, Mark Mitchell <mark@codesourcery.com> wrote:

>> With this patch, the empty class passing hackery can go away, hurrah.
>
> Yay.
>
>> BTW, why do we use stubs for langhook defaults?  I would think leaving the
>> hook entry NULL would be more efficient for languages that are happy with
>> the default, as a comparison to zero is much cheaper than an indirect
>> jump...
>
> Well, what I would do is simply move the current expr_size_unit into the
> new hook.  Then, have the C++ hook call the generic hook if it doesn't
> want to override it.

Could do that, I suppose.

> + tree
> + cp_expr_size (exp)
> +      tree exp;
> + {
> +   if (CLASS_TYPE_P (TREE_TYPE (exp)))
> +     return CLASSTYPE_SIZE_UNIT (TREE_TYPE (exp));
> +   else
> +     /* Use the default code.  */
> +     return NULL_TREE;
> + }
>
> Isn't that the size without virtual base classes?  What if the expression
> is for a complete object with virtual bases?
>
> A good answer is that in that case the C++ front end will never present
> the back end with an expression like that requiring copying.  In that
> case, there should be an assert and a comment indicating that in
> cp_expr_size so that we can tell if we screw up.

Good thought.  Indeed, adding such an assert exposes a long-standing bug
with g++.bugs/900331_03.C where a SAVE_EXPR was causing us to bitwise copy
a class for which that is inappropriate.  Will fix.

> Overall, I think I'd rather we wait for 3.2.1 for this patch -- but then
> I think it's a good idea.

That's what I was thinking.  I'm also thinking to reserve the empty class
bits for the trunk, to be safe.

Jason

  reply	other threads:[~2002-08-01 21:42 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-27  1:01 Mark Mitchell
2002-07-27  1:28 ` Joe Buck
2002-07-27  1:30   ` Mark Mitchell
2002-07-27  3:30 ` Zack Weinberg
2002-07-29  4:26   ` Mark Mitchell
2002-07-29  5:00     ` Toon Moene
2002-07-27 16:26 ` Franz Sirl
2002-07-27 18:32   ` Jakub Jelinek
2002-07-30  6:49   ` Jason Merrill
2002-07-31  2:11     ` Jason Merrill
2002-07-31  5:05       ` Jason Merrill
2002-07-31  6:35       ` Neil Booth
2002-07-31  7:14       ` Neil Booth
2002-08-04 10:08         ` Joseph S. Myers
2002-07-31 10:45       ` Mark Mitchell
2002-08-01 14:42         ` Jason Merrill [this message]
2002-08-02  4:58           ` PATCH to avoid copying tail padding (was: GCC 3.2) Jason Merrill
2002-08-12  8:47   ` GCC 3.2 Jeff Law
2002-08-12 11:52     ` Jakub Jelinek
2002-08-12 13:14       ` Vladimir Makarov
2002-08-12 13:28       ` Jeff Law
2002-08-12 13:30         ` Jakub Jelinek
2002-08-12 16:42         ` Janis Johnson
2002-08-13  9:46           ` Jeff Law
2002-08-19 11:41             ` Phil Edwards
2002-08-20 21:38               ` Benjamin Kosnik
2002-08-21  4:31                 ` Kevin B. Hendricks
2002-08-21  9:56                   ` Benjamin Kosnik
2002-08-21 10:24                     ` Kevin B. Hendricks
2002-08-21 11:24                 ` Janis Johnson
2002-08-21 12:02                   ` Phil Edwards
2002-08-21 14:53                     ` Janis Johnson
2002-08-21 20:03                       ` Benjamin Kosnik
2002-07-27 22:19 Benjamin Kosnik
2002-07-28  9:40 ` Jakub Jelinek
     [not found] <Pine.LNX.4.33.0208041756450.30248-100000@kern.srcf.societies.cam.ac.uk>
2002-08-04 10:24 ` Gerald Pfeifer
2002-08-12 19:05 Benjamin Kosnik
2002-10-18 17:23 gcc 3.2 Udo Tremel
2002-10-18 18:08 ` Mike Stump

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=wvl8z3qjlxc.fsf@prospero.cambridge.redhat.com \
    --to=jason@redhat.com \
    --cc=Franz.Sirl-kernel@lauterbach.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=kevin.hendricks@sympatico.ca \
    --cc=mark@codesourcery.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).