From owner-svn-src-all@freebsd.org Thu Aug 29 07:39:32 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 63307CD168; Thu, 29 Aug 2019 07:39:32 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46JvdJ1l44z4LHl; Thu, 29 Aug 2019 07:39:32 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 18F411C97C; Thu, 29 Aug 2019 07:39:32 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7T7dVe5069825; Thu, 29 Aug 2019 07:39:31 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7T7dVkJ069824; Thu, 29 Aug 2019 07:39:31 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201908290739.x7T7dVkJ069824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 29 Aug 2019 07:39:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351596 - in head: sys/sys tests/sys/sys X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in head: sys/sys tests/sys/sys X-SVN-Commit-Revision: 351596 X-SVN-Commit-Repository: base 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.29 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: Thu, 29 Aug 2019 07:39:32 -0000 Author: trasz Date: Thu Aug 29 07:39:31 2019 New Revision: 351596 URL: https://svnweb.freebsd.org/changeset/base/351596 Log: Fix qmath(3) build problems with GCC 8. Discussed with: asomers Sponsored by: Klara Systems Differential Revision: https://reviews.freebsd.org/D21442 Modified: head/sys/sys/qmath.h head/tests/sys/sys/qmath_test.c Modified: head/sys/sys/qmath.h ============================================================================== --- head/sys/sys/qmath.h Thu Aug 29 07:34:14 2019 (r351595) +++ head/sys/sys/qmath.h Thu Aug 29 07:39:31 2019 (r351596) @@ -267,7 +267,7 @@ typedef u64q_t umaxq_t; /* Left shift an integral value to align with the int bits of 'q'. */ #define Q_SHL(q, iv) \ - (Q_LTZ(iv) ? -(Q_ABS(iv) << Q_NFBITS(q)) : \ + (Q_LTZ(iv) ? -(int64_t)(Q_ABS(iv) << Q_NFBITS(q)) : \ Q_TC(q, iv) << Q_NFBITS(q)) /* Calculate the relative fractional precision between 'a' and 'b' in bits. */ Modified: head/tests/sys/sys/qmath_test.c ============================================================================== --- head/tests/sys/sys/qmath_test.c Thu Aug 29 07:34:14 2019 (r351595) +++ head/tests/sys/sys/qmath_test.c Thu Aug 29 07:39:31 2019 (r351596) @@ -208,7 +208,9 @@ ATF_TC_BODY(qmulq_s64q, tc) { s64q_t a_s64q, b_s64q, r_s64q; double a_dbl, b_dbl, r_dbl, maxe_dbl, delta_dbl; +#ifdef notyet int64_t a_int, b_int; +#endif int error; srandomdev(); @@ -231,8 +233,6 @@ ATF_TC_BODY(qmulq_s64q, tc) * test with equal precision. */ Q_SCVAL(b_s64q, Q_GCVAL(a_s64q)); - a_int = Q_GIVAL(a_s64q); - b_int = Q_GIVAL(b_s64q); /* QQ testing. */ a_dbl = Q_Q2D(a_s64q); @@ -247,6 +247,9 @@ ATF_TC_BODY(qmulq_s64q, tc) r_dbl = a_dbl * b_dbl; #ifdef notyet + a_int = Q_GIVAL(a_s64q); + b_int = Q_GIVAL(b_s64q); + maxe_dbl = fabs(((1.0 / Q_NFBITS(a_s64q)) * (double)b_int) + ((1.0 / Q_NFBITS(b_s64q)) * (double)a_int)); #else @@ -270,7 +273,6 @@ ATF_TC_BODY(qdivq_s64q, tc) { s64q_t a_s64q, b_s64q, r_s64q; double a_dbl, b_dbl, r_dbl, maxe_dbl, delta_dbl; - int64_t a_int, b_int; int error; srandomdev(); @@ -283,8 +285,6 @@ ATF_TC_BODY(qdivq_s64q, tc) * test with equal precision. */ Q_SCVAL(b_s64q, Q_GCVAL(a_s64q)); - a_int = Q_GIVAL(a_s64q); - b_int = Q_GIVAL(b_s64q); /* QQ testing. */ a_dbl = Q_Q2D(a_s64q); @@ -318,7 +318,6 @@ ATF_TC_BODY(qaddq_s64q, tc) { s64q_t a_s64q, b_s64q, r_s64q; double a_dbl, b_dbl, r_dbl, maxe_dbl, delta_dbl; - int64_t a_int, b_int; int error; srandomdev(); @@ -331,8 +330,6 @@ ATF_TC_BODY(qaddq_s64q, tc) * test with equal precision. */ Q_SCVAL(b_s64q, Q_GCVAL(a_s64q)); - a_int = Q_GIVAL(a_s64q); - b_int = Q_GIVAL(b_s64q); /* QQ testing. */ a_dbl = Q_Q2D(a_s64q); @@ -369,7 +366,6 @@ ATF_TC_BODY(qsubq_s64q, tc) { s64q_t a_s64q, b_s64q, r_s64q; double a_dbl, b_dbl, r_dbl, maxe_dbl, delta_dbl; - int64_t a_int, b_int; int error; srandomdev(); @@ -382,8 +378,6 @@ ATF_TC_BODY(qsubq_s64q, tc) * test with equal precision. */ Q_SCVAL(b_s64q, Q_GCVAL(a_s64q)); - a_int = Q_GIVAL(a_s64q); - b_int = Q_GIVAL(b_s64q); /* QQ testing. */ a_dbl = Q_Q2D(a_s64q);