tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] tcc grammar problems


From: Thomas Preud'homme
Subject: Re: [Tinycc-devel] tcc grammar problems
Date: Mon, 28 Jul 2014 21:19:38 +0800
User-agent: KMail/4.12.4 (Linux/3.14-1-amd64; KDE/4.13.3; x86_64; ; )

Le dimanche 13 juillet 2014, 22:12:39 jiang a écrit :
> Hello everyone!
> 
> (s->a = (s->b = (s->c = n + 4)));
> 
> 
> gcc & msvc:
> --> 30 / 30 / 126 // Because the return value is left
> 
> 
> tcc
> --> 254 / 30 / 126 // Because the return is the right value

Since it works for the last two values I don't think it's that. It simply 
looks like tcc compute n + 4 (254) and then tries to store it in each field 
independently. It's a folding issue. Tcc records 254 in a CValue associated 
with the SValue for n + 4. The problem is how this is propagated (folded) to 
the three field access.

> 
> Shall tcc assignment modify what? Same with gcc&msvc.

Yes, gcc and msvc are definitely right here.

Best regards,

Thomas

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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