Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Gabriel Dos Reis <gdr@codesourcery.com>
To: Jim Blandy <jimb@zwingli.cygnus.com>
Cc: gcc-patches@gcc.gnu.org, Daniel Berlin <dberlin@cygnus.com>,
	Michael Elizabeth Chastain <chastain@cygnus.com>,
	gdb-patches@sources.redhat.com
Subject: Re: [RFA] Extend demangler to recognize destructors/constructors
Date: Thu, 15 Mar 2001 01:15:00 -0000	[thread overview]
Message-ID: <fld7bj8kbk.fsf@sel.cmla.ens-cachan.fr> (raw)
In-Reply-To: <200103150901.EAA25623@zwingli.cygnus.com>

Stylistic notes.

Jim Blandy <jimb@zwingli.cygnus.com> writes:

[...]

| + 
| +   /* Set to non-zero iff this name is a constructor.  The actual value
| +      is '1', '2', or '3', indicating a complete object, base object,
| +      or complete object allocating constructor.  */
| +   int is_constructor;
| + 
| +   /* Set to non-zero iff this name is a destructor.  The actual value
| +      is '0', '1', or '2', indicating a deleting, complete object, or
| +      base object destructor.  */
| +   int is_destructor;

May I suggest use of enums to make it much more readable?  I realize
that makes  

       dm->is_destructor = peek_char (dm);

less straigthforward but will make use of

     int
     is_gnu_v3_mangled_constructor (const char *name)

and 
     int
     is_gnu_v3_mangled_destructor (const char *name)

self explanatory.


-- Gaby
CodeSourcery, LLC                       http://www.codesourcery.com


  reply	other threads:[~2001-03-15  1:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-15  1:00 Jim Blandy
2001-03-15  1:15 ` Gabriel Dos Reis [this message]
2001-03-15  8:44   ` [RFA] Extend demangler to recognizedestructors/constructors Mark Mitchell
2001-03-15 10:48 [RFA] Extend demangler to recognize destructors/constructors Jim Blandy
2001-03-15 10:58 Michael Elizabeth Chastain
2001-03-15 11:06 ` Alex Samuel

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=fld7bj8kbk.fsf@sel.cmla.ens-cachan.fr \
    --to=gdr@codesourcery.com \
    --cc=chastain@cygnus.com \
    --cc=dberlin@cygnus.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jimb@zwingli.cygnus.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