[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] C99 token pasting
From: |
Jay Foad |
Subject: |
Re: [Tinycc-devel] C99 token pasting |
Date: |
Mon, 14 Apr 2014 10:20:23 +0100 |
On 12 April 2014 12:23, Thomas Preud'homme <address@hidden> wrote:
> On April 1, 2014 5:22:55 PM GMT+08:00, Jay Foad <address@hidden> wrote:
>> C99 specifies the behaviour of token pasting when either (or both) of
>> the arguments to be pasted expand to an empty sequence of tokens. tcc
>> doesn't seem to implement this:
>>
>> $ cat p.c
>> #define P(A,B) A ## B bob
>> #define Q(A,B) A ## B+
>> P(jim,)
>> Q(+,)
>> $ ./tcc -E p.c
>> # 2 "p.c"
>> p.c:3: warning: pasting "jim" and " " does not give a valid
>> preprocessing token
>>
>> jim bob
>> ++
>>
>> In the P() example, the warning is inappropriate.
>> In the Q() example, the result is wrong. We should get + and + as two
>> separate tokens, not the single token ++.
>
> Fixed in mob.
Works for me. Thanks!
Jay.