Re: [PATCH] c: Add support for unsequenced and reproducible attributes

2024-07-31 Thread Jakub Jelinek
On Wed, Jul 31, 2024 at 10:19:06AM +0200, Jakub Jelinek wrote: > On Wed, Jul 31, 2024 at 09:50:56AM +0200, Richard Biener wrote: > > I wonder if > > > > int foo (uintrptr_t x) { *(int *)x = 1; return 1; } > > > > is considered "noptr" by the standard but then by making a pointer out of > > 'x' in

Re: [PATCH] c: Add support for unsequenced and reproducible attributes

2024-07-31 Thread Jakub Jelinek
On Wed, Jul 31, 2024 at 09:50:56AM +0200, Richard Biener wrote: > I wonder if > > int foo (uintrptr_t x) { *(int *)x = 1; return 1; } > > is considered "noptr" by the standard but then by making a pointer out of > 'x' invokes UB? I don't know. The paper claims same behavior as const for functio

Re: [PATCH] c: Add support for unsequenced and reproducible attributes

2024-07-31 Thread Richard Biener
On Tue, Jul 30, 2024 at 7:05 PM Jakub Jelinek wrote: > > Hi! > > C23 added in N2956 ( https://open-std.org/JTC1/SC22/WG14/www/docs/n2956.htm ) > two new attributes, which are described as similar to GCC const and pure > attributes, but they aren't really same and it seems that even the paper > is

[PATCH] c: Add support for unsequenced and reproducible attributes

2024-07-30 Thread Jakub Jelinek
Hi! C23 added in N2956 ( https://open-std.org/JTC1/SC22/WG14/www/docs/n2956.htm ) two new attributes, which are described as similar to GCC const and pure attributes, but they aren't really same and it seems that even the paper is missing some of the differences. The paper says unsequenced is the