This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Remove nested function in elf/dl-lookup.c.
- From: Rich Felker <dalias at aerifal dot cx>
- To: Carlos O'Donell <carlos at redhat dot com>
- Cc: Roland McGrath <roland at hack dot frob dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 12 Feb 2014 21:26:06 -0500
- Subject: Re: [PATCH] Remove nested function in elf/dl-lookup.c.
- Authentication-results: sourceware.org; auth=none
- References: <52FBDC5F dot 4010908 at redhat dot com> <Pine dot LNX dot 4 dot 64 dot 1402122049000 dot 12558 at digraph dot polyomino dot org dot uk> <52FBE74C dot 4070805 at redhat dot com> <20140212230529 dot C8F6174417 at topped-with-meat dot com> <52FC0155 dot 3090209 at redhat dot com>
On Wed, Feb 12, 2014 at 06:18:45PM -0500, Carlos O'Donell wrote:
> On 02/12/2014 06:05 PM, Roland McGrath wrote:
> > I completely disagree that this improves readability or maintainability in
> > any way. But I won't object.
>
> Bug 8300 - no local symbol information within nested or nesting procedures
> https://sourceware.org/bugzilla/show_bug.cgi?id=8300
>
> Bug 53927 - wrong value for DW_AT_static_link
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53927
>
> If the above two bugs get fixed I'll consider having another discussion
> about nested functions.
I completely agree that removing nested functions improves
readability. The first time I saw this code it was a pain to make
sense of it. I do not think most people are familiar with GCC nested
functions, and they are unsafe to use unless you can be sure that they
will be inlined (if not, they require executable stack) which is a
very good reason for nobody to even bother learning that they exist.
Rich