[Bug c/97548] bogus -Wvla-parameter on a bound expression involving a parameter
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jul 15 16:23:37 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97548
--- Comment #3 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:98f1f9f38c45218c06200feb1939c9433a2ab6ca
commit r12-2329-g98f1f9f38c45218c06200feb1939c9433a2ab6ca
Author: Martin Sebor <msebor@redhat.com>
Date: Thu Jul 15 10:11:23 2021 -0600
Avoid -Wvla-parameter for nontrivial bounds [PR97548].
Resolves:
PR c/101289 - bogus -Wvla-paramater warning when using const for vla param
PR c/97548 - bogus -Wvla-parameter on a bound expression involving a
parameter
gcc/c-family/ChangeLog:
PR c/101289
PR c/97548
* c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
gcc/c/ChangeLog:
PR c/101289
PR c/97548
* c-decl.c (get_parm_array_spec): Strip nops.
gcc/ChangeLog:
PR c/101289
PR c/97548
* fold-const.c (operand_compare::operand_equal_p): Handle
OEP_DECL_NAME.
(operand_compare::verify_hash_value): Same.
* tree-core.h (OEP_DECL_NAME): New.
gcc/testsuite/ChangeLog:
* gcc.dg/Wvla-parameter-12.c: New test.
More information about the Gcc-bugs
mailing list