mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Error if a stack allocated variable is too big (configurable with --max-stack-object-size).
This commit is contained in:
6
test/test_suite/statements/big_locals.c3
Normal file
6
test/test_suite/statements/big_locals.c3
Normal file
@@ -0,0 +1,6 @@
|
||||
import std;
|
||||
fn int main(String[] args)
|
||||
{
|
||||
int[1024 * 1024] x; // #error: The size of this local variable (4096 Kb) exceeds the maximum allowed stack object size (128 Kb)
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user