[U-Boot] [PATCH] dlmalloc: Ignore gcc4.4 compiler warnings

Kumar Gala galak at kernel.crashing.org
Fri Aug 7 02:14:32 CEST 2009


On Jul 29, 2009, at 12:47 AM, Wolfgang Denk wrote:

> Dear Scott,
>
> In message <20090728225244.GA8187 at b07421-ec1.am.freescale.net> you  
> wrote:
>>
>> The patch title is bad -- it's not disabling warnings, it's  
>> disabling an
>> aspect of C99 that the code is incompatible with (and which is pretty
>> questionable in the first place with such low level code). Note  
>> that in
>> Linux, this is disabled for the entire kernel.
>
> I know. But Linux is bigger than U-Boot, and I think we should be able
> to fix the few isolated places that throw such warnings.
>
>> As things stand, GCC may do bad things with that code.  With this  
>> patch,
>> it may not (at least not this particular sort of bad thing).  Those  
>> bad
>> things are not limited to the places where it warns -- those are  
>> just the
>> violations it detected.
>
> Agreed, and that's why I want to see this fixed.

I can understand that desire, however it seems a lot of our platforms  
are already globally turning on -fno-strict-aliasing:

cpu/74xx_7xx/config.mk:PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi - 
fno-strict-aliasing
cpu/arm1136/config.mk:PLATFORM_RELFLAGS += -fno-strict-aliasing  -fno- 
common -ffixed-r8 \
cpu/arm1176/config.mk:PLATFORM_RELFLAGS += -fno-strict-aliasing  -fno- 
common -ffixed-r8 \
cpu/arm1176/s3c64xx/config.mk:PLATFORM_RELFLAGS += -fno-strict- 
aliasing  -fno-common -ffixed-r8 \
cpu/arm720t/config.mk:PLATFORM_RELFLAGS += -fno-strict-aliasing  -fno- 
common -ffixed-r8 \
cpu/arm920t/config.mk:PLATFORM_RELFLAGS += -fno-strict-aliasing  -fno- 
common -ffixed-r8 \
cpu/arm925t/config.mk:PLATFORM_RELFLAGS += -fno-strict-aliasing  -fno- 
common -ffixed-r8 \
cpu/arm926ejs/config.mk:PLATFORM_RELFLAGS += -fno-strict-aliasing  - 
fno-common -ffixed-r8 \
cpu/arm926ejs/davinci/config.mk:PLATFORM_RELFLAGS += -fno-strict- 
aliasing  -fno-common -ffixed-r8 \
cpu/arm946es/config.mk:PLATFORM_RELFLAGS += -fno-strict-aliasing  -fno- 
common -ffixed-r8 \
cpu/arm_cortexa8/config.mk:PLATFORM_RELFLAGS += -fno-strict-aliasing - 
fno-common -ffixed-r8 \
cpu/arm_cortexa8/omap3/config.mk:PLATFORM_RELFLAGS += -fno-strict- 
aliasing -fno-common -ffixed-r8 \
cpu/arm_intcm/config.mk:PLATFORM_RELFLAGS += -fno-strict-aliasing  - 
fno-common -ffixed-r8 \
cpu/ixp/config.mk:PLATFORM_RELFLAGS += -fno-strict-aliasing  -fno- 
common -ffixed-r8 \
cpu/lh7a40x/config.mk:PLATFORM_RELFLAGS += -fno-strict-aliasing  -fno- 
common -ffixed-r8 \
cpu/mpc824x/config.mk:PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi - 
fno-strict-aliasing
cpu/mpc8xx/config.mk:PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi - 
fno-strict-aliasing
cpu/ppc4xx/config.mk:PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi - 
fno-strict-aliasing
cpu/pxa/config.mk:PLATFORM_RELFLAGS += -fno-strict-aliasing  -fno- 
common -ffixed-r8 \
cpu/s3c44b0/config.mk:PLATFORM_RELFLAGS += -fno-strict-aliasing  -fno- 
common -ffixed-r8 \
cpu/sa1100/config.mk:PLATFORM_RELFLAGS += -fno-strict-aliasing  -fno- 
common -ffixed-r8 \

- k


More information about the U-Boot mailing list