Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Wu Zhou <woodzltc@cn.ibm.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC]: Document patch for F90 derived type support
Date: Thu, 02 Mar 2006 02:32:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.0603012121580.18903@localhost.localdomain> (raw)
In-Reply-To: <20060301193829.GD6465@nevyn.them.org>

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 <drow@false.org>
> > > Cc: Wu Zhou <woodzltc@cn.ibm.com>, 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
> 


  reply	other threads:[~2006-03-02  2:32 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-24  8:13 Wu Zhou
2006-02-24  8:34 ` Eli Zaretskii
2006-02-27  5:59   ` Wu Zhou
2006-02-28  6:43     ` Eli Zaretskii
2006-02-28 15:05       ` Daniel Jacobowitz
2006-02-28 20:09         ` Eli Zaretskii
2006-03-01  2:51           ` Wu Zhou
2006-03-01  4:32             ` Daniel Jacobowitz
2006-03-01  4:53               ` Eli Zaretskii
2006-03-01  5:05                 ` Daniel Jacobowitz
2006-03-01 19:02                   ` Eli Zaretskii
2006-03-01 19:38                     ` Daniel Jacobowitz
2006-03-02  2:32                       ` Wu Zhou [this message]
2006-03-02  4:36                         ` Eli Zaretskii
2006-03-02  4:40                           ` Daniel Jacobowitz
2006-03-03  9:09                             ` Wu Zhou
2006-03-02  4:25                       ` Eli Zaretskii
2006-03-02  4:27                         ` Daniel Jacobowitz
2006-03-01  4:51             ` Eli Zaretskii
2006-03-02  2:43               ` Wu Zhou
2006-03-02  3:22                 ` Daniel Jacobowitz
2006-03-02  4:38                   ` Eli Zaretskii
2006-03-02  4:37                 ` Eli Zaretskii

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=Pine.LNX.4.64.0603012121580.18903@localhost.localdomain \
    --to=woodzltc@cn.ibm.com \
    --cc=drow@false.org \
    --cc=gdb-patches@sourceware.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