[U-Boot-Users] help with warnings and gcc-4.3.0

Kumar Gala galak at kernel.crashing.org
Thu May 29 18:31:28 CEST 2008


I'm building with a native ppc compiler (fedora 9 install) and I get:

dlmalloc.c:2444: warning: dereferencing type-punned pointer will break  
strict-aliasing rules
dlmalloc.c:2483: warning: dereferencing type-punned pointer will break  
strict-aliasing rules
dlmalloc.c:2483: warning: dereferencing type-punned pointer will break  
strict-aliasing rules
dlmalloc.c: In function 'realloc':
dlmalloc.c:2594: warning: dereferencing type-punned pointer will break  
strict-aliasing rules
dlmalloc.c:2599: warning: dereferencing type-punned pointer will break  
strict-aliasing rules
dlmalloc.c:2604: warning: dereferencing type-punned pointer will break  
strict-aliasing rules
dlmalloc.c:2605: warning: dereferencing type-punned pointer will break  
strict-aliasing rules
dlmalloc.c:2637: warning: dereferencing type-punned pointer will break  
strict-aliasing rules
dlmalloc.c:2646: warning: dereferencing type-punned pointer will break  
strict-aliasing rules
dlmalloc.c:2647: warning: dereferencing type-punned pointer will break  
strict-aliasing rules
dlmalloc.c: In function 'calloc':
dlmalloc.c:2896: warning: dereferencing type-punned pointer will break  
strict-aliasing rules
dlmalloc.c:2897: warning: dereferencing type-punned pointer will break  
strict-aliasing rules
dlmalloc.c: In function 'malloc_trim':
dlmalloc.c:2987: warning: dereferencing type-punned pointer will break  
strict-aliasing rules
dlmalloc.c:2997: warning: dereferencing type-punned pointer will break  
strict-aliasing rules
dlmalloc.c:3008: warning: dereferencing type-punned pointer will break  
strict-aliasing rules
dlmalloc.c:3012: warning: dereferencing type-punned pointer will break  
strict-aliasing rules
dlmalloc.c:3021: warning: dereferencing type-punned pointer will break  
strict-aliasing rules

The warnings seem to come from:

#define bin_at(i)      ((mbinptr)((char*)&(av_[2*(i) + 2]) - 2*SIZE_SZ))
#define next_bin(b)    ((mbinptr)((char*)(b) + 2 * sizeof(mbinptr)))
#define prev_bin(b)    ((mbinptr)((char*)(b) - 2 * sizeof(mbinptr)))
..

#define top            (bin_at(0)->fd)   /* The topmost chunk */
#define last_remainder (bin_at(1))       /* remainder from last split */


but I can't seem to do anything to bin_at() to make them stop.  Was  
wondering if anyone had any suggestions.

- k




More information about the U-Boot mailing list