[PATCH 04/11 v3] libstdc++: Make use of __builtin_bit_cast

Jonathan Wakely jwakely@redhat.com
Thu Jun 24 14:40:09 GMT 2021


On Thu, 24 Jun 2021 at 15:34, Jonathan Wakely wrote:
> Rather than use the _GLIBCXX_HAS_BUILTIN macro more widely, I'd prefer
> to not use it where it isn't needed, as in the attached (untested)
> patch.

My rationale for this is that I'd prefer to use standardized features
like __has_include and __has_cpp_attribute where possible, instead of
adding more and more configure macros. You don't need to look in
c++config.h to see how the macro is defined if you just use a standard
feature directly.

__has_builtin obviously isn't standardized, but as long as it's
available on all the compilers we care about (which it is) then the
same rationale applies.



More information about the Gcc-patches mailing list