Re: static_assert

2019-05-22 Thread Kamil Rytarowski
Perl is broken as it tries to detect C11 macro without compiler support. This patch is wrong. We shall not overwrite compiler builtins. It already caused enough issues in certain cases (like __func__ overload). On 22.05.2019 20:41, m...@netbsd.org wrote: > How is this for a proposed patch? > >

Re: static_assert

2019-05-22 Thread maya
How is this for a proposed patch? Provide a fallback definition for _Static_assert for when the compiler doesn't provide it (it doesn't have to for pre-C11). Fixes https://rt.perl.org/Public/Bug/Display.html?id=134023 Index: cdefs.h =

Re: static_assert

2019-05-22 Thread maya
perl is not broken. providing a broken macro and hoping nobody uses it on GCC is.

Re: static_assert

2019-05-22 Thread Kamil Rytarowski
of C and C++ in code in older ones, whenever it is supported by a compiler. If it is not supported or not handled, it's not our fault, but fault of a user. "clang++ -ansi" ships with _Static_assert, "g++ -ansi" doesn't. It's fine to use static_assert and det

static_assert

2019-05-22 Thread maya
This is definition is causing problems. Bug report: https://rt.perl.org/Ticket/Display.html?id=134023 Standalone test case: #!/bin/sh cat << EOF > AAAtest.cpp #include #ifndef static_assert #define static_assert theoretical fallback definition that doesnt happen #endif