This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] avoid incomplete types in -Warray-bounds (PR 86741)
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Martin Sebor <msebor at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 31 Jul 2018 11:49:45 +0200
- Subject: Re: [PATCH] avoid incomplete types in -Warray-bounds (PR 86741)
- References: <ab8dde91-4339-639d-15ee-97143bc0087c@gmail.com>
On Mon, Jul 30, 2018 at 10:16 PM Martin Sebor <msebor@gmail.com> wrote:
>
> The enhanced handling of MEM_REFs in -Warray-bounds assumes
> the object from whose address an offset is being computed has
> a complete type. Since the size of such objects isn't known,
> whether the offset (or index) from its beginning is valid
> cannot be reliably determined. The attached patch avoids
> dealing with such objects.
Looks ok to deal with the testcase, thus please install.
Richard.
> Martin