gdbsupport, gdbserver, gdb: use -Wno-vla-cxx-extension
When building with clang 18, I see: CXX aarch64-linux-tdep.o /home/smarchi/src/binutils-gdb/gdb/aarch64-linux-tdep.c:1299:26: error: variable length arrays in C++ are a Clang extension [-Werror,-Wvla-cxx-extension] 1299 | gdb_byte za_zeroed[za_bytes]; | ^~~~~~~~ /home/smarchi/src/binutils-gdb/gdb/aarch64-linux-tdep.c:1299:26: note: read of non-const variable 'za_bytes' is not allowed in a constant expression /home/smarchi/src/binutils-gdb/gdb/aarch64-linux-tdep.c:1282:10: note: declared here 1282 | size_t za_bytes = std::pow (sve_vl_from_vg (svg), 2); | ^ Since we are using VLAs right now, that warning doesn't make sense for us. add `-Wno-vla-cxx-extension` to the list of warning flags we try to enable. If we ever choose to disallow VLAs, we can remove that flag. Change-Id: Ie41feafc50c343f6e75333d4f836ce32fbeb6d8c
This commit is contained in:
parent
1992aeb29e
commit
cbb97c5be3
4 changed files with 4 additions and 0 deletions
1
gdb/configure
vendored
1
gdb/configure
vendored
|
@ -31179,6 +31179,7 @@ build_warnings="-Wall -Wpointer-arith \
|
|||
-Wredundant-move \
|
||||
-Wmissing-declarations \
|
||||
-Wstrict-null-sentinel \
|
||||
-Wno-vla-cxx-extension \
|
||||
"
|
||||
|
||||
# The -Wmissing-prototypes flag will be accepted by GCC, but results
|
||||
|
|
1
gdbserver/configure
vendored
1
gdbserver/configure
vendored
|
@ -13706,6 +13706,7 @@ build_warnings="-Wall -Wpointer-arith \
|
|||
-Wredundant-move \
|
||||
-Wmissing-declarations \
|
||||
-Wstrict-null-sentinel \
|
||||
-Wno-vla-cxx-extension \
|
||||
"
|
||||
|
||||
# The -Wmissing-prototypes flag will be accepted by GCC, but results
|
||||
|
|
1
gdbsupport/configure
vendored
1
gdbsupport/configure
vendored
|
@ -14179,6 +14179,7 @@ build_warnings="-Wall -Wpointer-arith \
|
|||
-Wredundant-move \
|
||||
-Wmissing-declarations \
|
||||
-Wstrict-null-sentinel \
|
||||
-Wno-vla-cxx-extension \
|
||||
"
|
||||
|
||||
# The -Wmissing-prototypes flag will be accepted by GCC, but results
|
||||
|
|
|
@ -52,6 +52,7 @@ build_warnings="-Wall -Wpointer-arith \
|
|||
-Wredundant-move \
|
||||
-Wmissing-declarations \
|
||||
-Wstrict-null-sentinel \
|
||||
-Wno-vla-cxx-extension \
|
||||
"
|
||||
|
||||
# The -Wmissing-prototypes flag will be accepted by GCC, but results
|
||||
|
|
Loading…
Add table
Reference in a new issue