[PATCH] Feature test macros overhaul: C++ TR1
Thu Mar 24 03:05:00 GMT 2016
On 2016-03-23 18:43, Craig Howland wrote:
> On 03/23/2016 05:22 PM, Yaakov Selkowitz wrote:
>> On 2016-03-23 16:19, Yaakov Selkowitz wrote:
>>> While C++11 was the first version of the standard to use C99
>>> TR1 (for C++03) also does, and G++ does not distinguish between C++98
>>> C++03, or when TR1 is in use. Therefore, while not strictly correct for
>>> "pure" C++98, enabling C99 for all C++ usage is the simplest solution
>>> much better than always using -D_GNU_SOURCE as on Linux).
>>> See thread starting: https://sourceware.org/ml/newlib/2016/msg00297.html
>> This patch to newlib, along with the attached revised patches to GCC
>> 5.3, allow _GLIBCXX_USE_C99 to be enabled for bare-metal targets.
>> Newlib is missing support for long double math (real and complex) when
>> it is different from double. However, AFAICS nothing dependent on just
>> _GLIBCXX_USE_C99 requires any complex math.
> Complex (the entire complex.h) was added in C99, so it should be gated
> by it.
When an entire header was only added by a newer standard, and isn't
#include'd by other standard headers, the very inclusion thereof gates
it and a feature test macro isn't necessary.
More information about the Newlib