https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113378
Bug ID: 113378 Summary: _Static_assert diagnostics lack information when compiling stdin Product: gcc Version: 13.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: alx at kernel dot org Target Milestone: --- alx@debian:~/tmp$ cat is/asc.h #pragma GCC system_header #define foo() _Static_assert(sizeof(int) == sizeof(char)) alx@debian:~/tmp$ cat asc.c #include <asc.h> foo(); alx@debian:~/tmp$ cc -Wall -Wextra -isystem is asc.c In file included from asc.c:1: asc.c:2:1: error: static assertion failed 2 | foo(); | ^~~ alx@debian:~/tmp$ cc -Wall -Wextra -isystem is -x c - <asc.c In file included from <stdin>:1: <stdin>:2:1: error: static assertion failed I expect the same diagnostic information when compiling stdin.