bug:
----------------------------------------------------------------------
#define hexCh(c (c >= 10 ? 'a' + c - 10 : '0' + c)
hexCh(c);
out:
jiang@jiang:~/test$ ./tcc -E c4.c
# 1 "c4.c"
(c >= 10 ? 'a' + c - 10 : '0' + c);
---------------------------------------------------------------
#define hexCh(c/3) (c >= 10 ? 'a' + c - 10 : '0' + c)
hexCh(c);
out:
jiang@jiang:~/test$ ./tcc -E c4.c
# 1 "c4.c"
/3) (c >= 10 ? 'a' + c - 10 : '0' + c);
jiang@jiang:~/test$
after patch:
# 1 "c4.c"
c4.c:1: error: may not appear in macro parameter list: "("
jiang@jiang:~/test$
jiang@jiang:~/test$ ./tcc -E c4.c
# 1 "c4.c"
c4.c:1: error: may not appear in macro parameter list: "/"
jiang@jiang:~/test$
This commit is contained in:
1
tests/tests2/69_macro_concat.expect
Normal file
1
tests/tests2/69_macro_concat.expect
Normal file
@ -0,0 +1 @@
|
||||
69_macro_concat.c:2: error: '/' may not appear in parameter list
|
||||
Reference in New Issue
Block a user