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.