Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Rodney Brown" <rbrown@bravurasolutions.com.au>
To: "Nick Clifton" <nickc@redhat.com>
Cc: <gdb-patches@sources.redhat.com>, <binutils@sources.redhat.com>
Subject: RE: Patch to bfd/aix5ppc-core.c for gdb-6.3 with gcc 4 on AIX5.1
Date: Tue, 09 Aug 2005 08:59:00 -0000	[thread overview]
Message-ID: <4F3B985B8E683C45B8C5F76B7AAB5AE52591C5@EXCHANGE.bravurasolutions.local> (raw)

gdb-6.3 builds fine with this patch.

I'd reword the comment a little.

!   /* The core_hdr() macro is not used here because it would be
!      casting the LHS of an assignment and some versions of gcc
!      will generate a warning for this.  */ 
 
From http://gcc.gnu.org/gcc-3.4/changes.html

The cast-as-lvalue extension has been removed for C++ and deprecated for
C and Objective-C. In particular, code like this:

        int i;
        (char) i = 5;
        
or this:

        char *p;
        ((int *) p)++;
        
is no longer accepted for C++ and will not be accepted for C and
Objective-C in a future version.

So maybe

The core_hdr() macro is no longer used here because it would
expand to code relying on gcc's cast-as-lvalue extension, removed in gcc
4.0.

Don't know,
Thanks

-----Original Message-----
From: Nick Clifton [mailto:nickc@redhat.com] 
Sent: Monday, 8 August 2005 10:34 PM
To: Rodney Brown
Cc: gdb-patches@sources.redhat.com; binutils@sources.redhat.com
Subject: Re: Patch to bfd/aix5ppc-core.c for gdb-6.3 with gcc 4 on
AIX5.1

Hi Rodney,

> Are you using a gcc 4.1 development compiler?

Yes - but I am not compiling under AIX.  I do not have access to an 
AIX5.1 system, so when I built a cross compiler the build system must 
have left out the core file support.  Silly me.

> I assumed that using the accessor macro was the preferred mechanism.

It is, but when the macro is tied to a single particular function it 
really ought to be defined inside the function.  That way if the code is

ever rearranged it will not be lost.

So - what do you think of the attached, simplified patch ?  If it fixes
the compile time warning then I would be happy to check it in.

Cheers
   Nick



             reply	other threads:[~2005-08-09  1:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-09  8:59 Rodney Brown [this message]
2005-08-09 16:37 ` Nick Clifton
  -- strict thread matches above, loose matches on Subject: below --
2005-08-03  2:25 Rodney Brown
2005-08-08 12:28 ` Nick Clifton
2005-07-15  9:17 Rodney Brown
2005-08-02 10:59 ` Nick Clifton

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=4F3B985B8E683C45B8C5F76B7AAB5AE52591C5@EXCHANGE.bravurasolutions.local \
    --to=rbrown@bravurasolutions.com.au \
    --cc=binutils@sources.redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=nickc@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