[hackers] [scc] Add basic test for defined() in #if || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Mon, 5 Oct 2015 16:58:57 +0200 (CEST)

commit e71640c89e83818cd86e00ed63e0db88ec70feb8
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Mon Oct 5 16:58:33 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Mon Oct 5 16:58:33 2015 +0200

    Add basic test for defined() in #if

diff --git a/cc1/tests/test033.c b/cc1/tests/test033.c
new file mode 100644
index 0000000..e9176af
--- /dev/null
+++ b/cc1/tests/test033.c
_AT_@ -0,0 +1,17 @@
+/*
+name: TEST033
+description: test for #if defined()
+output:
+G1 I c
+*/
+
+#if defined(FOO)
+int a;
+#elif !defined(FOO) && defined(BAR)
+int b;
+#elif !defined(FOO) && !defined(BAR)
+int c;
+#else
+int d;
+#endif
+
Received on Mon Oct 05 2015 - 16:58:57 CEST

This archive was generated by hypermail 2.3.0 : Mon Oct 05 2015 - 17:00:12 CEST