C/C++ FEs: Do we really need three char_type_nodes?
Richard Guenther
richard.guenther@gmail.com
Sat Sep 20 23:03:00 GMT 2008
On Fri, Sep 19, 2008 at 6:56 PM, Diego Novillo <dnovillo@google.com> wrote:
> On Fri, Sep 19, 2008 at 12:55, Jakub Jelinek <jakub@redhat.com> wrote:
>> On Fri, Sep 19, 2008 at 12:36:12PM -0400, Diego Novillo wrote:
>>> When we instantiate char_type_node in tree.c:build_common_tree_nodes
>>> we very explicitly create a char_type_node that is signed or unsigned
>>> based on the value of -funsigned-char, but instead of make
>>> char_type_node point to signed_char_type_node or
>>> unsigned_char_type_node, we explicitly instantiate a different type.
>>
>> C++ e.g. requires that char (c) is mangled differently from unsigned char
>> (h) and signed char (a), it is a distinct type.
>
> Thanks, that answer my question.
I suggest that we move these kind of "special" types creation to the
frontends and
stream out the declaration for LTO to pick it up (so we can LTO between
CUs that have different -fsigned/unsigned-char flags). Likewise we need to do
this for sizetype if we ever LTO Ada and C CUs for example.
Richard.
More information about the Gcc
mailing list