shithub: scc

Download patch

ref: 9c4b37ce9ec9de17c87e0bea6fa320bac1f146c6
parent: 50c78edf22ceb0a91da49921f16d65baef94cdac
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Sat Jan 9 18:44:21 EST 2016

Test declaration of a variable with the same name that a typedef

--- a/cc1/tests/test034.c
+++ b/cc1/tests/test034.c
@@ -3,6 +3,7 @@
 name: TEST034
 description: Basic test for incomplete structures
 output:
+test034.c:45: error: declared variable 'bar' of incomplete type
 X3	S2	x
 F4	I	E
 X5	F4	foo
@@ -18,6 +19,8 @@
 	X3	M9	.I	#I0	:I
 	r	X3	M9	.I
 }
+X13	S11	bar2
+test034.c:45: error: redeclaration of 'bar'
 */
 
 extern struct X x;
@@ -36,3 +39,7 @@
 	x.v = 0;
 	return x.v;
 }
+
+typedef struct bar bar;
+extern bar bar2;
+bar bar;