This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Patch to bfd/aix5ppc-core.c for gdb-6.3 with gcc 4 on AIX5.1


Are you using a gcc 4.1 development compiler? Has the assertion on
casts in the left-hand side of assignments weakened?

bash-3.00$ uname -a
AIX bullwinkle 1 5 0052570A4C00
bash-3.00$ gcc -v	# configured and built on the box
Using built-in specs.
Target: powerpc-ibm-aix5.1.0.0
Configured with: ../gcc-4.0.1/configure 
Thread model: aix
gcc version 4.0.1

I assumed that using the accessor macro was the preferred mechanism.
The error lines & compile are from the build.log - with the compile
line wrapped to 80 char.
 
-----Original Message-----
From: Nick Clifton [mailto:nickc@redhat.com] 
Sent: Tuesday, 2 August 2005 9:05 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,

> powerpc-ibm-aix5.1.0.0 gcc version 4.0.1

> ../../gdb-6.3/bfd/aix5ppc-core.c: In function 'xcoff64_core_p':
> ../../gdb-6.3/bfd/aix5ppc-core.c:120: error: invalid lvalue in
> assignment

I am unable to reproduce this failure :-(

> 2005-07-12  Rodney Brown  <rbrown@bravurasolutions.com.au>
> 
> 	* aix5ppc-core.c (core_hdr): #define as LHS varient.
> 	(xcoff64_core_p): Constify return_value variable.

I am hesitant to apply a patch which does not appear to be needed.

> -#define	core_hdr(abfd)		((struct core_dumpxx *)
> abfd->tdata.any)
> +#define	core_hdr(abfd)		(abfd->tdata.any)	/* gcc 4
> support */

Is this necessary.  You could just alter the use of core_hdr() in 
xcoff64_core_p() and leave the macro alone.

Cheers
   Nick



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]