http://llvm.org/bugs/show_bug.cgi?id=9778
Summary: Fixit for "int a[my_object.my_static_constant]" under
-Wvla
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected],
[email protected]
Per C++03 5.19, an integer constant expression cannot involve class objects, so
the following is ill-formed:
class Foo {
struct Params {
static const int arr_size = 5;
};
void f() {
Params p;
int a[p.arr_size];
}
};
It would be great if, when emitting a warning about this code for -Wvla, we
fixit'd it to "int a[Params::arr_size]".
--
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