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

--- Comment #4 from M Welinder <terra at gnome dot org> ---
> Since it was not read again, the file is not considered included ...

It must have been read -- how else could gcc decide it was the same?

# strace -f gcc -MM c.c 2>&1 >Makefile  | grep 'open.*\.h' | grep -v /
[pid 30494] openat(AT_FDCWD, "a.h", O_RDONLY|O_NOCTTY) = 3
[pid 30494] openat(AT_FDCWD, "b.h", O_RDONLY|O_NOCTTY) = 3

If it was necessary to open that file, then it's a dependency.


> Really #pragma once should just emit a warning just like #import does ...

I hear you, :-)

Reply via email to