From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: Re: [PATCH v4 3/3] gnu: Update ldc to 0.17.1. Date: Tue, 13 Sep 2016 21:44:40 +0200 Message-ID: <20160913214440.6349d8ec@scratchpost.org> References: <20160913103042.7302-1-dannym@scratchpost.org> <20160913103042.7302-4-dannym@scratchpost.org> <20160913165521.GC20731@jasmine> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48670) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjtdi-0001NA-0G for guix-devel@gnu.org; Tue, 13 Sep 2016 15:45:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjtdd-0005UT-W1 for guix-devel@gnu.org; Tue, 13 Sep 2016 15:45:05 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:41581) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjtdd-0005Tr-Pl for guix-devel@gnu.org; Tue, 13 Sep 2016 15:45:01 -0400 In-Reply-To: <20160913165521.GC20731@jasmine> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Leo Famulari Cc: guix-devel@gnu.org Sigh. Yeah, I've researched a bit why that happens. The story is this: glibc wanted to have isinf work with double AND float etc without conversion. Therefore, there is a special gcc construct where you can find out what type a parameter is IN A MACRO. Therefore, in C, isnan is a macro and so is isinf. The include file defining it is However, in C++ there's a include file . This one provides normal functions in the namespace "std" (since overloads are possible in C++). dmd2 undefs isinf which is why the C version doesn't work anymore (that's stupid, really. What were they thinking?). But then they dont use the namespace std so it won't use that one either. "::isinf" is DEFINITELY wrong - no idea how that ever worked. It won't find the macro that way AND it won't find the function in namespace std either (since :: definitely says you want the one without namespace). Some LLVM versions include somewhere in their header files - so dmd2 is forced to use cmath rather than math.h even though they *want* to use math.h and the source code says so. Therefore, I now use the C++ std::isinf - I hope LLVM won't change their mind again because then it will break again.