Made C's sizeof operator work with initialized void variables.

Added regression tests that check cc65's handling of void variables.
This commit is contained in:
Greg King
2017-03-12 12:55:31 -04:00
parent a780df1fe1
commit 750a527100
7 changed files with 147 additions and 62 deletions

11
test/err/void-size2.c Normal file
View File

@@ -0,0 +1,11 @@
/*
!!DESCRIPTION!! Size of void cast
!!ORIGIN!! cc65 regression tests
!!LICENCE!! Public Domain
!!AUTHOR!! Greg King
*/
unsigned test (void)
{
return sizeof ((void)12345);
}