From: Daniel Jacobowitz <drow@false.org>
To: Jim Blandy <jimb@codesourcery.com>
Cc: Joel Brobecker <brobecker@adacore.com>, gdb-patches@sources.redhat.com
Subject: Re: [RFC/RFA] Cleaner handling of character entities ?
Date: Mon, 15 May 2006 19:06:00 -0000 [thread overview]
Message-ID: <20060515171603.GE385@nevyn.them.org> (raw)
In-Reply-To: <vt264kknnzf.fsf@theseus.home.>
On Fri, May 05, 2006 at 02:47:00PM -0700, Jim Blandy wrote:
>
> Daniel Jacobowitz <drow@false.org> writes:
> > On Fri, May 05, 2006 at 12:40:02PM -0700, Jim Blandy wrote:
> >>
> >> Joel Brobecker <brobecker@adacore.com> writes:
> >> > We would be left with:
> >> >
> >> > * dwarf2read.c (read_base_type): Set code to TYPE_CODE_CHAR
> >> > for char and unsigned char types of Ada compilation units.
> >> > * ada-lang.c (ada_is_character_type): Always return true if
> >> > the type code is TYPE_CODE_CHAR.
> >> >
> >> > Would that be OK?
> >>
> >> Yeah, I think that sounds like the right thing.
> >
> > Alternatively, do we think we ought to be using TYPE_CODE_CHAR, and if
> > so, should we try it?
>
> If we do that, we're effectively signing up to go through GDB and make
> CHAR cases behave more like the INT cases. Which makes that code less
> likely to work properly in languages that really do distinguish the
> two.
Or more likely to work properly. Because C does not treat them the
same, the TYPE_CODE_CHAR case is fairly likely to be bitrotten anyway.
> I think we should reserve the TYPE_CODE_INT / TYPE_CODE_CHAR
> distinction for use in source languages that really make the
> distinction, and let languages where characters are just another kind
> of integer use TYPE_CODE_INT for everything.
Anyway, this is fine by me. However, in tdep files, we don't want to
make language distinctions. So, Joel, I think that a patch along the
lines of that changelog entry above is probably the way to go, but then
you may want to audit uses of TYPE_CODE_INT and TYPE_CODE_CHAR in
backends or else calling Ada procedures which take chars may not work
well.
[Sounds like a new testcase, doesn't it?]
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2006-05-15 17:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-05 18:24 Joel Brobecker
2006-05-05 18:29 ` Daniel Jacobowitz
2006-05-05 19:06 ` Joel Brobecker
2006-05-05 19:40 ` Jim Blandy
2006-05-05 19:48 ` Daniel Jacobowitz
2006-05-05 20:54 ` Joel Brobecker
2006-05-05 21:47 ` Jim Blandy
2006-05-15 19:06 ` Daniel Jacobowitz [this message]
2007-12-24 8:00 ` Joel Brobecker
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=20060515171603.GE385@nevyn.them.org \
--to=drow@false.org \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sources.redhat.com \
--cc=jimb@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