Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Wu Zhou <woodzltc@cn.ibm.com>
Cc: gdb-patches@sources.redhat.com, Thomas.Koenig@online.de
Subject: Re: [RFC]: Patch to support Fortran derived type - Revised
Date: Thu, 08 Dec 2005 10:33:00 -0000	[thread overview]
Message-ID: <20051207232541.GB7483@nevyn.them.org> (raw)
In-Reply-To: <Pine.LNX.4.63.0511161454200.21051@linux.site>

On Wed, Nov 16, 2005 at 03:20:18PM +0800, Wu Zhou wrote:
> Hello all,
> 
> I revised the patch to add derived type support.  Now it can print 
> the nested type such like this:
> 
> Type foo
>     int4 :: a
>     Type bar
>         real :: b
>     End Type bar :: x
> End Type foo
> 
> It could also handle the member access like q%x%b.  So I think it is 
> better than before.  Any more place is needed to be improved, please let 
> me know.  Here is the patch:

Hi Wu, sorry about the delay.  Just a couple of small comments.  First
of all, I'd prefer not to approve this without documentation and a
testcase.

> 2005-11-16  Wu Zhou  <woodzltc@cn.ibm.com>
> 
> 	* f-exp.y: Symbol '%' is not used as modular operator in Fortran.
> 	Delete this from Fortran expression. 
> 	It is now used by Fortran 95 to access the member of derived type.
> 	Add this into Fortran expression.

You want "is not used as the modulus operator" here, I believe.  There's
a "modular operator" also, which seems to be something complicated in
operator theory - completely different.

> +name	:	NAME
> +		{  $$ = $1.stoken; }
> +	;
> +

Why not just use name_not_typename instead of adding "name"?

Also, the comments in name_not_typename don't apply here; you could
also handle exp : exp % NAME_OR_INT as a name.  But, I don't think that
adds much value.  The whole NAME_OR_INT thing seems like overkill.

> +      /* Starting from Fortran 90 standard, Fortran language began to support
> +         derived type. The type code is TYPE_CODE_STRUCT.  */

/* Starting from the Fortran 90 standard, Fortran supports derived
   types.  */

Two periods after period, please :-)  I think you can skip mentioning
TYPE_CODE_STRUCT, since it's the case label.

> +print_equivalent_f77_float_type (int level, struct type *type, struct ui_file *stream)

Needs to be wrapped.

The rest looks fine.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


  parent reply	other threads:[~2005-12-07 23:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-16 10:35 Wu Zhou
2005-11-16 14:16 ` Eli Zaretskii
2005-11-22 19:21   ` Wu Zhou
2005-11-22  9:36     ` Wu Zhou
2005-11-22 19:20       ` Daniel Jacobowitz
2005-11-23 13:06         ` Wu Zhou
2005-11-23  2:52     ` Eli Zaretskii
2005-12-08 10:33 ` Daniel Jacobowitz [this message]
2005-12-08 14:24   ` Eli Zaretskii
2005-12-08 19:22     ` Daniel Jacobowitz
2005-12-11 17:15   ` Wu Zhou
2005-12-11 23:40     ` Eli Zaretskii
2006-02-20 16:10     ` Daniel Jacobowitz
2006-02-24  7:53       ` Wu Zhou

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=20051207232541.GB7483@nevyn.them.org \
    --to=drow@false.org \
    --cc=Thomas.Koenig@online.de \
    --cc=gdb-patches@sources.redhat.com \
    --cc=woodzltc@cn.ibm.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