Symbol management in header files
Florian Weimer
fweimer@redhat.com
Thu Oct 20 20:30:00 GMT 2016
On 10/18/2016 05:57 PM, Joseph Myers wrote:
> On Tue, 18 Oct 2016, Florian Weimer wrote:
>
>> However, TS 18661-1 added âiszeroâ to <math.h>, and this causes some build
>> failures. Apparently, the main problem here is that it is a macro, which
>> means it is not subject to scoping (which helps C++ in particular to cope with
>> definitions of nextup/nextdown/fsub/canonincalize).
>
> I think some build failures are inevitable with new features in headers;
> applications that use _GNU_SOURCE simply need to be updated,
_GNU_SOURCE currently is pretty much mandatory for C++, so this isn't
really a case of deliberate opt-in. All the build failures I have seen
so far were encountered by C++ code.
It seem we need to be more careful with adding non-namespaced macros to
central header files under _GNU_SOURCE, at least for C++.
Thanks,
Florian
More information about the Libc-alpha
mailing list