On Sun, Mar 01, 2020 at 10:26:08PM +0100, Kamil Rytarowski wrote: > On 01.03.2020 19:31, Joerg Sonnenberger wrote: > > On Sun, Mar 01, 2020 at 03:08:16PM +0000, Kamil Rytarowski wrote: > >> Module Name: src > >> Committed By: kamil > >> Date: Sun Mar 1 15:08:16 UTC 2020 > >> > >> Modified Files: > >> src/include: stddef.h > >> > >> Log Message: > >> Expose max_align_t to C99/C++ > > > > Please revert this immediately. It is just wrong. > > > > Rationale? libc++ does not work and I perceive insisting it as a losing > battle and and zero gain.
As you do know, there is a patch for libc++ under review to fix this properly. It is even generally agreed that the current behavior is a bug. Your patch broke well defined C++03 programs. > >> This problem does not exist on OSs like Linux as they get this namespace > >> visibility defined inside LLVM or GNU toolchain headers. NetBSD ships with > >> its own stddef.h, rather than relying on a toolchain and its internal > >> extensions. > > > > This is incorrect as well. > > > > No stddef.h in GLIBC is a matter of fact. $ printf '#include <stddef.h>\nmax_align_t foo;' | clang++ -std=c++03 -x c++ - <stdin>:2:1: error: unknown type name 'max_align_t' $ printf '#include <stddef.h>\nmax_align_t foo;' | g++ -std=c++03 -x c++ - <stdin>:2:1: error: ‘max_align_t’ does not name a type Joerg