public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug dynamic-link/27220] New: Migrate away from nested functions
@ 2021-01-20 19:33 i at maskray dot me
  2021-01-20 20:04 ` [Bug dynamic-link/27220] " carlos at redhat dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: i at maskray dot me @ 2021-01-20 19:33 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=27220

            Bug ID: 27220
           Summary: Migrate away from nested functions
           Product: glibc
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: dynamic-link
          Assignee: unassigned at sourceware dot org
          Reporter: i at maskray dot me
  Target Milestone: ---

Some files use this obscure GCC feature 
https://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html

Most of them are loader code. These instances are likely the biggest problem
preventing glibc from being built with Clang.

posix/regcomp.c
nss/makedb.c
elf/do-rel.h
elf/dynamic-link.h
elf/get-dynamic-info.h
elf/dl-reloc-static-pie.c
elf/dl-reloc.c
elf/dl-conflict.c
elf/rtld.c
sysdeps/aarch64/dl-machine.h
sysdeps/x86_64/dl-machine.h
sysdeps/powerpc/powerpc64/dl-machine.h

For many instances, migrating away from nested functions is a clear readability
win, even for GCC, e.g. a #include "dynamic-link.h" in the middle of
elf/dl-reloc.c , which uses RESOLVE_MAP/RESOLVE/RESOLVE_CONFLICT_FIND_MAP
defined above.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-04-13 23:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-20 19:33 [Bug dynamic-link/27220] New: Migrate away from nested functions i at maskray dot me
2021-01-20 20:04 ` [Bug dynamic-link/27220] " carlos at redhat dot com
2021-01-21 18:23 ` stanshebs at earthlink dot net
2021-01-21 19:39 ` carlos at redhat dot com
2021-01-22 14:21 ` tbaeder at redhat dot com
2021-08-23  4:37 ` i at maskray dot me
2022-04-12 17:55 ` carlos at redhat dot com
2023-04-13 20:22 ` carlos at redhat dot com
2023-04-13 20:37 ` adhemerval.zanella at linaro dot org
2023-04-13 23:02 ` i at maskray dot me

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).