scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit 56f48a1788a3d7e1e6ee53d58f4849c6b9b3a01c
parent fe91c529db26c3a363c37b6447542dbb4b1f9358
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sat, 13 Nov 2021 15:01:32 +0100

tests/cc: Fix 0153-cpp-string.c

Stringfier operator can be apply only to a token, not to
a set of tokens. In the same way concatenation operator can
be applied only between tokens that generate a valid token.

Diffstat:
Mtests/cc/execute/0153-cpp-string.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/cc/execute/0153-cpp-string.c b/tests/cc/execute/0153-cpp-string.c @@ -1,10 +1,10 @@ -#define M1(x) "This is a string $ or # or ## " ## #x +#define M1(x,y) "This is a string $ or # or ## " #x y #define STR "This is a string $ or # or ## and it is ok!" int main(void) { - char *s, *t = M1(and it is ok!); + char *s, *t = M1(and, " it is ok!"); for (s = STR; *s && *s == *t; ++s) ++t;