[Bug c/19881] strange warning about alloca
bruno at clisp dot org
gcc-bugzilla@gcc.gnu.org
Fri Feb 11 00:45:00 GMT 2005
------- Additional Comments From bruno at clisp dot org 2005-02-10 21:43 -------
The warning is not correct because
1) The code snippet uses alloca() and variable-size arrays for their respective purpose:
alloca() for storage that persists until the end of the function, and variable-size arrays
for storage that persists until the end of the block.
2) In the above sample, all 2 alloca() blocks and 2 variable-size arrays terminate their
lifetime at the same instruction. There are no instructions after the bar(...) function call
return; therefore a warning about a possible accidental use of the type_temp memory after
this point is pointless: the compiler could determine that there are no instructions any more.
We are asking for an easy way to turn off this warning, so that we can look at other, useful,
warnings.
This is not duplicate of PR 14236, but rather a complaint about the implementation of the fix
of PR 14236.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19881
More information about the Gcc-bugs
mailing list