Prevent ## to appear at start or end of macro
This commit is contained in:
2
tests/tests2/65_macro_concat_start.c
Normal file
2
tests/tests2/65_macro_concat_start.c
Normal file
@ -0,0 +1,2 @@
|
||||
#define paste(A,B) ##A B
|
||||
paste(x,y)
|
||||
1
tests/tests2/65_macro_concat_start.expect
Normal file
1
tests/tests2/65_macro_concat_start.expect
Normal file
@ -0,0 +1 @@
|
||||
65_macro_concat_start.c:1: error: '##' invalid at start of macro
|
||||
2
tests/tests2/66_macro_concat_end.c
Normal file
2
tests/tests2/66_macro_concat_end.c
Normal file
@ -0,0 +1,2 @@
|
||||
#define paste(A,B) A B##
|
||||
paste(x,y)
|
||||
1
tests/tests2/66_macro_concat_end.expect
Normal file
1
tests/tests2/66_macro_concat_end.expect
Normal file
@ -0,0 +1 @@
|
||||
66_macro_concat_end.c:2: error: '##' invalid at end of macro
|
||||
@ -79,7 +79,9 @@ TESTS = \
|
||||
61_undefined_enum.test \
|
||||
62_enumerator_redefinition.test \
|
||||
63_local_enumerator_redefinition.test \
|
||||
64_macro_nesting.test
|
||||
64_macro_nesting.test \
|
||||
65_macro_concat_start.test \
|
||||
66_macro_concat_end.test
|
||||
|
||||
# 30_hanoi.test -- seg fault in the code, gcc as well
|
||||
# 34_array_assignment.test -- array assignment is not in C standard
|
||||
|
||||
Reference in New Issue
Block a user