tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] parsing 0x1e+1 as 0x1e +1


From: Sergey Korshunoff
Subject: Re: [Tinycc-devel] parsing 0x1e+1 as 0x1e +1
Date: Wed, 27 Apr 2016 18:21:11 +0300

> CompCert 2.4 outputs 0x10 0x1e (following its interpretation of 6.4.8)
> though if the user expects a subtraction in both cases, he probably
> expects that E yields the same value in both cases

pcc outputs 0x10 0x1e too. But tcc with first patch outputs 0x10 0x1d
(as user expects)

PS: a second patch attached which allows to add space after 0x1e. It
is based on scanning expanded string of the macro in next(). and
checking some rules. For example, a patch inserts a space after
TOK_PPNUM which followed by '+' or '-'. May be this is needed only
when -E is given..

Attachment: 02-macro-expansion.patch
Description: Binary data


reply via email to

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