From owner-svn-src-all@freebsd.org Wed Jun 24 13:54:33 2020 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 10D1B34F671 for ; Wed, 24 Jun 2020 13:54:33 +0000 (UTC) (envelope-from joerg@bec.de) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) (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 49sPlX1fN1z49Vg for ; Wed, 24 Jun 2020 13:54:31 +0000 (UTC) (envelope-from joerg@bec.de) X-Originating-IP: 87.153.206.8 Received: from bec.de (p5799ce08.dip0.t-ipconnect.de [87.153.206.8]) (Authenticated sender: joerg@bec.de) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 1A7D4C0015 for ; Wed, 24 Jun 2020 13:54:29 +0000 (UTC) Date: Wed, 24 Jun 2020 15:54:28 +0200 From: Joerg Sonnenberger To: svn-src-all@freebsd.org Subject: Re: svn commit: r362333 - in head: contrib/flex contrib/flex/src usr.bin/lex usr.bin/lex/lib Message-ID: <20200624135428.GA18022@bec.de> References: <202006181809.05II9G8p054025@repo.freebsd.org> <2FBF81D0-9EA3-4F46-9E3E-7EDE852962C1@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2FBF81D0-9EA3-4F46-9E3E-7EDE852962C1@FreeBSD.org> X-Rspamd-Queue-Id: 49sPlX1fN1z49Vg X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of joerg@bec.de has no SPF policy when checking 217.70.183.198) smtp.mailfrom=joerg@bec.de X-Spamd-Result: default: False [3.17 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; HAS_XOIP(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; RWL_MAILSPIKE_POSSIBLE(0.00)[217.70.183.198:from]; DMARC_NA(0.00)[bec.de]; NEURAL_SPAM_SHORT(0.49)[0.488]; NEURAL_SPAM_MEDIUM(0.92)[0.925]; NEURAL_SPAM_LONG(0.96)[0.956]; RECEIVED_SPAMHAUS_PBL(0.00)[87.153.206.8:received]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:29169, ipnet:217.70.176.0/20, country:FR]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[217.70.183.198:from] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 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: Wed, 24 Jun 2020 13:54:33 -0000 On Wed, Jun 24, 2020 at 12:09:03PM +0200, Dimitry Andric wrote: > On 24 Jun 2020, at 02:41, Kyle Evans wrote: > > > > On Thu, Jun 18, 2020 at 1:09 PM Jung-uk Kim wrote: > >> > >> Author: jkim > >> Date: Thu Jun 18 18:09:16 2020 > >> New Revision: 362333 > >> URL: https://svnweb.freebsd.org/changeset/base/362333 > >> > >> Log: > >> MFV: r362286 > >> > >> Merge flex 2.6.4. > >> > > > > Hi, > > > > I'm looking at getting amd64 world buildable again by gcc6; this seems > > to give it some gas: > > > > /usr/src/contrib/flex/src/main.c: In function 'check_options': > > /usr/src/contrib/flex/src/main.c:347:14: error: assignment discards > > 'const' qualifier from pointer target type > > [-Werror=discarded-qualifiers] > > if ((slash = strrchr(M4, '/')) != NULL) { > > > > The following trivial patch seems to make gcc6 happy again. > > This is a strange one. As gcc6 has been removed from ports, I had to > resort to an older 12-STABLE box which still had it, but no matter what > I try, I cannot get the warning that is being produced by the CI system. > What does it do differently? > > Also, the warning is indeed bogus, as strrchr() returns a non-const char > pointer. As I can't reproduce it, I also can't verify which gcc version > fixes the bogus warning. The warning is correct if you have a C++-aware string.h. It will provide two overloads for strrchr, which return the constness of the argument. So if you give it a const char *, it returns a const char *; if you give it a char *, it returns a char *. Joerg