News for hackers. Stuff that matters.
Re:Undefined behavior in C is a reading error by not2b on Thursday May 20, 2021 @05:34PM (#27227615)
That's the exact reason why this rule was introduced into the standard: it was so C compilers could compete with Fortran compilers (Fortran has similar rules and at the time they were beating C compilers on equivalent scientific codes by 2-3x).

Fortran has even more restrictive aliasing rules than C: a function is allowed to assume that any two array arguments passed as arguments do not overlap. If they do, the behavior is undefined.

Re:Undefined behavior in C is a reading error by vyodaiken on Friday May 21, 2021 @09:27AM (#27233705)
Exactly - it was done for meaningless benchmarking reasons. C programmers would be happy to use "restrict" as an opt-in for those, but this argument about FORTRAN goes back to the initial days of the standard when Dennis Ritchie had to push "noalias" out of the proposed standard.