This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[dave@hiauly1.hia.nrc.ca: Incorrect file name simplication]
- To: Zack Weinberg <zackw at Stanford dot EDU>
- Subject: [dave@hiauly1.hia.nrc.ca: Incorrect file name simplication]
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Date: Thu, 29 Mar 2001 22:16:00 +0100
- Cc: John David Anglin <dave at hiauly1 dot hia dot nrc dot ca>, gcc-bugs at gcc dot gnu dot org
Zack,
What do you suggest we do here? It's a pathname-simplification-
doesn't-work-with-symlinks issue.
I can revert to the old way with something like
+ if (!IS_ABSOLUTE_PATHNAME (name))
_cpp_simplify_pathname (name);
in cppfiles.c. However, I remain uneasy about the optimisation since it
does get these things wrong. I recognise it fixes an aliasing issue that
occurs without pathname simplification - but this is only an efficiency
gain not a correctness issue, except for the minor cases of #import and
#pragma once. In other words, I tend to think we should get it right
(ignoring #import / #pragma once) rather than be faster but get it wrong
sometimes.
Neil.
----- Forwarded message from John David Anglin <dave@hiauly1.hia.nrc.ca> -----
Looking at fix-header with gdb, it appears that the file
`/usr/include/sys/../h/types.h' gets simplied to `/usr/include/h/types.h'
which doesn't exist because `sys' is a symbolic link to `/sys/h'. This
causes open_file to fail.
----- End forwarded message -----