https://bugs.llvm.org/show_bug.cgi?id=41918

Eli Friedman <efrie...@quicinc.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|NEW                         |RESOLVED
                 CC|                            |efrie...@quicinc.com

--- Comment #2 from Eli Friedman <efrie...@quicinc.com> ---
In C, it is only legal to access a variable while it's live.  (From the
standard: "its lifetime extends from entry into the block with which it is
associated until execution of that block ends in any way".)  The code in your
testcase declares a variable inside a block, then tries to access it after the
block exits.

Of course, statement expressions aren't part of the standard, but I can't think
of any reason why we would treat them differently from regular blocks in this
context.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to