scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 9c4b37ce9ec9de17c87e0bea6fa320bac1f146c6
parent 50c78edf22ceb0a91da49921f16d65baef94cdac
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sat,  9 Jan 2016 23:44:21 +0100

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

Diffstat:
Mcc1/tests/test034.c | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git 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 @@ G5 F4 foo 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 @@ int foo() x.v = 0; return x.v; } + +typedef struct bar bar; +extern bar bar2; +bar bar;