From: Paolo Bonzini <bonzini@gnu.org>
To: Doug Gregor <doug.gregor@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [C++ PATCH] Battle of the comptypes (PR c++/35049)
Date: Thu, 07 Feb 2008 08:59:00 -0000 [thread overview]
Message-ID: <47AAC6D5.20805@gnu.org> (raw)
In-Reply-To: <24b520d20802050952v3e7ea05cn3d1b76fc188b5f89@mail.gmail.com>
> The fun comes in where the C/C++ common bits call comptypes with 2
> arguments (as they should), but that ends up calling the C++
> comptypes... with random data for the "strict" argument.
Summing up, we have:
C comptypes => C++ same_type_p
C lang_hooks.types_compatible_p => C++
same_type_ignoring_top_level_qualifiers_p
C++ lang_hooks.types_compatible_p => equivalence between pointers and
reference + same_type_ignoring_top_level_qualifiers_p
So I have an alternate plan:
1) bulk-rename the calls to comptypes in the C front-end to same_type_p
2) add an argument to the C comptypes that will always be COMPARE_STRICT
for C
3) move same_type_p, same_type_ignoring_top_level_qualifiers_p,
COMPARE_STRICT from cp-tree.h to c-common.h
I'm testing a patch.
For 4.4, additionally, we can add the C++ lang_hooks.types_compatible_p
special casing of pointers & references to the C langhook, thus killing
the C++ lang_hooks.types_compatible_p
Paolo
next prev parent reply other threads:[~2008-02-07 8:51 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-05 17:53 Doug Gregor
2008-02-06 15:51 ` H.J. Lu
2008-02-06 15:59 ` Doug Gregor
2008-02-06 16:48 ` H.J. Lu
2008-02-06 22:51 ` Andreas Tobler
2008-02-06 22:55 ` Manuel López-Ibáñez
2008-02-06 23:16 ` Andrew Pinski
2008-02-07 8:59 ` Paolo Bonzini [this message]
2008-02-07 13:46 ` [C/C++/ObjC/ObjC++ " Paolo Bonzini
2008-02-07 13:52 ` H.J. Lu
2008-02-07 14:59 ` Paolo Bonzini
2008-02-07 15:05 ` H.J. Lu
2008-02-07 15:07 ` Jakub Jelinek
2008-02-07 15:47 ` Richard Guenther
2008-02-07 15:57 ` Doug Gregor
2008-02-07 16:22 ` Paolo Bonzini
2008-02-07 15:07 ` Doug Gregor
2008-02-11 4:58 ` Mark Mitchell
2008-02-11 12:23 ` Joseph S. Myers
2008-02-11 13:33 ` Paolo Bonzini
2008-02-07 20:49 ` [C++ " Joseph S. Myers
2008-02-08 10:42 ` Paolo Bonzini
2008-02-08 15:49 ` Joseph S. Myers
2008-02-08 15:59 ` Doug Gregor
2008-02-08 16:37 ` Paolo Bonzini
2008-02-08 20:02 ` Joseph S. Myers
2008-02-07 18:54 ` Andreas Krebbel
2008-02-07 19:06 ` Doug Gregor
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=47AAC6D5.20805@gnu.org \
--to=bonzini@gnu.org \
--cc=doug.gregor@gmail.com \
--cc=gcc-patches@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: 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).