http://llvm.org/bugs/show_bug.cgi?id=12029
Bug #: 12029
Summary: Incorrect error: reference to local variable 'BAR'
declared in enclosing function
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Classification: Unclassified
Created attachment 8073
--> http://llvm.org/bugs/attachment.cgi?id=8073
Code that fails under trunk.
Attached the test code.
Receive the following error which I believe is incorrect (under trunk):
clang_bug0.cpp:5:20: error: reference to local variable 'BAR' declared in
enclosing
function 'main'
unsigned char U1[BAR];
^
clang_bug0.cpp:2:21: note: 'BAR' declared here
const unsigned int BAR = 0;
This test code compiles fine under g++, msvc, and clang2.9.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs