Patch to bfd/aix5ppc-core.c for gdb-6.3 with gcc 4 on AIX5.1
Tue Aug 9 01:38:00 GMT 2005
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. */
The cast-as-lvalue extension has been removed for C++ and deprecated for
C and Objective-C. In particular, code like this:
(char) i = 5;
((int *) p)++;
is no longer accepted for C++ and will not be accepted for C and
Objective-C in a future version.
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
From: Nick Clifton [mailto:firstname.lastname@example.org]
Sent: Monday, 8 August 2005 10:34 PM
To: Rodney Brown
Cc: email@example.com; firstname.lastname@example.org
Subject: Re: Patch to bfd/aix5ppc-core.c for gdb-6.3 with gcc 4 on
> 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.
More information about the Binutils