On 19/04/17 11:49 +0100, Jonathan Wakely wrote:
Both newlib and FreeBSD have this in libc headers:#ifndef __has_builtin #define __has_builtin(x) 0 #endif This means our attempts to use #ifdef __has_builtin aren't reliable, so we need a different approach. With this patch we don't care whether it's defined or not, only its value. PR libstdc++/80446 * include/std/type_traits (is_aggregate): Change __has_builtin checks. * libsupc++/new (launder): Likewise. Tested ppc64le-linux and x86_64-freebsd11.0, committed to trunk.
Jakub pointed out I forgot to update the macro name in a comment. Smoke-tested and committed to trunk.
commit be2fd5feb898fefac9f97ffca6691b232d18fa5b Author: Jonathan Wakely <[email protected]> Date: Wed Apr 19 16:11:34 2017 +0100 * libsupc++/new: Update comment on #endif directive. diff --git a/libstdc++-v3/libsupc++/new b/libstdc++-v3/libsupc++/new index 2de7752..04f172c 100644 --- a/libstdc++-v3/libsupc++/new +++ b/libstdc++-v3/libsupc++/new @@ -209,7 +209,7 @@ namespace std void launder(volatile void*) = delete; void launder(const volatile void*) = delete; } -#endif // _GLIBCXX_NO_BUILTIN_LAUNDER +#endif // _GLIBCXX_HAVE_BUILTIN_LAUNDER #undef _GLIBCXX_HAVE_BUILTIN_LAUNDER #endif // C++17
