Silent GCC4.0 warning

Jörn Engel joern at wohnheim.fh-wedel.de
Wed Sep 14 05:26:34 EDT 2005


On Wed, 14 September 2005 09:05:31 +0200, Marius Groeger wrote:
> On Wed, 14 Sep 2005, Jörn Engel wrote:
> 
> >Rejected.  Examplary reasons below...
> 
> Unless you feel your comments are insignificant, please don't put them 
> below the sigdashes "-- <NL>". Otherwise good Mailers will strip them 
> in the reply.

Good point.  Sorry about that.

> >In principle, I'd like a patch to silence gcc warnings.  But only when
> >the patch actually improves code quality.  If I get to choose between
> >bad code and compiler warnings, I'll pick the warning.
> [...]
> >> -                     unsigned long *datum = ebuf + i;
> >> +                     unsigned long *datum = (unsigned long *)((char*)
> >ebuf + i);
> >
> >Arithmetic with void* pointers is one of the best gcc extensions.  Use
> >it!  The above is obviously correct, while below makes my brain rotate
> >around itself at dangerous speed.
> 
> If I get to choose between portable code and some remote developers 
> brain rotation, I'll pick the portable code. :-)

It's a good thing that we both agree on this.  :)

Is anyone actually using JFFS2 with a non-gcc compiler?  Intel's
compiler counts as gcc-compatible here, they included all gcc
extensions used in the kernel, for obvious reasons.

Jörn

-- 
I don't understand it. Nobody does.
-- Richard P. Feynman




More information about the linux-mtd mailing list