RFC: handling ISO C feature test macros

Paul Eggert eggert@cs.ucla.edu
Fri May 20 23:20:00 GMT 2016


On 05/20/2016 03:00 PM, Joseph Myers wrote:
> (_GNU_SOURCE should not cause __STDC_WANT_IEC_60559_BFP_EXT__ to be
> defined because the user might define it with a different expansion.

Is this a pragmatic suggestion, or is this required by the standards? 
Surely the former, as _GNU_SOURCE is reserved for any use, so a glibc 
header can do whatever it wants if _GNU_SOURCE is defined. If 
<features.h> #defines __STDC_WANT_IEC_60559_BFP_EXT__ when _GNU_SOURCE 
is defined, the issignaling definitions could be conditioned simply on 
'#ifdef __STDC_WANT_IEC_60559_BFP_EXT__'.

If this idea won't fly for some reason, I mildly prefer your method (a) 
to (b), as (a) is a bit easier for a casual reader to follow when 
reading installed .h files.



More information about the Libc-alpha mailing list