configure: Apply -Werror=vla to C++ as well as C
Peter Eisentraut <peter@eisentraut.org>
Author:
Peter Eisentraut <peter@eisentraut.org>
Date: 2026-03-30T18:55:16Z
Releases:
19 (unreleased)
configure: Apply -Werror=vla to C++ as well as C The comment part of d9dd406fe281 mentioned that -Wvla is not applicable for C++. That is not fully correct: it is true that VLAs are not part of the C++ standard, and g++ with -pedantic will also warn about them as a non-standard extension. However, -Wvla itself works fine in C++ and will catch VLA usage just as in C. Fix configure.ac to apply -Werror=vla to C++ as well. There is no need to fix meson.build as it already includes it in common_warning_flags. Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Suggested-by: Peter Eisentraut <peter@eisentraut.org> Discussion: https://postgr.es/m/7bf60ab1-2b5d-4a77-93ce-815072a0a014%40eisentraut.org
Files
| Path | Change | +/− |
|---|---|---|
| configure | modified | +52 −2 |
| configure.ac | modified | +2 −2 |
Discussion
- Enable -Wstrict-prototypes and -Wold-style-definition by default 22 messages · 2026-03-09 → 2026-04-08