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

Scott Wood scottwood at freescale.com
Wed Jul 29 00:52:44 CEST 2009


On Sun, Jul 26, 2009 at 11:26:18PM +0200, Wolfgang Denk wrote:
> Dear Kenneth Johansson,
> 
> In message <1248453626.8967.27.camel at localhost.localdomain> you wrote:
> >
> > > Well, if you think fixing the problems is "paper taping over the
> > > issue", then how do you call NOT fixing the problems and shutting off
> > > the warnings?
> > 
> > Well he removed the optimization so the problem is no longer a problem.
> 
> Of course it still is a problem. It has NOT been fixed - just hushed
> up.

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.

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.

Do you have an alternative malloc implementation in mind that is designed
to work with strict aliasing, or a suggested fix to the current one?

-Scott


More information about the U-Boot mailing list