tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] type cast prob.


From: fabrice . bellard
Subject: Re: [Tinycc-devel] type cast prob.
Date: Wed, 06 Nov 2002 09:55:57 +0100 (MET)
User-agent: IMP/PHP IMAP webmail program 2.2.6

Quoting s duclos <address@hidden>:

> Hi,
> 
> Got this code after expanding up a macro by hand.
> 
> // t5.c
> main(){
>    //int x;    // OK
>    float x;
>    (int)x = (int)x;
> }
> 
> $tcc -c t5.c
> t5.c:5: lvalue expected
> $gcc -c t5.c
> $
> 
> 
> I know .. it's wierd .. :)
> 
> Again this is not the real code but some macro
> that happen to expand to this sort of construct
> at one point!
> 
> Another one of those syntactic branch of C I wish I
> didn't knew about .. thanks :)


I am not sure that doing (int)x = [...] is correct. TCC supports casts only for
rvalues.

Fabrice.




reply via email to

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