This is the mail archive of the gdb-prs@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]

build/2404: gdb 6.7.1 fails to build with gcc-4.2.2 on aix 5.2


>Number:         2404
>Category:       build
>Synopsis:       gdb 6.7.1 fails to build with gcc-4.2.2 on aix 5.2
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 15 14:48:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     T.Mittelstaedt@cadenas.de
>Release:        gdb 6.7.1
>Organization:
>Environment:
tmstaedt@buildaix3$ gcc -v
Using built-in specs.
Target: powerpc-ibm-aix5.2.0.0
Configured with: ../gcc-4.2.2/configure --enable-version-specific-runtime-libs --enable-static --enable-shared --enable-threads --with-as=/usr/bin/as --without-gnu-ld --with-ld=/usr/bin/ld --prefix=/opt/gcc-4.2.2 --disable-nls --with-pic --disable-symvers --enable-symvers=no --enable-languages=c,c++,objc
Thread model: aix
gcc version 4.2.2
>Description:
gdb 6.7.1 fails to build with gcc-4.2.2 on aix 5.2

"warning: dereferencing type-punned pointer will break strict-aliasing rules"

gdb/aix-thread.c is compiled with -Werror and calls to
ptrace32 (PTT_READ_FPRS, tid, (int *) fprs, 0, NULL))

will cause above warnings to cause build failure

replaced the (int *) casts with (void*)
>How-To-Repeat:

>Fix:
diff gdb/aix-thread.c~ gdb/aix-thread.c
366c366,367
<       if (!ptrace32 (PTT_READ_FPRS, tid, (int *) fprs, 0, NULL))
---
>       int *pfprs = (void *)fprs;
>       if (!ptrace32 (PTT_READ_FPRS, tid, pfprs, 0, NULL))
437c438
< 	  ptrace32 (PTT_WRITE_SPRS, tid, (int *) &context->msr, 0, NULL);
---
> 	  ptrace32 (PTT_WRITE_SPRS, tid, (void *) &context->msr, 0, NULL);
987c988
< 		     target_signal_to_host (sig), (int *) tid);
---
> 		     target_signal_to_host (sig), (void *) tid);
990c991
< 		  target_signal_to_host (sig), (int *) tid);
---
> 		  target_signal_to_host (sig), (void *) tid);
1228c1229
<       if (!ptrace32 (PTT_READ_FPRS, tid, (int *) fprs, 0, NULL))
---
>       if (!ptrace32 (PTT_READ_FPRS, tid, (void *) fprs, 0, NULL))
1542c1543
<       ptrace32 (PTT_READ_FPRS, tid, (int *) fprs, 0, NULL);
---
>       ptrace32 (PTT_READ_FPRS, tid, (void *) fprs, 0, NULL);
1544c1545
<       ptrace32 (PTT_WRITE_FPRS, tid, (int *) fprs, 0, NULL);
---
>       ptrace32 (PTT_WRITE_FPRS, tid, (void *) fprs, 0, NULL);
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="aix-thread.c.diff"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="aix-thread.c.diff"


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