public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/113378] New: _Static_assert diagnostics lack information when compiling stdin
@ 2024-01-13 16:03 alx at kernel dot org
  2024-01-13 16:07 ` [Bug c/113378] " pinskia at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: alx at kernel dot org @ 2024-01-13 16:03 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-01-15 11:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-13 16:03 [Bug c/113378] New: _Static_assert diagnostics lack information when compiling stdin alx at kernel dot org
2024-01-13 16:07 ` [Bug c/113378] " pinskia at gcc dot gnu.org
2024-01-13 16:16 ` alx at kernel dot org
2024-01-15  8:35 ` rguenth at gcc dot gnu.org
2024-01-15  9:32 ` alx at kernel dot org
2024-01-15  9:38 ` pinskia at gcc dot gnu.org
2024-01-15 11:18 ` alx at kernel dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).