This is the mail archive of the
mailing list for the glibc project.
Re: [WIP] Remove nested function in elf/dl-lookup.c? (Nested functions considered harmful?)
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Carlos O'Donell <carlos at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Sat, 14 Dec 2013 18:08:18 +0100
- Subject: Re: [WIP] Remove nested function in elf/dl-lookup.c? (Nested functions considered harmful?)
- Authentication-results: sourceware.org; auth=none
- References: <52AC8036 dot 7000300 at redhat dot com>
On Sat, Dec 14, 2013 at 10:58:46AM -0500, Carlos O'Donell wrote:
> Is it me or does reading do_lookup_x get very very complicated
> with the nested function check_match which has access to all
> sorts of function local variables?
> I'm always suspicious of nested functions like this as bad
> programming form since it complicates reading the function.
> Is anyone opposed to rewriting this with a non-nested function
> that clearly shows which arguments are constant, and which are
I am for that. Could you show that in this is only refactoring, when
do_lookup_x is always_inlined then both binaries should be same.