Add macros for diagnostic control, use for scanf %a tests
Paul Eggert
eggert@cs.ucla.edu
Wed Nov 26 02:48:00 GMT 2014
Joseph Myers wrote:
> I'm doubtful about hiding warnings in ways that rely on the compiler not
> being smart enough to see through them ...
> An inline wrapper would not be appropriate; these tests are specifically
> using arguments with side-effects, and arguments with unusual types
Fair enough on both points, but this underscores the suggestion that for test
cases let's do just put a simple pragma at the start of the file. To grep it
later we can use a stylized comment, like this:
/* (GCC 4.9) gcc -Werror -Wformat fails in C99 mode because ... */
#pragma GCC diagnostic ignored "-Wformat"
as it's not worth our time (or our readers' time) to get fancier on test cases.
More information about the Libc-alpha
mailing list