From: "Martin Storsjö" <martin@martin.st>
To: Bruno Haible <bruno@clisp.org>
Cc: bug-gnulib@gnu.org
Subject: Re: isnan function conflicts with C++ standard library declarations
Date: Thu, 29 Aug 2019 21:55:06 +0300 (EEST) [thread overview]
Message-ID: <alpine.DEB.2.20.1908292151360.6969@cone.martin.st> (raw)
In-Reply-To: <4751172.Ro3qupbQrl@omega>
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
next prev parent reply other threads:[~2019-08-29 18:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-27 20:21 isnan function conflicts with C++ standard library declarations Martin Storsjö
2019-08-28 8:46 ` Bruno Haible
2019-08-28 10:22 ` Martin Storsjö
2019-08-28 16:13 ` Bruno Haible
2019-08-28 19:51 ` Martin Storsjö
2019-08-29 18:55 ` Martin Storsjö [this message]
2019-08-29 22:02 ` Bruno Haible
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.20.1908292151360.6969@cone.martin.st \
--to=martin@martin.st \
--cc=bruno@clisp.org \
--cc=bug-gnulib@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).