From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 12:33:04 2013 Return-Path: Delivered-To: svn-src-all@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 D4BCD899; Mon, 29 Jul 2013 12:33:04 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C279E23D5; Mon, 29 Jul 2013 12:33:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6TCX4lA078419; Mon, 29 Jul 2013 12:33:04 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6TCX481078418; Mon, 29 Jul 2013 12:33:04 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201307291233.r6TCX481078418@svn.freebsd.org> From: David Chisnall Date: Mon, 29 Jul 2013 12:33:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253766 - head/lib/msun/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 12:33:04 -0000 Author: theraven Date: Mon Jul 29 12:33:03 2013 New Revision: 253766 URL: http://svnweb.freebsd.org/changeset/base/253766 Log: Restore the longer form of the _Generic. The short form does not work in C++. Modified: head/lib/msun/src/math.h Modified: head/lib/msun/src/math.h ============================================================================== --- head/lib/msun/src/math.h Mon Jul 29 10:14:17 2013 (r253765) +++ head/lib/msun/src/math.h Mon Jul 29 12:33:03 2013 (r253766) @@ -83,10 +83,19 @@ extern const union __nan_un { #if (__STDC_VERSION__ >= 201112L && defined(__clang__)) || \ __has_extension(c_generic_selections) -#define __fp_type_select(x, f, d, ld) _Generic((0,(x)), \ +#define __fp_type_select(x, f, d, ld) _Generic((x), \ float: f(x), \ double: d(x), \ - long double: ld(x)) + long double: ld(x), \ + volatile float: f(x), \ + volatile double: d(x), \ + volatile long double: ld(x), \ + volatile const float: f(x), \ + volatile const double: d(x), \ + volatile const long double: ld(x), \ + const float: f(x), \ + const double: d(x), \ + const long double: ld(x)) #elif __GNUC_PREREQ__(3, 1) && !defined(__cplusplus) #define __fp_type_select(x, f, d, ld) __builtin_choose_expr( \ __builtin_types_compatible_p(__typeof(x), long double), ld(x), \