chiark / gitweb /
lib/printf.h, libtests/t-printf.c: Bodge to inhibit warning from GCC 9.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 5 May 2020 18:53:45 +0000 (19:53 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 5 May 2020 22:17:44 +0000 (23:17 +0100)
commit6e19032aa4c34a5c6c900e558d8bfa88f8382bc0
tree7afed3a240ce02ffb83d8227f540c703370b2f36
parent684115ed73351c1ce055e823686225f8f8f21b27
lib/printf.h, libtests/t-printf.c: Bodge to inhibit warning from GCC 9.

It seems that GCC 9 now peers closely at field-width specifiers in
`printf' format strings to make sure that they're sensible.  This is a
good thing except when you're trying to test how your `printf'-like
function copes with out-of-range field width specifiers.

Add a new macro `INHIBIT_PRINTF_FORMAT_CHECKING' to turn off the magic
GCC attribute, and use it in `t-printf.c' to prevent GCC from breaking
the build.
lib/printf.h
libtests/t-printf.c