Last active
August 31, 2018 17:43
-
-
Save noahp/96ae471534898245ddf428fbbb637bb8 to your computer and use it in GitHub Desktop.
-Werror=format-extra-args bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -i -v"$(pwd):/mnt/workspace" -t zbeekman/nightly-gcc-trunk-docker-image | |
gcc -Wall -Werror /mnt/workspace/test.c | |
/mnt/workspace/test.c: In function 'main': | |
/mnt/workspace/test.c:57:12: error: too many arguments for format [-Werror=format-extra-args] | |
57 | printf("" PRIu32, 2); | |
| ^~ | |
cc1: all warnings being treated as errors | |
test.c: | |
#include <inttypes.h> | |
#include <stdio.h> | |
int main() { | |
printf(PRIu32, 2); // doesn't fail | |
printf(PRIu32 "", 2); // doesn't fail | |
printf("" PRIu32, 2); // fails | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment