------- Comment #10 from howarth at nitro dot med dot uc dot edu 2009-03-14 22:50 ------- Interestingly the suggestion in Comment 6 introduces the new warning...
endianswap.h: In function 'swap4_aligned': endianswap.h:113: warning: pointer targets in initialization differ in signedness endianswap.h: In function 'swap8_aligned': endianswap.h:130: warning: pointer targets in initialization differ in signedness which I am able to suppress with the change... --- endianswap.h.org 2009-03-14 18:40:23.000000000 -0400 +++ endianswap.h 2009-03-14 18:40:59.000000000 -0400 @@ -110,7 +110,7 @@ /* Only works with aligned 4-byte quantities, will cause a bus error */ /* on some platforms if used on unaligned data. */ static void swap4_aligned(void *v, long ndata) { - my_aliased_int *data = (int *) v; + my_aliased_int *data = (my_aliased_int *) v; long i; my_aliased_int *N; for (i=0; i<ndata; i++) { @@ -127,7 +127,7 @@ /* Use int* internally to prevent bugs caused by some compilers */ /* and hardware that would potentially load data into an FP reg */ /* and hose everything, such as the old "jmemcpy()" bug in NAMD */ - my_aliased_int *data = (int *) v; + my_aliased_int *data = (my_aliased_int *) v; long i; my_aliased_int *N; Does the use of the mayalias attribute really change the sign of an int or is this some artifact in the warnings generated by gcc trunk? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39460