[LLVMbugs] [Bug 24287] New: No error that the designated index in an array initializer is too large
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jul 27 17:10:02 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=24287
Bug ID: 24287
Summary: No error that the designated index in an array
initializer is too large
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: akyrtzi at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
=======
#include <limits.h>
char vals1[ULONG_MAX] = { // error: array is too large (18446744073709551615
elements)
};
char vals2[] = {
[ULONG_MAX-1] = 0 // no error
};
=======
The second array initialization will trigger huge memory usage (for creating
all these initializer expressions) but no error like in the constant array
case.
--
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/20150728/e4a2a8f1/attachment.html>
More information about the llvm-bugs
mailing list