From owner-svn-src-all@freebsd.org Fri Aug 23 16:59:41 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 F002DC9C1C; Fri, 23 Aug 2019 16:59:41 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46FSLP5mm1z3yw9; Fri, 23 Aug 2019 16:59:41 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:13b:39f::9f:25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 7810B1B412; Fri, 23 Aug 2019 16:59:41 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 180818D4A166; Fri, 23 Aug 2019 16:59:39 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 2519FE70849; Fri, 23 Aug 2019 16:59:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id HRsKSSNaNLtb; Fri, 23 Aug 2019 16:59:34 +0000 (UTC) Received: from [127.0.0.1] (unknown [IPv6:fde9:577b:c1a9:31:7466:a929:9e2f:a88e]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id BC3AED21C68; Fri, 23 Aug 2019 16:59:33 +0000 (UTC) From: "Bjoern A. Zeeb" To: "Warner Losh" Cc: "Li-Wen Hsu" , "John Baldwin" , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r351364 - in head/sys: crypto/blowfish crypto/chacha20 crypto/des opencrypto Date: Fri, 23 Aug 2019 16:59:32 +0000 X-Mailer: MailMate (2.0BETAr6137) Message-ID: In-Reply-To: References: <201908220002.x7M028Jh070116@repo.freebsd.org> <0b9d1aa1-d328-30bc-b939-f1407e236855@FreeBSD.org> <3EE09B22-254B-4415-8865-D9542122ACA5@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed 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: Fri, 23 Aug 2019 16:59:42 -0000 On 23 Aug 2019, at 16:48, Warner Losh wrote: > On Fri, Aug 23, 2019 at 10:10 AM Bjoern A. Zeeb > wrote: > >> On 23 Aug 2019, at 15:53, Warner Losh wrote: >> >>> Sorry for top posting... >>> >>> I had planned this for next week, but I think give this insanity of >>> this >>> patch, we should do it now: turn off -Werror for gcc 4.2.1 >>> >>> https://reviews.freebsd.org/D21378 >>> >>> has the review. There's no benefit to these head-scratcher changes >>> when we >>> can get the same benefit by ignoring gcc 4.2.1 errors as discussed >>> on >>> arch@. >> >> That brings me to a different question: why does this build >> https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/lastBuild/ not fail >> despite rendering the warnings >> > > There's a lot of -Wno-error and -Wno-error=XXX sprinkled in our build > for > gcc 4.2.1 today, so we see the warnings but aren't stopped by them. My > changes take a big hammer and add a global -Wno-error to CFLAGS last > to > make this the behavior on gcc 4.2.1 platforms. Yes, but that didn’t answer my questions. It doesn’t help to try to avoid undefined C behaviour. That jenkins build seems to use the toolchain from ports and with that gcc 6.4.0. We see the same warning but it didn’t error as it seems to have done for other architectures with the in-tree gcc with the same warnings: In file included from /workspace/src/sys/opencrypto/xform.c:94:0: /workspace/src/sys/opencrypto/xform_des1.c: In function 'des1_setkey': /workspace/src/sys/opencrypto/xform_des1.c:102:15: warning: cast discards 'const' qualifier from pointer target type [-Wcast-qual] des_set_key((const des_cblock *) key, p[0]); ^ In file included from /workspace/src/sys/opencrypto/xform.c:95:0: /workspace/src/sys/opencrypto/xform_des3.c: In function 'des3_setkey': /workspace/src/sys/opencrypto/xform_des3.c:103:15: warning: cast discards 'const' qualifier from pointer target type [-Wcast-qual] des_set_key((const des_cblock *)(key + 0), p[0]); ^ /workspace/src/sys/opencrypto/xform_des3.c:104:15: warning: cast discards 'const' qualifier from pointer target type [-Wcast-qual] des_set_key((const des_cblock *)(key + 8), p[1]); ^ /workspace/src/sys/opencrypto/xform_des3.c:105:15: warning: cast discards 'const' qualifier from pointer target type [-Wcast-qual] des_set_key((const des_cblock *)(key + 16), p[2]); ^ -- To me this means that we treat different versions of compilers (in-tree and out-of-tree, gcc vs. clang) too different. If two versions of gcc (before your commit) gave the same warning I would have expected them to equally fail and not one fail and one pass? My question was: why was that the case? /bz