PR16131 describes an analyzer assertion on taking the address of an extern void variable:
extern void v;
static void f(void) {
&v;
}
Clearly the analyzer shouldn’t crash, but I’m surprised that this is legal at all. Yet I can’t find anything in the standard actually forbidding it—you can certainly do the same thing with any incomplete struct type. Can somebody confirm that this is at least grammatically correct?
(I suppose like an incomplete object it provides a way to name an address without allowing access.)
Jordan