scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit 6a436d0cc010b4e281d3fb5c0adcffca6175f536
parent f4b395d13141b128ce34e85927ef12a56e148c61
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri,  8 Jan 2016 17:41:21 +0100

Add test for casting from void

This cast is not allowed, because there is no value
to cast.

Diffstat:
Acc1/tests/test042.c | 20++++++++++++++++++++
1 file changed, 20 insertions(+), 0 deletions(-)

diff --git a/cc1/tests/test042.c b/cc1/tests/test042.c @@ -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(); +}