tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Include path bug (Was: Re: plans to 0.9.27)


From: grischka
Subject: Re: [Tinycc-devel] Include path bug (Was: Re: plans to 0.9.27)
Date: Fri, 13 Oct 2017 20:12:07 +0200
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

Steffen Nurpmeso wrote:
Hello.

So i thought about it and come back to apologize.  At least
mildly.  I guess the right thing to do would be to strip all paths
which are also in the system array from the user paths present in
the non-standardized $C_INCLUDE_PATH environment variable, even if
that means that this possibly changes the search order desired by
the user anyway.

Not quite.  Really the only thing you can do is to clean up that
suspicions system path cruft from the C_INCLUDE_PATH on YOUR OWN
computer:

   - /usr/local/include
   - /usr/include

Search order is fixed by conventions, and the built-in system
paths have least priority.

This implies that it is the compiler's business to set them and
that at the same time the user is allowed to override them, even
if then the compiler stops to work at all.

Therefor your C_INCLUDE_PATH cannot work for tinycc.

(The public version of tinycc that is, and as long as it needs
its own stdarg.h / does not have __builtin_va_stuff)

See also:
  https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html#index-CPATH
  https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html

-- gr


Or the approach of hell, use a token and once
that is seen first, "temporarily rewind to global scope" and
inject the necessary typedef there, or simply generate builtin
knowledge of the type as such, not backed with anything a user can
see when looking through the headers.  I for one do not like any
of those, not even the first, though.

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

_______________________________________________
Tinycc-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/tinycc-devel





reply via email to

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