From owner-svn-src-stable-9@FreeBSD.ORG Thu Feb 9 15:28:29 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 289E81065740; Thu, 9 Feb 2012 15:28:29 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 12E1E8FC08; Thu, 9 Feb 2012 15:28:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q19FSSvr007297; Thu, 9 Feb 2012 15:28:28 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q19FSSnX007295; Thu, 9 Feb 2012 15:28:28 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201202091528.q19FSSnX007295@svn.freebsd.org> From: Ed Schouten Date: Thu, 9 Feb 2012 15:28:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231282 - stable/9/include X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Feb 2012 15:28:29 -0000 Author: ed Date: Thu Feb 9 15:28:28 2012 New Revision: 231282 URL: http://svn.freebsd.org/changeset/base/231282 Log: MFC r229590 manually: It turns out our GCC has quite an interesting bug: typeof(1.0fi) != float _Complex typeof((float _Complex)1.0fi) != float _Complex typeof((float _Complex)1.0i) == float _Complex In other words: if casting to an equal size, GCC seems to take a shortcut. By casting down from a double to a float, GCC doesn't take this shortcut, yielding the proper type. Modified: stable/9/include/complex.h Modified: stable/9/include/complex.h ============================================================================== --- stable/9/include/complex.h Thu Feb 9 15:26:47 2012 (r231281) +++ stable/9/include/complex.h Thu Feb 9 15:28:28 2012 (r231282) @@ -33,7 +33,7 @@ #if __STDC_VERSION__ < 199901 #define _Complex __complex__ #endif -#define _Complex_I 1.0fi +#define _Complex_I ((float _Complex)1.0i) #endif #define complex _Complex