History

Fix macro expansion of empty args.

Reimar Döffinger committed 11 years ago

Commit fb6331e1 parent a6149c64 files · +14 −2Browse files

Showing the changes to tests (3 of 4 files). Show all

Unified · Split

3 files
  1. tests/tests2/71_macro_empty_arg.c +9 −0
  2. tests/tests2/71_macro_empty_arg.expect +1 −0
  3. tests/tests2/Makefile +3 −1
tests/tests2/71_macro_empty_arg.c+9−0
@@ -0,0 +1,9 @@
1+#include <stdio.h>
2+
3+#define T(a,b,c) a b c
4+
5+int main(void)
6+{
7+ printf("%d", T(1,+,2) T(+,,) T(,2,*) T(,7,) T(,,));
8+ return 0;
9+}
tests/tests2/71_macro_empty_arg.expect+1−0
@@ -0,0 +1 @@
1+17
tests/tests2/Makefile+3−1
@@ -89,7 +89,9 @@ TESTS = \ · 88 unmodified lines
8989 67_macro_concat.test \
9090 68_macro_param_list_err_1.test \
9191 69_macro_param_list_err_2.test \
92− 70_floating_point_literals.test
92+ 70_floating_point_literals.test \
93+ 71_macro_empty_arg.test \
94+
9395
9496 # 34_array_assignment.test -- array assignment is not in C standard
9597

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t