Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: -Wrestrict warning on cc 8.3.0
- X-seq: zsh-workers 44218
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: <zsh-workers@xxxxxxx>
- Subject: Re: -Wrestrict warning on cc 8.3.0
- Date: Wed, 10 Apr 2019 09:48:02 +0100
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190410084804euoutp014bbc57471c05839a85df99d81deff29d~UEKf2c-a62392023920euoutp01K
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1554886084; bh=AFzF1I7N9vciIPXOWHq93HptG3j/Fh0A4ir12YpjCYs=; h=Subject:From:To:Date:In-Reply-To:References:From; b=E/a0tTCtEK1HVe2bEiHK/TOWF5jqbUtX8fmas5W5p2+hFDqTwB1pXUJ7uWpyDPnMa 9Md2E3muotRD2+2+cJpGPVwcPHmLt7oBR1CzFuf6GkV0wz7lHjPXQcFJl4Z/LlL+97 I4bl1MMxybVYVlwSR6rVrbH0/WPCCoFDDF60YRqQ=
- In-reply-to: <1554373291.5874.3.camel@samsung.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CGME20190403190049epcas3p4c02406857f7f26510ea8969c969a655e@epcas3p4.samsung.com> <CAEpdsia8j9iKU_fv2yoA84bNhJOS14AtjfE8YkJEPz7rHJsJsw@mail.gmail.com> <1554373291.5874.3.camel@samsung.com>
On Thu, 2019-04-04 at 11:21 +0100, Peter Stephenson wrote:
> On Wed, 2019-04-03 at 20:59 +0200, Wesley Schwengle wrote:
> >
> > During a make of the latest master I got the following warning:
> >
> > gcc -c -I. -I../../Src -I../../Src -I../../Src/Zle -I. -DHAVE_CONFIG_H
> > -DMODULE -Wall -Wmissing-prototypes -O2 -fPIC -o compctl..o compctl.c
> > compctl.c: In function ‘makecomplistflags.isra.6’:
> > compctl.c:3340:7: warning: ‘strcpy’ accessing 1 byte at offsets [0,
> > 9223372036854775807] and [0,9223372036854775807] may overlap 1 byte at
> > offset 0 [-Wrestrict]
> > strcpy(p, p + bl);
> > ^~~~~~~~~~~~~~~~~
> > rm -f compctl.so
> This warning is thoroughly opaque --- and not occurring with a locally
> compiled gcc 8.3.0 on my Ubuntu 16.04 64-bit Intel system --- but the
> code isn't exactly crystal clear, either (subtracting a number off then
> adding it immediately back on again isn't generally regarded as great
> style), and it's quite possible the copy is overlapping. Also, the last
> person to worry about code optimisation in compctl emigrated to the
> Undying Lands a decade ago (maybe I can still find the postcard...)
>
> Can somebody verify the following is equivalent apart from dealing with
> a possible overlapping copy? I've no way of ensuring this code gets
> exercised.
I've applied this anyway.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author