[Top][All Lists]

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

[Tinycc-devel] How do I push unsigned with vpushi()?

From: Rob Landley
Subject: [Tinycc-devel] How do I push unsigned with vpushi()?
Date: Wed, 21 Feb 2007 13:15:20 -0500
User-agent: KMail/1.9.1

So I stumbled across


and it pointed me to some patches to integrate into my mercurial repository


and at least one major outstanding bug report, I.E.


So I think I've narrowed it down to case TOK_SIZEOF: in function unary() in 
tcc.c, and it's doing a vpushi(value).  It's pushing a signed integer, and it 
should be pushing an unsigned integer, and I dunno how to do that.  Best I 
can figure out how to do is to patch the type after the push, I.E.

--- a/tcc.c     Mon Jan 22 13:18:11 2007 -0500
+++ b/tcc.c     Wed Feb 21 12:56:35 2007 -0500
@@ -7351,6 +7351,7 @@ static void unary(void)
         } else {
+        vtop->type.t |= VT_UNSIGNED;

     case TOK_builtin_types_compatible_p:

I also noticed that if you build my current tree's tcc with gcc, "make test" 
is ok.  But if you rebuild it with itself, one test gets the wrong answer.  
Have to poke at this a bit later...

"Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away." - Antoine de Saint-Exupery

reply via email to

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