From owner-svn-src-head@FreeBSD.ORG Sun Oct 27 00:13:30 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C1CA784E; Sun, 27 Oct 2013 00:13:30 +0000 (UTC) (envelope-from kubito@gmail.com) Received: from mail-la0-x22d.google.com (mail-la0-x22d.google.com [IPv6:2a00:1450:4010:c03::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BA9032B34; Sun, 27 Oct 2013 00:13:29 +0000 (UTC) Received: by mail-la0-f45.google.com with SMTP id hp15so4159364lab.18 for ; Sat, 26 Oct 2013 17:13:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=mEPFD/eEc/lhooOEr9GT2KJkdn5FiH8s/qSJ0Wf2/KQ=; b=ECjtUVDZJTPkIolI66oF8h93kYg5Dukb99FVkgrQBexk9vgXbVa8csGuwS5lUfLxUG FTNi8Af6eeal6KMPoC4Jp0Z7u9JjRQo97pN+IT7N0g1Atx0sAcoW9NpeJprAP3ZSdIgX 1G3jxmJxKRg1P+2ZYDFH2ge/2KaZhLBA+CLRYmSkR7kCJeERdsk0r9EpITqceXfK0/lo VHT/mCGhkvYbdUeqkovumnEzI5xeFZR9AqCg6CRiHJBBDuZ72xESAH5PhGVNy6J4Baaf IKL9Hjlh34Ob0N+91vtbG5PZbinGBuYOuuz4noFDQSyg0lJHBeQCE/4tC5doa70jUuQ2 OBEQ== X-Received: by 10.152.29.103 with SMTP id j7mr9418564lah.7.1382832807697; Sat, 26 Oct 2013 17:13:27 -0700 (PDT) Received: from orwell.Elisa.gmail.com (a91-154-115-217.elisa-laajakaista.fi. [91.154.115.217]) by mx.google.com with ESMTPSA id e4sm7579296lba.15.2013.10.26.17.13.25 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 26 Oct 2013 17:13:26 -0700 (PDT) Sender: Raphael Kubo da Costa From: Raphael Kubo da Costa To: David Chisnall Subject: Re: svn commit: r253260 - head/lib/msun/src References: <201307121103.r6CB3qrh068782@svn.freebsd.org> Date: Sun, 27 Oct 2013 03:13:18 +0300 In-Reply-To: <201307121103.r6CB3qrh068782@svn.freebsd.org> (David Chisnall's message of "Fri, 12 Jul 2013 11:03:52 +0000 (UTC)") Message-ID: <86d2mrd10h.fsf@orwell.Elisa> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Oct 2013 00:13:30 -0000 David Chisnall writes: > Author: theraven > Date: Fri Jul 12 11:03:51 2013 > New Revision: 253260 > URL: http://svnweb.freebsd.org/changeset/base/253260 > > Log: > Fix the build with C++ where __builtin_types_compatible_p is not allowed. > > Modified: > head/lib/msun/src/math.h > > Modified: head/lib/msun/src/math.h > ============================================================================== > --- head/lib/msun/src/math.h Fri Jul 12 10:07:48 2013 (r253259) > +++ head/lib/msun/src/math.h Fri Jul 12 11:03:51 2013 (r253260) > @@ -81,12 +81,13 @@ extern const union __nan_un { > #define FP_SUBNORMAL 0x08 > #define FP_ZERO 0x10 > > -#if __STDC_VERSION__ >= 201112L && defined(__clang__) > +#if (__STDC_VERSION__ >= 201112L && defined(__clang__)) || \ > + __has_extension(c_generic_selections) > #define __fp_type_select(x, f, d, ld) _Generic((x), \ > float: f(x), \ > double: d(x), \ > long double: ld(x)) One of the things that's making cad/brlcad fail with clang is some C code that calls isnan() and isinf() with -std=gnu89, -Werror and -Wc11-extensions: /s/brlcad/src/libbn/ulp.c:170:9: error: generic selections are a C11-specific feature [-Werror,-Wc11-extensions] if (isnan(val) || isinf(val)) ^ /usr/include/math.h:118:2: note: expanded from macro 'isnan' __fp_type_select(x, __inline_isnanf, __inline_isnan, __inline_isnanl) ^ /usr/include/math.h:86:39: note: expanded from macro '__fp_type_select' #define __fp_type_select(x, f, d, ld) _Generic((x), \ ^ Can the check there be improved somehow to avoid this kind of error?