From owner-svn-src-head@freebsd.org Sun Aug 13 00:14:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9315DDD473A; Sun, 13 Aug 2017 00:14:21 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-pg0-f51.google.com (mail-pg0-f51.google.com [74.125.83.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6744E77B4A; Sun, 13 Aug 2017 00:14:21 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-pg0-f51.google.com with SMTP id y129so28390951pgy.4; Sat, 12 Aug 2017 17:14:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=FPz4eKACPGkocJGHxzxdag8nxVytYtNLvbM6Sbkq8zo=; b=D3YOiAeuxvEPrLS4MQcNetbtkWYSLaivFCtgzxoQytKIv5cxawllfyPavO8nZebuPL PWtKLcaFkHSQUA3NGfMZTalWy2DkTmUAw46h/IJ1SzSgMXvSo0f//zeza3b4ZWVOvJ1D fB8wsnPgY+vhJ7DDrJzAN39Yd/386ZKZ3we4Hxc8atsPijCTIcdVRxSz06rzShYKViuv HINVNA1P0a95WIoEwSmEv9p25vXcQNTon8KVLUaUF7dduBeJAKJjpotSYYVBqkQLl0f1 T5BVxhbEanX7mB+BqXWxDeqxFzEWeY17ot7YIJqn1v5ICrGLfr0VCyVWDjvIDGcHgEsp 3LnA== X-Gm-Message-State: AHYfb5jlTamY1i/JKi+1rE69MhrVA7wPvUGEcwVrlW24Di2P6073ML3K e92SRlyZg4TaRfVyl+AALA== X-Received: by 10.84.132.46 with SMTP id 43mr22579520ple.409.1502583255620; Sat, 12 Aug 2017 17:14:15 -0700 (PDT) Received: from mail-pf0-f176.google.com (mail-pf0-f176.google.com. [209.85.192.176]) by smtp.gmail.com with ESMTPSA id h71sm7782602pfh.120.2017.08.12.17.14.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Aug 2017 17:14:15 -0700 (PDT) Received: by mail-pf0-f176.google.com with SMTP id h68so28987289pfk.0; Sat, 12 Aug 2017 17:14:15 -0700 (PDT) X-Received: by 10.99.124.26 with SMTP id x26mr16794095pgc.280.1502583255186; Sat, 12 Aug 2017 17:14:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.207.193 with HTTP; Sat, 12 Aug 2017 17:14:14 -0700 (PDT) In-Reply-To: References: <201708112241.v7BMfP5X028262@repo.freebsd.org> <1502555191.47886.30.camel@freebsd.org> <5672BE7A-0640-4C8B-9B41-44AD83D7B59E@gmail.com> From: Ryan Libby Date: Sat, 12 Aug 2017 17:14:14 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r322418 - head/lib/msun/src To: "Ngie Cooper (yaneurabeya)" Cc: Ian Lepore , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Bruce Evans Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 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, 13 Aug 2017 00:14:21 -0000 On Sat, Aug 12, 2017 at 2:53 PM, Ngie Cooper (yaneurabeya) wrote: [...] > Here are the full gamut of definitions for LDBL_MAX_EXP. It seems= that sparc64 isn=E2=80=99t the only architecture using this pattern: > > $ grep -r DBL_MAX_EXP sys/*/include > sys/arm/include/float.h:#define DBL_MAX_EXP 1024 > sys/arm/include/float.h:#define LDBL_MAX_EXP DBL_MAX_EXP > sys/arm64/include/float.h:#define DBL_MAX_EXP 1024 > sys/arm64/include/float.h:#define LDBL_MAX_EXP (+16384) > sys/mips/include/float.h:#define DBL_MAX_EXP 1024 > sys/mips/include/float.h:#define LDBL_MAX_EXP DBL_MAX_EXP > sys/powerpc/include/float.h:#define DBL_MAX_EXP 1024 > sys/powerpc/include/float.h:#define LDBL_MAX_EXP DBL_MAX_EXP > sys/riscv/include/float.h:#define DBL_MAX_EXP 1024 > sys/riscv/include/float.h:#define LDBL_MAX_EXP (+16384) > sys/sparc64/include/float.h:#define DBL_MAX_EXP 1024 > sys/sparc64/include/float.h:#define LDBL_MAX_EXP (+16384) > sys/x86/include/float.h:#define DBL_MAX_EXP 1024 > sys/x86/include/float.h:#define LDBL_MAX_EXP 16384 > > It might also be an inconsistency with how clang vs gcc [4.2.1] h= andles __CONCAT, and what -std=3D flags are passed to ${CC} in the Makefile= , since the implementation is predicated by whether or not it=E2=80=99s C++= or __STDC__ is defined. There might be an update that we can grab from Net= BSD (since the macro originated there). > I don=E2=80=99t understand [right now] why the (+foo) form is use= d *shrugs*. Yeah, unsure. Aesthetically it mirrors the declaration for the macros with negative values such as LDBL_MIN_EXP (where the parentheses do have a functional purpose), but in sys/*/include/{_limits.h,_stdint.h} by comparison we don't have parens around the positive values. Anyway maybe the macro pasting method is just too fragile of a hack.