Add -Wmissing-variable-declarations to the standard compilation flags
Peter Eisentraut <peter@eisentraut.org>
Add -Wmissing-variable-declarations to the standard compilation flags This warning flag detects global variables not declared in header files. This is similar to what -Wmissing-prototypes does for functions. (More correctly, it is similar to what -Wmissing-declarations does for functions, but -Wmissing-prototypes is a superset of that in C.) This flag is new in GCC 14. Clang has supported it for a while. Several recent commits have cleaned up warnings triggered by this, so it should now be clean. Reviewed-by: Andres Freund <andres@anarazel.de> Discussion: https://www.postgresql.org/message-id/flat/e0a62134-83da-4ba4-8cdb-ceb0111c95ce@eisentraut.org
Files
| Path | Change | +/− |
|---|---|---|
| configure | modified | +49 −0 |
| configure.ac | modified | +9 −0 |
| meson.build | modified | +10 −0 |
| src/interfaces/ecpg/test/Makefile.regress | modified | +1 −1 |
| src/interfaces/ecpg/test/meson.build | modified | +1 −0 |
| src/Makefile.global.in | modified | +1 −0 |
| src/makefiles/meson.build | modified | +2 −0 |
| src/tools/pg_bsd_indent/Makefile | modified | +2 −0 |
| src/tools/pg_bsd_indent/meson.build | modified | +1 −0 |
Discussion
- consider -Wmissing-variable-declarations 13 messages · 2024-05-09 → 2026-02-21