ref: 6a436d0cc010b4e281d3fb5c0adcffca6175f536
parent: f4b395d13141b128ce34e85927ef12a56e148c61
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Fri Jan 8 12:41:21 EST 2016
Add test for casting from void This cast is not allowed, because there is no value to cast.
--- /dev/null
+++ b/cc1/tests/test042.c
@@ -1,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();
+}