[Bug middle-end/101601] [12 Regression] -Warray-bounds triggers error: arrays of functions are not meaningful

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jul 28 22:16:50 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101601

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Sebor <msebor@gcc.gnu.org>:

https://gcc.gnu.org/g:b9cbf8c9e0bc72f59b643165247fae646560aadd

commit r12-2582-gb9cbf8c9e0bc72f59b643165247fae646560aadd
Author: Martin Sebor <msebor@redhat.com>
Date:   Wed Jul 28 16:14:38 2021 -0600

    Correct -Warray-bounds handling if function pointers [PR101601].

    Resolves:
    PR middle-end/101601 - -Warray-bounds triggers error: arrays of functions
are not meaningful

            PR middle-end/101601

    gcc/ChangeLog:

            * gimple-array-bounds.cc (array_bounds_checker::check_mem_ref):
Remove
            a pointless test.
            Handle pointers to functions.

    gcc/testsuite/ChangeLog:

            * g++.dg/warn/Warray-bounds-25.C: New test.
            * gcc.dg/Warray-bounds-85.c: New test.


More information about the Gcc-bugs mailing list