Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Fernando Nasser <fnasser@cygnus.com>
To: Michael Elizabeth Chastain <chastain@cygnus.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] testsuite/gdb.c++/cplusfuncs.cc: remove superfluous casts
Date: Thu, 31 May 2001 14:18:00 -0000	[thread overview]
Message-ID: <3B16B527.F27F5120@cygnus.com> (raw)
In-Reply-To: <200105312041.NAA12102@bosch.cygnus.com>

Michael Elizabeth Chastain wrote:
> 
> Here is a small patch to remove some superfluous casts from
> testsuite/gdb.c++/cplusfuncs.cc.
> 
> The casts are in a group of marker functions whose purpose is to help
> figure out which demangler is in use (v2 or v3).  When I originally wrote
> these marker functions, I made all the return types 'int' for uniformity.
> This uniformity is actually not needed; the test script is not even
> looking at this return type.  And it involves some pointer->integer
> casts which cause problems on some platforms.
> 
> Testing: I tested this on native Red Hat Linux 7 and native Solaris 2.8,
> with both gcc 2.95.3 and gcc 3pre 2001-05-25.  Kevin Buettner tested
> on ia64-unknown-linux with gcc 2.96.
> 
> OK to apply?
> 

Sure.

Thanks.

Fernando


> Michael Elizabeth Chastain
> <chastain@redhat.com>
> "love without fear"
> 
> ===
> 
> 2001-05-31  Michael Chastain  <chastain@redhat.com>
> 
>         * gdb.c++/cplusfuncs.cc (dm_type_char_star): Remove superfluous cast.
>         (dm_type_int_star): Likewise.
>         (dm_type_long_star): Likewise.
>         (dm_type_void_star): Likewise.
> 
> ===
> 
> Index: gdb/testsuite/gdb.c++/cplusfuncs.cc
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/cplusfuncs.cc,v
> retrieving revision 1.2
> diff -c -3 -p -r1.2 cplusfuncs.cc
> *** gdb/testsuite/gdb.c++/cplusfuncs.cc 2001/02/14 19:54:04     1.2
> --- gdb/testsuite/gdb.c++/cplusfuncs.cc 2001/05/31 19:43:38
> *************** int       hairyfunc7 (PFPFPc_i_PFl_i arg)       {
> *** 187,196 ****
>   /* gdb has two demanglers (one for g++ 2.95, one for g++ 3).
>      These marker functions help me figure out which demangler is in use. */
> 
> ! int   dm_type_char_star (char * p)            { return (int) p; }
>   int   dm_type_foo_ref (foo & foo)             { return foo.ifoo; }
> ! int   dm_type_int_star (int * p)              { return (int) p; }
> ! int   dm_type_long_star (long * p)            { return (int) p; }
>   int   dm_type_unsigned_int (unsigned int i)   { return i; }
>   int   dm_type_void (void)                     { return 0; }
> ! int   dm_type_void_star (void * p)            { return (int) p; }
> --- 187,196 ----
>   /* gdb has two demanglers (one for g++ 2.95, one for g++ 3).
>      These marker functions help me figure out which demangler is in use. */
> 
> ! char *        dm_type_char_star (char * p)            { return p; }
>   int   dm_type_foo_ref (foo & foo)             { return foo.ifoo; }
> ! int * dm_type_int_star (int * p)              { return p; }
> ! long *        dm_type_long_star (long * p)            { return p; }
>   int   dm_type_unsigned_int (unsigned int i)   { return i; }
>   int   dm_type_void (void)                     { return 0; }
> ! void *        dm_type_void_star (void * p)            { return p; }

-- 
Fernando Nasser
Red Hat - Toronto                       E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


      reply	other threads:[~2001-05-31 14:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-31 13:35 Michael Elizabeth Chastain
2001-05-31 14:18 ` Fernando Nasser [this message]

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=3B16B527.F27F5120@cygnus.com \
    --to=fnasser@cygnus.com \
    --cc=chastain@cygnus.com \
    --cc=gdb-patches@sources.redhat.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