test if empty struct is allowed

git-svn-id: file:///Users/aamine/c/gitwork/public/cbc/trunk@3966 1b9489fe-b721-0410-924e-b54b9192deb8
This commit is contained in:
Minero Aoki 2008-08-29 05:03:19 +00:00
parent 8cbf437fb7
commit 85f2af8c84
2 changed files with 14 additions and 0 deletions

13
test/empstruct.cb Normal file
View File

@ -0,0 +1,13 @@
import stdio;
struct s {};
int
main(int argc, char **argv)
{
struct s st;
struct s* p = &st;
printf("%p\n", p);
return 0;
}

View File

@ -153,6 +153,7 @@ assert_compile_error array-semcheck2.cb
assert_out "11;22" ./struct assert_out "11;22" ./struct
assert_stat 0 ./struct-semcheck assert_stat 0 ./struct-semcheck
assert_status 0 $CBC empstruct.cb
assert_compile_error struct-semcheck2.cb assert_compile_error struct-semcheck2.cb
assert_compile_error struct-semcheck3.cb assert_compile_error struct-semcheck3.cb
assert_compile_error struct-semcheck4.cb assert_compile_error struct-semcheck4.cb