Author
anonymous
over 3 years ago
Language
C
Compiler
gcc 11.1.0
Options
Warnings
C11(GNU)
no pedantic
Author
anonymous
over 3 years ago
$ gcc prog.c -Wall -Wextra -std=gnu11
prog.c: In function 'main':
prog.c:4:16: warning: format argument 2 unused before used argument 3 in '$'-style format [-Wformat=]
4 | printf("%1$*3$s\n", "a", "b", 10, 20);
| ^~~~~~~~~~~
prog.c:4:16: warning: unused arguments in '$'-style format [-Wformat-extra-args]
prog.c:5:16: warning: format argument 2 unused before used argument 4 in '$'-style format [-Wformat=]
5 | printf("%1$*4$s\n", "a", "b", 10, 20);
| ^~~~~~~~~~~
prog.c:5:16: warning: format argument 3 unused before used argument 4 in '$'-style format [-Wformat=]
prog.c:6:16: warning: format argument 1 unused before used argument 3 in '$'-style format [-Wformat=]
6 | printf("%2$*3$s\n", "a", "b", 10, 20);
| ^~~~~~~~~~~
prog.c:6:16: warning: unused arguments in '$'-style format [-Wformat-extra-args]
prog.c:7:16: warning: format argument 1 unused before used argument 4 in '$'-style format [-Wformat=]
7 | printf("%2$*4$s\n", "a", "b", 10, 20);
| ^~~~~~~~~~~
prog.c:7:16: warning: format argument 3 unused before used argument 4 in '$'-style format [-Wformat=]
a
a
b
b
Exit Code:
0