[Bug c/97548] [11 Regression] bogus -Wvla-parameter on a bound expression involving a parameter
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97548 Martin Sebor changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #9 from Martin Sebor --- Fixed.
[Bug c/97548] [11 Regression] bogus -Wvla-parameter on a bound expression involving a parameter
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97548 --- Comment #8 from CVS Commits --- The releases/gcc-11 branch has been updated by Martin Sebor : https://gcc.gnu.org/g:7d3f53c595e1766ca0494e5f56f33b0ce49b3bb4 commit r11-9396-g7d3f53c595e1766ca0494e5f56f33b0ce49b3bb4 Author: Martin Sebor 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.
[Bug c/97548] [11 Regression] bogus -Wvla-parameter on a bound expression involving a parameter
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97548 Richard Biener changed: What|Removed |Added Target Milestone|11.2|11.3 --- Comment #7 from Richard Biener --- GCC 11.2 is being released, retargeting bugs to GCC 11.3
[Bug c/97548] [11 Regression] bogus -Wvla-parameter on a bound expression involving a parameter
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97548 --- Comment #6 from Martin Sebor --- The fix isn't very robust since it only handles redeclarations with VLA parameters that involve bounds that have the same name but not nontrivial expressions involving different names, like in this case: $ cat pr97548-c6.c && gcc -S -Wall pr97548-c6.c void g (int k, int [k + 1]); void g (int m, int [m + 1]) { } // bogus warning pr97548-c6.c:2:16: warning: argument 2 of type ‘int[m + 1]’ declared with mismatched bound ‘m + 1’ [-Wvla-parameter] 2 | void g (int m, int [m + 1]) { } // bogus warning |^~~ pr97548-c6.c:1:16: note: previously declared as ‘int[k + 1]’ with bound ‘k + 1’ 1 | void g (int k, int [k + 1]); |^~~
[Bug c/97548] [11 Regression] bogus -Wvla-parameter on a bound expression involving a parameter
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97548 Martin Sebor changed: What|Removed |Added Summary|bogus -Wvla-parameter on a |[11 Regression] bogus |bound expression involving |-Wvla-parameter on a bound |a parameter |expression involving a ||parameter --- Comment #5 from Martin Sebor --- GCC 10 doesn't warn (it doesn't provide -Wvla-parameter) so it's a regression.