mirror of
https://github.com/cc65/cc65.git
synced 2024-12-31 11:32:00 +00:00
Local variables of incomplete types could be declared
git-svn-id: svn://svn.cc65.org/cc65/trunk@1171 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
17e86356c2
commit
0b06db99d5
@ -171,6 +171,13 @@ static void ParseOneDecl (const DeclSpec* Spec)
|
||||
/* Get the size of the variable */
|
||||
Size = SizeOf (Decl.Type);
|
||||
|
||||
/* Cannot allocate a variable of zero size */
|
||||
if (Size == 0) {
|
||||
Error ("Variable `%s' has unknown size", Decl.Ident);
|
||||
return;
|
||||
}
|
||||
|
||||
/* */
|
||||
if (SC & (SC_AUTO | SC_REGISTER)) {
|
||||
|
||||
/* Auto variable */
|
||||
|
Loading…
Reference in New Issue
Block a user