https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87183

--- Comment #3 from Noah Pendleton <noah.pendleton at gmail dot com> ---
Yep, looks like it, enabling `-Wsystem-headers` yields the expected result:
```bash
gcc -Wall -Werror -Wsystem-headers test.c
In file included from test.c:1:
test.c: In function 'main':
test.c:5:12: error: too many arguments for format [-Werror=format-extra-args]
5 |     printf(PRIu32, 2);     // doesn't warn
  |            ^~~~~~
test.c:6:12: error: too many arguments for format [-Werror=format-extra-args]
6 |     printf(PRIu32 "", 2);  // doesn't warn
  |            ^~~~~~
test.c:7:12: error: too many arguments for format [-Werror=format-extra-args]
7 |     printf("u", 2);        // warns
  |            ^~~
test.c:8:12: error: too many arguments for format [-Werror=format-extra-args]
8 |     printf("" PRIu32, 2);  // warns
  |            ^~
cc1: all warnings being treated as errors
```

Reply via email to