[prev in list] [next in list] [prev in thread] [next in thread]
List: pcc-list
Subject: Re: [Pcc] cpp lost space after non-macro
From: Anders Magnusson <ragge () ludd ! ltu ! se>
Date: 2015-09-28 16:26:09
Message-ID: 56096A21.7070501 () ludd ! ltu ! se
[Download RAW message or body]
Den 2015-09-28 kl. 15:03, skrev Iain Hibbert:
> Hi
>
> the following code example
>
> #define FOO(n) n
>
> struct FOO { int a; };
>
> #define BAR(x) struct FOO x = { 0 }
>
> BAR(bar);
>
> fails to compile
>
> % pcc -c test.c
> test.c, line 7: syntax error
> error: /usr/libexec/ccom terminated with status 1
>
> this is because cpp has removed a space after it decided not to substitute
> FOO as it was not a macro
>
> % pcc -e test.c
> # 1 "test.c"
>
>
> struct FOO { int a; };
>
>
>
> struct FOObar = { 0 };
> ^^ here
>
...and now the space is restored :-)
-- R
_______________________________________________
Pcc mailing list
Pcc@lists.ludd.ltu.se
https://lists.ludd.ltu.se/cgi-bin/mailman/listinfo/pcc
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic