tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Symlinks in include paths


From: grischka
Subject: Re: [Tinycc-devel] Symlinks in include paths
Date: Tue, 26 Sep 2017 17:27:00 +0200
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

Petr Skočík wrote:
Hi, I noticed the tcc preprocessor doesn't resolve symbolic links when
resolving includes. This cancels include caching (#pragma once) if a
file gets included from two different paths.

Attached is a simply fix that adds such path resolution, although you
might want to do it differently if you do want to include it.

(Both gcc and clang do it, and it would help my project, where I would
like to support these 3 compilers).

We once did have code to avoid such issues like, however I removed
it.  See commit c5b9ae4e3f5f4037fc3816bcbcec60982734196b,

Reason was that IMO problems because of multiple -I's for the same
path should be fixed in the Makefile/build system, not in the compiler.

Not at least if the compiler is the tiny C compiler.

Say it's just that stuff like "st_ino" or "dwVolumeSerialNumbers" in
this program (that otherwise just uses open/read/write/close, more or less),
doesn't look good.  A matter of taste.  A case of "the feature is not to
have that feature".  Which you might or might not agree to ;)

-- grischka


Regards,
Petr S.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]