From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6898 invoked by alias); 5 May 2006 21:47:09 -0000 Received: (qmail 6887 invoked by uid 22791); 5 May 2006 21:47:06 -0000 X-Spam-Check-By: sourceware.org Received: from intranet.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.6) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 05 May 2006 21:47:03 +0000 Received: (qmail 16130 invoked from network); 5 May 2006 21:47:01 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 5 May 2006 21:47:01 -0000 To: Joel Brobecker Cc: gdb-patches@sources.redhat.com Subject: Re: [RFC/RFA] Cleaner handling of character entities ? References: <20060505182351.GK1109@adacore.com> <20060505182852.GL31029@nevyn.them.org> <20060505190625.GA1042@adacore.com> <20060505194846.GO31029@nevyn.them.org> From: Jim Blandy Date: Fri, 05 May 2006 21:47:00 -0000 In-Reply-To: <20060505194846.GO31029@nevyn.them.org> (Daniel Jacobowitz's message of "Fri, 5 May 2006 15:48:46 -0400") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00110.txt.bz2 Daniel Jacobowitz writes: > On Fri, May 05, 2006 at 12:40:02PM -0700, Jim Blandy wrote: >> >> Joel Brobecker 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. 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.