openwrt/toolchain
Andrey Erokhin de2162d27d
toolchain: gcc: backport v11.3.0 fix for false positive VLA params warnings
If the vla parameter has a const specifier, the compiler will warn about
mismatched bounds:

 $ cat mwe.c
 extern void mwe(const int len, char buf[len]);
 void mwe(const int len, char buf[len]) {}

 $ make CFLAGS=-Wvla-parameter mwe.o
 cc -Wvla-parameter   -c -o mwe.o mwe.c
 mwe.c:2:30: warning: argument 2 of type ‘char[len]’ declared with mismatched bound ‘len’ [-Wvla-parameter]
     2 | void mwe(const int len, char buf[len]) {}
       |                         ~~~~~^~~~~~~~
 mwe.c:1:37: note: previously declared as ‘char[len]’ with bound ‘len’
     1 | extern void mwe(const int len, char buf[len]);
       |                                ~~~~~^~~~~~~~

On some code bases it might result in a lot of false positive warnings,
which can indeed be easily disabled, but on the other this workaround
might hide some real issues, so lets rather fix the compiler and make it
more reliable.

References: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101289
Signed-off-by: Andrey Erokhin <a.erokhin@inango-systems.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz> [commit message]
2023-11-02 18:45:50 +01:00
..
binutils toolchain: assign PKG_CPE_ID 2023-09-27 17:31:53 +02:00
fortify-headers fortify-headers: fix build error when _REDIR_TIME64 is not defined 2023-05-18 17:36:12 +02:00
gcc toolchain: gcc: backport v11.3.0 fix for false positive VLA params warnings 2023-11-02 18:45:50 +01:00
gdb toolchain: assign PKG_CPE_ID 2023-09-27 17:31:53 +02:00
glibc toolchain: Update glibc 2.34 to recent HEAD 2023-10-07 13:57:56 +02:00
kernel-headers toolchain: assign PKG_CPE_ID 2023-09-27 17:31:53 +02:00
musl toolchain: musl: add PKG_CPE_ID 2023-09-27 17:33:50 +02:00
nasm toolchain: assign PKG_CPE_ID 2023-09-27 17:31:53 +02:00
wrapper buildroot: allow specifying libc personality for external toolchains 2013-02-20 15:06:10 +00:00
build_version toolchain: add a version that can be bumped to force toolchain/target rebuild 2021-11-16 22:02:45 +01:00
Config.in toolchain: Include ./include/fortify for external musl toolchain 2022-10-03 19:51:50 +02:00
info.mk uClibc cleanup: - use full version string (0.9.30.1), instead of base (0.9.30) + extra (.1) - remove support for 0.9.28 and snapshots (building from SVN to be added later) 2009-04-24 02:07:24 +00:00
Makefile Revert "toolchain: add autoconf-lean" 2021-03-02 11:36:36 +00:00