https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123879
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Target Milestone|--- |16.0
--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
N.B. this only happens with an installed gcc 16, not an in-tree one.
jason says:
> hmm, that shouldn't have gotten past
> /* Don't redirect #includes between headers under the same include
>
> path directory (i.e. between library headers); if the import
>
> brings in the current file we then get redefinition errors. */
> && !strstr (eloc.file, _cpp_get_file_dir (file)->name)then
but apparently in this case we have
> (gdb) p eloc.file
> $1 = 0x38ed1d0 "/scratchpad/gcc-build-prefix/include/c++/16.0.0/stdbit.h"
> (gdb) p file.dir.name
> $2 = 0x38bb230
> "/scratchpad/gcc-build-prefix/lib/gcc/x86_64-pc-linux-gnu/16.0.0/../../../../include/c++/16.0.0"
> (gdb) p file.name
> $5 = 0x38ebab0 "bit"
one path is canonical and the other one is not, causing the check to fail