Re: GCC nested functions?

From: William Lee Irwin III
Date: Wed May 12 2004 - 13:22:00 EST


On Wed, May 12, 2004 at 10:59:24AM -0700, Stephen Hemminger wrote:
> I used GCC nested functions in the (not released) bridge sysfs
> interface for 2.6.6. It seemed like a nice way to express the sysfs
> related interface without doing lots of code copying (or worse lots
> of macros).

Upward funargs are rather easy to trip over (though you haven't tripped
over them) and the runtime shits itself badly on all architectures when
they happen. It's too dangerous to be allowed to be used.

The code you posted doesn't really have a reason to use nested functions
(i.e. downward funargs aren't being used).


-- wli
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/