On 24 February 2015 at 16:10, <[email protected]> wrote:
>
> I've changed my mind, mainly because I can't find a way of getting gcc
> to disable that warning while still turning on -Wformat to do format
> checking.
Pass -std=c99 to it?
> $ gcc -x c -std=c99 -pedantic -Wall -Wextra -Werror -fsyntax-only - <<<
> $'#include <stdio.h>\n#include <stddef.h>\nvoid f() { printf("%zd",
> (size_t)42); }'
> $ gcc -x c -std=c89 -pedantic -Wall -Wextra -Werror -fsyntax-only - <<<
> $'#include <stdio.h>\n#include <stddef.h>\nvoid f() { printf("%zd",
> (size_t)42); }'
> <stdin>: In function ‘f’:
> <stdin>:3:1: error: ISO C90 does not support the ‘z’ gnu_printf length
> modifier [-Werror=format]
> cc1: all warnings being treated as errors
HTH,
--
Giuseppe D'Angelo
--
## List details at https://lists.exim.org/mailman/listinfo/pcre-dev