From owner-freebsd-toolchain@freebsd.org Sat Oct 10 01:49:26 2015 Return-Path: Delivered-To: freebsd-toolchain@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 AE08E9D3F56 for ; Sat, 10 Oct 2015 01:49:26 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-2.reflexion.net [208.70.210.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68444ACF for ; Sat, 10 Oct 2015 01:49:25 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 1655 invoked from network); 10 Oct 2015 01:49:17 -0000 Received: from unknown (HELO mail-cs-02.app.dca.reflexion.local) (10.81.19.2) by 0 (rfx-qmail) with SMTP; 10 Oct 2015 01:49:17 -0000 Received: by mail-cs-02.app.dca.reflexion.local (Reflexion email security v7.70.2) with SMTP; Fri, 09 Oct 2015 21:49:17 -0400 (EDT) Received: (qmail 19915 invoked from network); 10 Oct 2015 01:49:17 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 10 Oct 2015 01:49:17 -0000 X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network Received: from [192.168.1.108] (c-67-170-167-181.hsd1.or.comcast.net [67.170.167.181]) by iron2.pdx.net (Postfix) with ESMTPSA id 634311C43CE; Fri, 9 Oct 2015 18:49:11 -0700 (PDT) Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: bt_split.c error: dereferencing type-punned pointer will break strict-aliasing rules (powerpc64-xtoolchain use) From: Mark Millard In-Reply-To: Date: Fri, 9 Oct 2015 18:49:16 -0700 Cc: FreeBSD PowerPC ML , FreeBSD Toolchain Message-Id: References: <191CDC2D-7A74-41D2-B433-B6D9F6D87D32@dsl-only.net> To: Craig Rodrigues X-Mailer: Apple Mail (2.2104) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 01:49:26 -0000 On 2015-Oct-9, at 4:58 PM, Craig Rodrigues = wrote: > On Sun, Oct 4, 2015 at 4:06 AM, Mark Millard > wrote: >=20 > /usr/src/lib/libc/db/btree/bt_split.c:548:7: error: dereferencing = type-punned pointer will break strict-aliasing rules = [-Werror=3Dstrict-aliasing] > bt_preserve(t, *(pgno_t *)bl->bytes) =3D=3D RET_ERROR) >=20 > You will get many of these warnings all over the codebase. > You should add NO_WERROR=3D > to your make invocation, or put NO_WERROR=3D in make.conf. >=20 > That's what I do here: > = https://jenkins.freebsd.org/job/FreeBSD_HEAD_amd64_gcc4.9/631/consoleFull = Yes. Thanks for the reference to = FreeBSD_HEAD_amd64_gcc4.9/631/consoleFull . It is interesting to see. Type-punned pointer vs. strict-aliasing leaves me more worried about = source-code-assumption vs. code-generator-assumption mismatches. Many = warnings/errors are more like initialized-but-unused and various others = that I did not mention. Since powerpc64-xtoolchain and its powerpc64-gcc = are gcc5.2 based these days it might give more warnings/errors than = gcc4.9 or earlier. (I've not checked.) I switched to use NO_WERROR (and WERROR) after I sent in the note and = had looked at some of the other generated warnings/errors. =3D=3D=3D Mark Millard markmi at dsl-only.net On 2015-Oct-9, at 4:58 PM, Craig Rodrigues = wrote: On Sun, Oct 4, 2015 at 4:06 AM, Mark Millard > wrote: /usr/src/lib/libc/db/btree/bt_split.c:548:7: error: dereferencing = type-punned pointer will break strict-aliasing rules = [-Werror=3Dstrict-aliasing] bt_preserve(t, *(pgno_t *)bl->bytes) =3D=3D RET_ERROR) You will get many of these warnings all over the codebase. You should add NO_WERROR=3D to your make invocation, or put NO_WERROR=3D in make.conf. That's what I do here: = https://jenkins.freebsd.org/job/FreeBSD_HEAD_amd64_gcc4.9/631/consoleFull = -- Craig =20