This does not compile:
struct S
{
struct S *s;
int first;
int *last;
};
int main()
{
struct S localS =
{
&localS,
0,
&localS.first
};
assertImpl(localS.s == &localS);
assertImpl(localS.first == 0);
assertImpl(localS.last == &localS.first);
return 0;
}
_Static_assert(main() == 0, "Test");
Comment #1 by robert.schadek — 2024-12-13T19:21:39Z