[Top][All Lists]

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

Re: [Tinycc-devel] Fix signedness of LL shift operators in libtcc1.c (gr

From: Rob Landley
Subject: Re: [Tinycc-devel] Fix signedness of LL shift operators in libtcc1.c (grischka-2005-09-25 case_10)
Date: Thu, 3 May 2007 18:04:51 -0400
User-agent: KMail/1.9.1

On Thursday 03 May 2007 5:50 pm, David A. Wheeler wrote:

> But tcc _CAN_ compile its own library libtcc1, so tcc can completely host
> itself. But self-hosting introduces a complication.  When you're compiling
> but using a different (host) compiler, there's no need to figure out how to
> implement shift operations for long long; just call the host compiler's
> implementation and be done with it.  But in the special case where tcc is
> self-hosting, its shift operations obviously can't call themselves for their
> own implementation.  Recursion is fine, but there has to be a way to end the
> recursion!       

Ah.  Back to Ken Thompson's original "trusting trust" paper, "where's the 
source for this"...

Hmmm...  Ideally we'd want it to automatically use this code when tcc was 
compiling itself.  Is that when __TINYC__ is defined?  In which case, an 
easier (or at least more logical) reproduction sequence would be:

make install
make distclean
./configure --cc=tcc
make test

Or perhaps "make test2" or "make test3" should cover this...

(Yeah, I know this is why tcc.c #includes other .c files, but it's still a 

> Understand.  This particular patch only affects a "not default" case, which
> is why it takes extra time to explain.  But self-hosting is actually
> something I _WANT_, so I'm submitting the patch.  

Oh I definitely want it too.  I'm just trying to come up with a reasonable 
checkin comment to apply it with. :)


reply via email to

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