From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1195 invoked by alias); 2 Mar 2006 02:32:55 -0000 Received: (qmail 861 invoked by uid 22791); 2 Mar 2006 02:32:51 -0000 X-Spam-Check-By: sourceware.org Received: from ausmtp04.au.ibm.com (HELO ausmtp04.au.ibm.com) (202.81.18.152) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 02 Mar 2006 02:32:47 +0000 Received: from sd0208e0.au.ibm.com (d23rh904.au.ibm.com [202.81.18.202]) by ausmtp04.au.ibm.com (8.12.10/8.13.5) with ESMTP id k222dpsY199802 for ; Thu, 2 Mar 2006 13:39:51 +1100 Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.250.242]) by sd0208e0.au.ibm.com (8.12.10/NCO/VER6.8) with ESMTP id k222ZvIQ208050 for ; Thu, 2 Mar 2006 13:35:57 +1100 Received: from d23av01.au.ibm.com (loopback [127.0.0.1]) by d23av01.au.ibm.com (8.12.11/8.13.3) with ESMTP id k222WdVX001450 for ; Thu, 2 Mar 2006 13:32:39 +1100 Received: from [9.181.133.108] ([9.181.133.108]) by d23av01.au.ibm.com (8.12.11/8.12.11) with ESMTP id k222WaHV001372; Thu, 2 Mar 2006 13:32:38 +1100 Date: Thu, 02 Mar 2006 02:32:00 -0000 From: Wu Zhou To: Daniel Jacobowitz cc: gdb-patches@sourceware.org Subject: Re: [RFC]: Document patch for F90 derived type support In-Reply-To: <20060301193829.GD6465@nevyn.them.org> Message-ID: References: <20060228135310.GA25487@nevyn.them.org> <20060301043203.GA17621@nevyn.them.org> <20060301050501.GA18703@nevyn.them.org> <20060301193829.GD6465@nevyn.them.org> 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-03/txt/msg00035.txt.bz2 Maybe we can do this: case TYPE_CODE_INT: /* There may be some character types that attempt to come through as TYPE_CODE_INT since dbxstclass.h is so C-oriented, we must change these to "character" from "char". */ if (strcmp (TYPE_NAME (type), "char") == 0) fprintfi_filtered (level, stream, "character"); else fprintfi_filtered (level, stream, "integer (%d)", TYPE_LENGTH (type)); break; The basic idea is to let the TYPE_CODE (type) and TYPE_LENGTH (type) to determine what should be displayed. This might be inconsistent with what the compiler generats (there is also a benefit in this too, we don't need't adapt to all these different compilers, which might generate different names for these types). But it is acceptable by the programmer I believe. And also conform to the language standard. Any comment on this? Regards - Wu Zhou On Wed, 1 Mar 2006, Daniel Jacobowitz wrote: > On Wed, Mar 01, 2006 at 09:02:34PM +0200, Eli Zaretskii wrote: > > > Date: Wed, 1 Mar 2006 00:05:01 -0500 > > > From: Daniel Jacobowitz > > > Cc: Wu Zhou , gdb-patches@sources.redhat.com > > > > > > This is the same name that, e.g., gfortran probably uses in some > > > error messages. > > > > If "int4" is the official gfortran name (is it?), then I agree we > > should leave it alone. > > I'm not sure if "official" is really strong enough; I suspect it will > use it in some user messages, as well as in debug information. > > > > No, it can't be quite that simple, because current versions of Fortran > > > do support user-named types - "int4" does not necessarily imply > > > integer(4). > > > > Perhaps I'm confused: isn't "int4" a 32-bit integer? I thought it > > was, but if I was mistaken, my apologies for the noise. > > It's not reserved at all in the input to the compiler - it might be > something different than a type, or it might be the name of a record > type (whatever the correct name for that is). > > > > Paul also corrected me on the naming - this would be integer(4) > > > apparently, integer*4 is something different. > > > > Can you (or someone else) elaborate, or point me to some document that > > does? > > I believe integer(4) is an integer with kind == 4. Paul wrote: > > > integer(4) is the standard way, though the "4" has no particular meaning. > > integer*4 is a nonstandard (but common) extension saying "I want an > > integer 4 somthings wide". This may or may not be the same as integer(4). > > Make of that whatever you want to... > > -- > Daniel Jacobowitz > CodeSourcery >