[PATCH] -Walloca-larger-than with constant sizes at -O0 (PR 100425)
Martin Sebor
msebor@gmail.com
Wed May 5 01:32:02 GMT 2021
Even when explicitly enabled, -Walloca-larger-than doesn't run
unless optimization is enabled as well. This prevents diagnosing
alloca calls with constant arguments in excess of the limit that
could otherwise be flagged even at -O0, making the warning less
consistent and less useful than is possible.
The attached patch enables -Walloca-larger-than for calls with
constant arguments in excess of the limit even at -O0 (variable
arguments are only handled with optimization, when VRP runs).
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-100425.diff
Type: text/x-patch
Size: 3421 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210504/b84d8773/attachment-0001.bin>
More information about the Gcc-patches
mailing list