[BusyBox] Re: ifconfig: Clean up. [PATCH]
Bernd Petrovitsch
bernd at firmix.at
Mon Jul 25 08:31:57 UTC 2005
On Sun, 2005-07-24 at 21:23 -0500, Rob Landley wrote:
> On Sunday 24 July 2005 21:08, Jason Schoon wrote:
> > I agree about reducing the ifdefs, but I always feel a bit leery about
> > relying on the compiler to remove dead code. This isn't relevent for
> > Busybox, but in my other code I always use lint, which throws annoying
> > warnings on things like that.
That's actually a reason for using "if(flag)" since the C-code in there
gets parsed everytime - even if the flag is "false".
> Busybox isn't 100% Linux dependent, but we generally assume a roughly
> equivalent build environment. The Linux kernel relies _heavily_ on dead code
> elimination instead of #ifdefs, and any compiler created in the last 20 years
The kernel targets only gcc as compiler and relys heavily on certain
gcc-defined features.
AFAIK I don't think that busybox wants to be that gcc-centric.
> should be capable of doing dead code elimination. (Heck, even TCC can do it
> now.)
gcc-2 had the bug, that constant text strings in dead code (which are
otherwise not used) were not removed.
> And yes, people have come to rely on this, the Linux kernel case in point, but
> by no means the only one. Any Lint tool so old and decrepit it doesn't
> understand that people actually _use_ widely available compiler features
> isn't necessarily all that useful anymore. (I could still be convinced
> either way, but I know where I'm leaning...)
With gcc und it's armada of warnings and checks you basically do not
need any lint anymore. Or is there a pretty usable and decent lint which
checks much more than gcc?
Historically there was lint because the C-compilers were pretty generous
(and erronous BTW).
But whom I'm talking to?;-)
Bernd
--
Firmix Software GmbH http://www.firmix.at/
mobil: +43 664 4416156 fax: +43 1 7890849-55
Embedded Linux Development and Services
More information about the busybox
mailing list