[cfe-dev] "extern void v"

John McCall rjmccall at apple.com
Sun May 26 13:49:18 PDT 2013

On May 24, 2013, at 9:45 AM, Jordan Rose <jordan_rose at apple.com> wrote:
> 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?

This is definitely well-formed.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130526/d6ebb960/attachment.html>

More information about the cfe-dev mailing list