[llvm-bugs] [Bug 27645] Wrong "error: cannot jump from this indirect goto statement to one of its possible targets"
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed May 4 09:31:45 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=27645
Alexander Cherepanov <cherepan at mccme.ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |---
--- Comment #2 from Alexander Cherepanov <cherepan at mccme.ru> ---
"char a[n]" is VLA, no doubt here. And jumping over this declaration would be
wrong.
The problem is that nobody jumps over VLA declaration. All gotos in the example
are effectively no-op, they don't jump over anything at all. Only jumping from
outside the scope of VLA to inside is prohibited, jumps exclusively outside or
exclusively inside are ok.
The relevant part of C11, 6.8.6.1p1: "A goto statement shall not jump from
outside the scope of an identifier having a variably modified type to inside
the scope of that identifier."
Thus, I don't think this bug could be classified as INVALID and I'm reopening
it.
OTOH indirect gotos are a gcc extension and you could as well not support it at
all or support it only partially. So feel free to close as WONTFIX.
FTR clang seem to emit this error when there is an indirect "goto" outside the
scope of a VLA and there is a label inside the scope of a VLA whose address is
taken.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160504/754fc7cd/attachment.html>
More information about the llvm-bugs
mailing list