try positional format strings

master
neingeist 11 years ago
parent cb3c9c0874
commit ad287fd9a8

1
.gitignore vendored

@ -32,3 +32,4 @@ multibrot-openmp
multibrot-openmp.png
hello-openmp
mandelbrot-openmp
positional-format-strings

@ -9,7 +9,8 @@ TARGETS=approximate-pi linked-list mandelbrot threads circular-buffer structs \
ncurses-pong bit-fuckery bit-fuckery2 checkcheck multibrot bloom \
wo-lernen lua-foo binsearch test-inline-assembly uiowa-threads-example \
mtrace-test av-variance undefined-behaviour \
multibrot-openmp hello-openmp mandelbrot-openmp
multibrot-openmp hello-openmp mandelbrot-openmp \
positional-format-strings
EXTRAS=mandelbrot.bmp multibrot.png test-inline-assembly.s tags \
mtrace-test.trace mtrace-test.txt multibrot-openmp.png
VERYEXTRAS=cppcheck.txt

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