public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/108101] New: "#pragma once" causes other files not be included
@ 2022-12-14 13:12 terra at gnome dot org
  2022-12-14 13:17 ` [Bug preprocessor/108101] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: terra at gnome dot org @ 2022-12-14 13:12 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 108101
           Summary: "#pragma once" causes other files not be included
           Product: gcc
           Version: 12.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
          Assignee: unassigned at gcc dot gnu.org
          Reporter: terra at gnome dot org
  Target Milestone: ---

# (echo '#pragma once'; echo 'Killroy was here') > a.h
# (echo '#pragma once'; echo 'Killroy was here') > b.h
# (echo '#include "a.h"'; echo '#include "b.h"') > c.c
# gcc -E c.c | grep Killroy
1
# clang -E c.c | grep Killroy
2

According to gcc, Killroy was only there once.  Clang is keeping better track
and spots him there twice.

This seems to be version independent: tried 7.5.0 and 12.1.0

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

end of thread, other threads:[~2022-12-14 13:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-14 13:12 [Bug preprocessor/108101] New: "#pragma once" causes other files not be included terra at gnome dot org
2022-12-14 13:17 ` [Bug preprocessor/108101] " pinskia at gcc dot gnu.org
2022-12-14 13:19 ` pinskia at gcc dot gnu.org
2022-12-14 13:22 ` terra at gnome 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).