This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: [dave@hiauly1.hia.nrc.ca: Incorrect file name simplication]
- To: neil at daikokuya dot demon dot co dot uk (Neil Booth)
- Subject: Re: [dave@hiauly1.hia.nrc.ca: Incorrect file name simplication]
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Thu, 29 Mar 2001 17:08:42 -0500 (EST)
- Cc: zackw at Stanford dot EDU, gcc-bugs at gcc dot gnu dot org
> 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.
This doesn't look completely optimal to me. Possibly, _cpp_simplify_pathname
can be fixed to only transform `/..' in an absolute path in the case
`/../quux'. I am trying a patch.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)