> From the clang code: > ... > // If this is a system #include, ignore the user #include locs. > unsigned i = isAngled ? SystemDirIdx : 0; > ... > // If this is a #include_next request, start searching after the directory the > // file was found in. > if (FromDir) > i = FromDir-&SearchDirs[0];
That's nice, readable code! But you also need to understand how GCC handles duplicate directories in the search path. Some documentation says this: "Duplicate directories are removed from the quote and bracket search chains before the two chains are merged to make the final search chain. Thus, it is possible for a directory to occur twice in the final search chain if it was specified in both the quote and bracket chains." It seems, from strace and ltrace, that GCC detects duplicates by stat-ing the path and looking at st_dev and st_ino. If you do "ln -s xx xx1" then GCC does not search in xx when you do "gcc -E -Ixx1 -Ixx". Edmund _______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
