[hackers] [scc] Add test for casting from void || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Fri, 8 Jan 2016 17:51:13 +0100 (CET)

commit 6a436d0cc010b4e281d3fb5c0adcffca6175f536
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Fri Jan 8 17:41:21 2016 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Fri Jan 8 17:41:21 2016 +0100

    Add test for casting from void
    
    This cast is not allowed, because there is no value
    to cast.

diff --git a/cc1/tests/test042.c b/cc1/tests/test042.c
new file mode 100644
index 0000000..f711a9e
--- /dev/null
+++ b/cc1/tests/test042.c
_AT_@ -0,0 +1,20 @@
+/*
+name: TEST042
+description: Test for bug parsing ternary operators
+output:
+test042.c:19: error: bad type convertion requested
+F1 I
+G2 F1 main
+{
+\
+F3 0
+X4 F3 f
+*/
+
+int
+main(void)
+{
+ void f(void);
+
+ return (int) f();
+}
Received on Fri Jan 08 2016 - 17:51:13 CET

This archive was generated by hypermail 2.3.0 : Fri Jan 08 2016 - 18:00:18 CET