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
* [Bug preprocessor/108101] "#pragma once" causes other files not be included 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 ` 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 2 siblings, 0 replies; 4+ messages in thread From: pinskia at gcc dot gnu.org @ 2022-12-14 13:17 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108101 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Iirc pragma once uses a hash of the content and that is what is going on here. That or the underlying file system is using some inode being the same and copy on write. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug preprocessor/108101] "#pragma once" causes other files not be included 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 2 siblings, 0 replies; 4+ messages in thread From: pinskia at gcc dot gnu.org @ 2022-12-14 13:19 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108101 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE Status|UNCONFIRMED |RESOLVED --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Dup of bug 52566 *** This bug has been marked as a duplicate of bug 52566 *** ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug preprocessor/108101] "#pragma once" causes other files not be included 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 2 siblings, 0 replies; 4+ messages in thread From: terra at gnome dot org @ 2022-12-14 13:22 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108101 --- Comment #3 from M Welinder <terra at gnome dot org> --- Note also: # gcc -MM c.c c.o: c.c a.h No b.h present! ^ 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).