[hackers] [scc] [tests] Add test for empty parameters in macros || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Mon, 6 Mar 2017 16:01:15 +0100 (CET)

commit f79dac5748b0ed8af46be26456a48e2d5ac7ceb8
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Mon Mar 6 16:00:45 2017 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Mon Mar 6 16:00:45 2017 +0100

    [tests] Add test for empty parameters in macros
    
    6.10.3 in Rationale for International Standard Programming Languages
    C rev. 5.10 says:
    
    A new feature of C99: Function-like macro invocations may also now have
    empty arguments, that is, an argument may consist of no preprocessing
    tokens.

diff --git a/tests/execute/0126-macropar.c b/tests/execute/0126-macropar.c
new file mode 100644
index 0000000..1fbeeed
--- /dev/null
+++ b/tests/execute/0126-macropar.c
_AT_@ -0,0 +1,6 @@
+#define F(a, b) a
+int
+main()
+{
+ return F(, 1) 0;
+}
diff --git a/tests/execute/scc-tests.lst b/tests/execute/scc-tests.lst
index 7fda961..07500bd 100644
--- a/tests/execute/scc-tests.lst
+++ b/tests/execute/scc-tests.lst
_AT_@ -116,3 +116,4 @@
 0123-doubleconst.c [TODO]
 0124-enumstruct.c [TODO]
 0125-fundcl.c
+0126-macropar.c [TODO]
Received on Mon Mar 06 2017 - 16:01:15 CET

This archive was generated by hypermail 2.3.0 : Mon Mar 06 2017 - 16:12:19 CET