diff options
author | Tristan Gingold <tgingold@free.fr> | 2018-12-03 20:04:41 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2018-12-03 20:12:09 +0100 |
commit | 36b0b3d91179be364b45acd1527dde8a51553f51 (patch) | |
tree | 2c68703b3e9d02f5d009cda6e70e2a76ab163b8f /src/grt | |
parent | 5bf6c7e02843956e2747589c78d96b9defeab32b (diff) | |
download | ghdl-36b0b3d91179be364b45acd1527dde8a51553f51.tar.gz ghdl-36b0b3d91179be364b45acd1527dde8a51553f51.tar.bz2 ghdl-36b0b3d91179be364b45acd1527dde8a51553f51.zip |
Improve help and doc for --max-stack-alloc.
Diffstat (limited to 'src/grt')
-rw-r--r-- | src/grt/grt-lib.adb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/grt/grt-lib.adb b/src/grt/grt-lib.adb index 0bb9c2e36..26491a7ad 100644 --- a/src/grt/grt-lib.adb +++ b/src/grt/grt-lib.adb @@ -279,10 +279,15 @@ package body Grt.Lib is is Bt : Backtrace_Addrs; begin - if Size >= Max_Stack_Allocation then + if Max_Stack_Allocation = 0 then + return; + end if; + if Size > Max_Stack_Allocation then Save_Backtrace (Bt, 1); Error_S ("declaration of a too large object ("); Diag_C (Natural (Size / 1024)); + Diag_C (" > --max-stack-alloc="); + Diag_C (Natural (Max_Stack_Allocation / 1024)); Diag_C (" KB)"); Error_E_Call_Stack (Bt); end if; |