This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add wcharP.h to hide internal wchar functions [BZ #18822]


On 11/25/2017 01:13 AM, H.J. Lu wrote:

diff --git a/sysdeps/generic/wcharP.h b/sysdeps/generic/wcharP.h
new file mode 100644
index 0000000000..1a37283bf1
--- /dev/null
+++ b/sysdeps/generic/wcharP.h
@@ -0,0 +1,18 @@
+/* Internal prototrypes for multibyte and wide character functions.

Typo (in all files).

I think this is architecturally wrong.

We should enhance the toolchain to do this kind of optimization automatically (maybe using LTO?). Or find another way to implement the markup in a more centralized fashion, so that once you define an IFUNC resolver, the necessary arrangements to avoid a direct call are performed automatically.

In any case, these files need documentation what exactly you are trying to do. The wcharP.h name does not match existing usage of *P.h headers. The intent here seems to be not to add any new declarations to wcharP.h, only optimize existing declarations.

It's also not clear why you need to replicate ___atribute_pure__ in those declarations.

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]