svn commit: r362333 - in head: contrib/flex contrib/flex/src usr.bin/lex usr.bin/lex/lib

Dimitry Andric dim at FreeBSD.org
Wed Jun 24 10:09:18 UTC 2020


On 24 Jun 2020, at 02:41, Kyle Evans <kevans at FreeBSD.org> wrote:
> 
> On Thu, Jun 18, 2020 at 1:09 PM Jung-uk Kim <jkim at freebsd.org> 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.

-Dimitry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 223 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20200624/eb5923d1/attachment.sig>


More information about the svn-src-all mailing list