* Re: GCC compiler -Warray-bounds option
[not found] ` <3fab0879-07ef-c774-283a-5c4eb88dfbb9@redhat.com>
@ 2018-02-26 9:41 ` Mustafa i. via gcc
2018-02-26 15:52 ` Jeff Law
0 siblings, 1 reply; 2+ messages in thread
From: Mustafa i. via gcc @ 2018-02-26 9:41 UTC (permalink / raw)
To: Jeff Law, gcc
Hello,
What exactly is the -Warray-bounds option to the GCC compiler supposed to
warn about?
My g++ --version: g++ (GCC) 7.3.1 20180130 (Red Hat 7.3.1-2)
Regards,
Mustafa
On Wed, Feb 21, 2018 at 9:19 PM, Jeff Law <law@redhat.com> wrote:
> On 02/21/2018 03:20 PM, Mustafa i. wrote:
> > Hi,
> >
> > I have a question about the GCC compiler -Warray-bounds option. Can you
> > help me with that or can you help me contact the right person at the GCC
> > project?
> What in particular do you want to know. gcc@gcc.gnu.org is probably the
> best place to ask questions.
>
> jeff
>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: GCC compiler -Warray-bounds option
2018-02-26 9:41 ` GCC compiler -Warray-bounds option Mustafa i. via gcc
@ 2018-02-26 15:52 ` Jeff Law
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2018-02-26 15:52 UTC (permalink / raw)
To: Mustafa i., gcc
On 02/26/2018 02:41 AM, Mustafa i. wrote:
> Hello,
>
> 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).
Jeff
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-26 15:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CAGRzKbYqfx5Q8=9mMTUB5HCaFM7yBmVfnLfA56sQBcnJ+0Q8Pg@mail.gmail.com>
[not found] ` <3fab0879-07ef-c774-283a-5c4eb88dfbb9@redhat.com>
2018-02-26 9:41 ` GCC compiler -Warray-bounds option Mustafa i. via gcc
2018-02-26 15:52 ` Jeff Law
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).