Re: n3294 - The restrict function attribute as a replacement of the restrict qualifier
From: Martin Uecker <hidden>
Date: 2024-07-26 23:00:11
From: Martin Uecker <hidden>
Date: 2024-07-26 23:00:11
Am Samstag, dem 27.07.2024 um 00:26 +0200 schrieb Alejandro Colomar:
On Sat, Jul 27, 2024 at 12:03:20AM GMT, Martin Uecker wrote:quoted
quoted
Maybe if GNU C compilers (GCC and Clang) add it first as an extension, adding diagnostics, it would help.Both GCC and Clang already have such diagnostics and/or run-time checks: https://godbolt.org/z/MPnxqb9h7Hi Martin, I guess that's prior art enough to make this UB in ISO C. Is there any paper for this already? Does any of your paper cover that? Should I prepare one?
What do you mean by "this"? Adding UB would likely see a lot of opposition, even where this could enable run-time checks. N2906 would make int foo(char f[4]); int foo(char f[5]); a constraint violation (although having those types be incompatible could also cause UB indirectly, this would not be its main effect). So I think brining a new version of this paper forward would be a possible next step, addressing the issues raised in the past. Martin