https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93469

--- Comment #8 from Karen <karen.arutyunov at gmail dot com> ---
Thanks for the explanation.

In fact it doesn't work even for -D_XOPEN_SOURCE=700 as the latest POSIX
edition doesn't specify the aligned_alloc function.

On the other hand I don't observe that _XOPEN_SOURCE affects the __cplusplus
macro:

% cat <<EOF >test2.cxx
#include <stdio.h>

int main (int argc, char* argv[])
{

  printf ("%d\n", __cplusplus);
}
EOF

% gcc-9 -std=c++2a test2.cxx && ./a.out
201709

% gcc-9 -D_XOPEN_SOURCE=500 -std=c++2a test2.cxx && ./a.out
201709

One can argue, but this can be considered a libstdc++ issue that it is affected
by the macro that defines the C functions availability.

Reply via email to