GCC compiler -Warray-bounds option
Mon Feb 26 15:52:00 GMT 2018
On 02/26/2018 02:41 AM, Mustafa i. wrote:
> What exactly is the -Warray-bounds option to the GCC compiler supposed
> to warn about?
It's meant to warn for out of bounds array access.
For example, if you have a 10 element array, but try to access the 11th
element you should get a warning.
The warning is only available when the VRP pass is enabled (VRP is
enabled by default at -O2 and above).
More information about the Gcc