On Wed, 28 Aug 2019, Bruno Haible wrote:

This issue can crop up e.g. when trying to build gettext for mingw (which
has got the gnulib isnan function bundled, even if it isn't used).

I'm regularly building gettext on mingw and haven't seen this issue. Therefore
thanks again for the reproduction example.

I ran into it while trying to build gettext with clang (with my pure-llvm
based toolchain, at https://github.com/mstorsjo/llvm-mingw in case you're
interested), so I presume there's something that goes different in gettext
with clang/lld compared to gcc

Yes. It would make sense to compare the config.status file generated by an llvm
build with those generated by a gcc build.

Just for the record, I believe the root cause is the fact that libc++'s stdlib.h (which is included before the normal C runtime's stdlib.h) includes math.h since this change: https://reviews.llvm.org/D60097

So math.h ends up included at a place where it isn't, when building with libstdc++, exposing the incompatibility between the gnulib math.h's isnan and C++, while other builds of the C++ code in gettext wouldn't include math.h at all.

// Martin


Reply via email to