[BusyBox] [PATCH] networking/ping.c
Vladimir N. Oleynik
dzo at simtreas.ru
Sat Feb 2 03:45:04 UTC 2002
Dan Kegel wrote:
>
> Erik Andersen wrote:
> >
> > On Thu Jan 31, 2002 at 10:50:58AM -0800, Matt Kraai wrote:
> > > On Thu, Jan 31, 2002 at 10:42:44AM -0800, Dan Kegel wrote:
> > > > Neal H Walfield wrote:
> > > > > > Why did you make noresp a nested function?
> > > > >
> > > > > It permits us to elide the global variables hostname in the
> > > > > CONFIG_FEATURE_FANCY_PING case.
> > > >
> > > > Is it me, or is someone else on crack here? Since when are
> > > > nested functions legal C?
> > >
> > > It looks like it is a GCC C extension[1]. Erik, is it OK to use
> > > these?
> >
> > We already use gcc-isms with __attribute__ tags and such, so
> > sure I don't see why any reason why not.
>
> The attribute tags could be finessed away with the preprocessor
> if someone really wanted to build busybox with a different compiler,
> but nested functions cannot.
> I've been using gcc since way back when, and I've *never* seen
> anyone use nested functions in C. This makes me suspect they're
> not well tested. And as if to prove that, on the gdb mailing list
> today, someone pointed to
> http://sources.redhat.com/ml/gdb-patches/2001-07/msg00714.html
> in a message about problems in gdb with nested functions.
>
> Take it from an old C hand: don't use this particular extension
> if you can help it. It would be much more trouble than it's worth.
As bearing some responsibility for a code of the networks utilites busybox
I can not keep silent.
I completely agree with you also to me the offered patch has not liked.
--w
vodz
More information about the busybox
mailing list