From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 68EB71F461 for ; Thu, 29 Aug 2019 18:55:24 +0000 (UTC) Received: from localhost ([::1]:53620 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i3PZq-0006cM-Ac for normalperson@yhbt.net; Thu, 29 Aug 2019 14:55:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50089) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i3PZk-0006Zl-E9 for bug-gnulib@gnu.org; Thu, 29 Aug 2019 14:55:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i3PZi-0001yL-Sg for bug-gnulib@gnu.org; Thu, 29 Aug 2019 14:55:16 -0400 Received: from mail8.parnet.fi ([77.234.108.134]:27170) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i3PZi-0001rf-4l for bug-gnulib@gnu.org; Thu, 29 Aug 2019 14:55:14 -0400 Received: from mail7.parnet.fi (mail7.parnet.fi [77.234.108.28]) by mail8.parnet.fi with ESMTP id x7TIt7Op021759-x7TIt7Or021759 (version=TLSv1.0 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 29 Aug 2019 21:55:07 +0300 Received: from foo.martin.st (host-96-177.parnet.fi [77.234.96.177]) by mail7.parnet.fi (8.13.8/8.13.8) with ESMTP id x7TIt6Eo011349 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 29 Aug 2019 21:55:07 +0300 Date: Thu, 29 Aug 2019 21:55:06 +0300 (EEST) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: Bruno Haible Subject: Re: isnan function conflicts with C++ standard library declarations In-Reply-To: <4751172.Ro3qupbQrl@omega> Message-ID: References: <1621444.12XPtTX4uv@omega> <4751172.Ro3qupbQrl@omega> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 77.234.108.134 X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: bug-gnulib@gnu.org Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" 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