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?
>
>
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
=
perl is not broken. providing a broken macro and hoping nobody uses it
on GCC is.
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
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