shithub: scc

Download patch

ref: 1ca006ceea6818ed2195fbde05e2eb92711e99e9
parent: e661871dd3e996607e7444be1e0ca86be0a8565f
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Mon Nov 1 06:07:09 EDT 2021

tests/cc: Fix 0182-voidcast.c

Reading an automatic value not initialized is not
defined in the standard, and qbe has some problems
in this kind of cases. As we are not testing that
case in the test it is better to remove that problem.

--- a/tests/cc/execute/0182-voidcast.c
+++ b/tests/cc/execute/0182-voidcast.c
@@ -1,13 +1,14 @@
+int i;
+char c;
+float f;
+int *ptr;
+enum {
+	INT
+} e;
+
 int
 main()
 {
-	int i;
-	char c;
-	float f;
-	int *ptr;
-	enum {
-		INT
-	} e;
 
 	(void) i;
 	(void) c;
--- a/tests/cc/execute/scc-tests.lst
+++ b/tests/cc/execute/scc-tests.lst
@@ -172,7 +172,7 @@
 0179-sizeof.c [TODO]
 0180-incomplete.c
 0181-stringize.c [TODO]
-0182-voidcast.c [TODO]
+0182-voidcast.c
 0183-negenum.c
 0184-esc-macro.c
 0185-esc-macro2.c