This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[dave@hiauly1.hia.nrc.ca: Incorrect file name simplication]


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 -----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]