tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] tcc -E mangles >>


From: Vincent Lefevre
Subject: Re: [Tinycc-devel] tcc -E mangles >>
Date: Mon, 31 Mar 2014 15:36:31 +0200
User-agent: Mutt/1.5.21-6305-vl-r59709 (2013-04-16)

On 2014-03-31 15:06:48 +0200, Vincent Lefevre wrote:
> On 2014-03-31 12:51:45 +0100, Jay Foad wrote:
> > Instead of printing >>, this example prints the ASCII control character ^B:
> > 
> > $ cat s.c
> > #define S >>
> > S
> > $ ./tcc -E s.c
> > # 2 "s.c"
> > ^B
> 
> This bug has been introduced by:
> 
> commit 0ac8aaab1bef770929e5592d02bc06d3a529952e
[...]

And the error was the use of TOK_SHR instead of TOK_SAR (to get
the old behavior, i.e. with value 2). I've pushed the change to
TOK_SAR. The code is a bit ugly, though (I mean that the difference
between TOK_SAR and TOK_SHR is not clear for tokens, as the
signedness is just semantics, not something lexical).

-- 
Vincent Lefèvre <address@hidden> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



reply via email to

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