Date: Mon, 2 Sep 2024 15:10:04 +0300
On Mon, 2 Sept 2024 at 15:02, Tiago Freire <tmiguelf_at_[hidden]> wrote:
>
> > The reason #include "works" even if inode numbers are reused or paths are not unique is not because including them by pathname makes it work. It's because the headers files have include guards in them,
>
>
>
> Wrong! Unless you are modifying files as you compile. It has never happened that 2 distinct files occupy the same filepath and the compiler had to make a decision between one of them. (except maybe on a MAC, think smort… screw that platform).
The (main) problem has never been two distinct files having the same
path. The problem is one and the same file having different paths (and
inodes, etc.).
It fails to be recognized as the Same File in multiple places,
attempts to redefine non-inline entities, and builds break.
>
> > The reason #include "works" even if inode numbers are reused or paths are not unique is not because including them by pathname makes it work. It's because the headers files have include guards in them,
>
>
>
> Wrong! Unless you are modifying files as you compile. It has never happened that 2 distinct files occupy the same filepath and the compiler had to make a decision between one of them. (except maybe on a MAC, think smort… screw that platform).
The (main) problem has never been two distinct files having the same
path. The problem is one and the same file having different paths (and
inodes, etc.).
It fails to be recognized as the Same File in multiple places,
attempts to redefine non-inline entities, and builds break.
Received on 2024-09-02 12:10:18