GCC and out-of-range constant array indexes?
Gary Funck
gary@intrepid.com
Fri Oct 8 15:14:00 GMT 2010
On 10/07/10 21:24:18, Ian Lance Taylor wrote:
> -Warray-bounds, but that is one of the warnings which is unfortunately
> only available when optimizing. In this case it requires -O2.
Ian, thanks. I had thought optimization might be involved, but didn't try -O2.
> There was an attempt a couple of years ago to implement this warning
> when not optimizing [...].
Would it be possible to compute enough of the control flow graph
to process warnings like this one, without running the
actual optimizations, unless those optimizations are requested?
Would the cost be too high?
- Gary
More information about the Gcc
mailing list