[cfe-dev] "extern void v"

Jordan Rose jordan_rose at apple.com
Fri May 24 09:45:20 PDT 2013


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130524/e53d8042/attachment.html>


More information about the cfe-dev mailing list