https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90983
--- Comment #5 from Torsten Robitzki <Torsten at Robitzki dot de> --- (In reply to Martin Sebor from comment #4) > Using a very large -Wstack-usage argument should effectively disable the > warning. E.g., -Wstack-usage=4EiB or -Wstack-usage=$(getconf ULONG_MAX). Unfortunately, not when the stack usage is reported as unbound: #include <alloca.h> int foo(int i) { void* p = alloca(i); return p != 0; } int main() { foo(4000); return 0; } $ arm-none-eabi-gcc t.c -Wstack-usage=200 -Wstack-usage=4EiB t.c: In function 'foo': t.c:3:5: warning: stack usage might be unbounded [-Wstack-usage=] 3 | int foo(int i) | ^~~