positional-format-strings: suppress -Wformat-non-iso only for clang

master
neingeist 11 years ago
parent 1d0b8c7541
commit 43758dd8fc

@ -1,7 +1,9 @@
#include <stdio.h> #include <stdio.h>
/* suppress "warning: positional arguments are not supported by ISO C" */ /* suppress "warning: positional arguments are not supported by ISO C" */
#ifdef __clang__
#pragma GCC diagnostic ignored "-Wformat-non-iso" #pragma GCC diagnostic ignored "-Wformat-non-iso"
#endif
int main(void) { int main(void) {
printf("%3$3.2f %2$s %1$s\n", "One", "Two", 3.0); printf("%3$3.2f %2$s %1$s\n", "One", "Two", 3.0);

Loading…
Cancel
Save