tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Perl-TCC: Erroneous mixing of system include paths an


From: David Mertens
Subject: Re: [Tinycc-devel] Perl-TCC: Erroneous mixing of system include paths and normal include paths?
Date: Thu, 29 Mar 2012 09:08:59 -0500

On Thu, Mar 29, 2012 at 6:53 AM, Thomas Preud'homme <address@hidden> wrote:
Le jeudi 29 mars 2012 01:17:58, David Mertens a écrit :
> Hey all -
>
> I'm making wonderful progress putting libtcc and Perl together. You can
> check out the latest development here: https://github.com/run4flat/perl-TCC
>
> At the moment I find that any path that I add to the system include paths
> gets searched when I later #include "lib.h", so long as the header couldn't
> be found in the non-system search path. That's fine, that's what I
> expected. However, I also see that if I include a path in the non-system
> include paths (i.e. tcc_add_include_path), it gets searched when I say
> #include <lib.h>, which is not what I expected. This is demonstrated with
> tests in this file:
> https://github.com/run4flat/perl-TCC/blob/master/t/111-compile-include.t(sp
> ecifically starting at line 149)

Yes, tcc_add_include_path correspond to what -I does. So I would say it's the
normal behaviour.

>
> That, of course, is a Perl script. I will be happy to boil this down to a C
> program, but I first wanted to be sure that I hadn't lost my mind.
>
> Thanks!
> David

Thomas Preud'homme

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


Thanks.

Follow up: I've looked through the tcc source code and I cannot find any functional difference between state->include_paths and state->sysinclude_paths, except that the normal include paths are always checked before the sysinclude paths. Is that the only difference, because that will effect how I write-up the docs for the two different functions?

David

--
 "Debugging is twice as hard as writing the code in the first place.
  Therefore, if you write the code as cleverly as possible, you are,
  by definition, not smart enough to debug it." -- Brian Kernighan


reply via email to

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