From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13598 invoked by alias); 9 Aug 2005 01:38:10 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 13207 invoked by uid 22791); 9 Aug 2005 01:38:02 -0000 Received: from [210.193.210.133] (HELO mx1.bravurasolutions.com.au) (210.193.210.133) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 09 Aug 2005 01:38:02 +0000 Content-class: urn:content-classes:message Subject: RE: Patch to bfd/aix5ppc-core.c for gdb-6.3 with gcc 4 on AIX5.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Tue, 09 Aug 2005 08:59:00 -0000 Message-ID: <4F3B985B8E683C45B8C5F76B7AAB5AE52591C5@EXCHANGE.bravurasolutions.local> From: "Rodney Brown" To: "Nick Clifton" Cc: , X-SW-Source: 2005-08/txt/msg00094.txt.bz2 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. */=20 =20 >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 =3D 5; =20=20=20=20=20=20=20=20 or this: char *p; ((int *) p)++; =20=20=20=20=20=20=20=20 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]=20 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=20 AIX5.1 system, so when I built a cross compiler the build system must=20 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=20 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