|
From: | Paul Eggert |
Subject: | Re: restrict |
Date: | Sun, 16 Feb 2020 18:46:51 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 |
On 2/16/20 4:14 PM, Bruno Haible wrote:
I thought that passing pointers to different elements of the same array would produce warnings. But I was mistaken: This code does NOT produce warnings.
Yes, and I don't see why such code has undefined behavior, as long as the function doesn't actually access aliased elements in the same array. That is, if GCC generated warnings for that sort of thing, the warnings would be false alarms.
[Prev in Thread] | Current Thread | [Next in Thread] |