mirror of
https://github.com/cc65/cc65.git
synced 2025-03-03 09:32:33 +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 */
|
/* Get the size of the variable */
|
||||||
Size = SizeOf (Decl.Type);
|
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)) {
|
if (SC & (SC_AUTO | SC_REGISTER)) {
|
||||||
|
|
||||||
/* Auto variable */
|
/* Auto variable */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user