@amonakov@mastodon.gamedev.place
@cr1901@mastodon.social @siguza@infosec.space @jann@infosec.exchange is that regarding the last sentence, "admits only zero for a constant N"? To rephrase, the text of the standard allows only zero in place of N in offsetof(foo, flexible_array_member[N]), not any other integer.
@cr1901@mastodon.social
@amonakov@mastodon.gamedev.place @siguza@infosec.space @jann@infosec.exchange Yes, about that sentence. I didn't know that e.g. &foo.arr[3] doesn't evaluate to an address constant (feels like it should be allowed, unless the existence of that pointer runs afoul of the "one past the end" behavior).
But I'm not great w/ flexible array members anyway and mostly write C89 when I write C :P.