Silent GCC4.0 warning

Marius Groeger mgroeger at sysgo.com
Wed Sep 14 03:05:31 EDT 2005


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.

> 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. :-)

Regards,
Marius

-- 
Marius Groeger <mgroeger at sysgo.com>
SYSGO AG                      Embedded and Real-Time Software
Voice: +49 6136 9948 0                  FAX: +49 6136 9948 10
www.sysgo.com | www.elinos.com | www.osek.de | www.pikeos.com





More information about the linux-mtd mailing list