]> git.sur5r.net Git - cc65/blobdiff - src/cc65/locals.c
Merge https://github.com/cc65/cc65
[cc65] / src / cc65 / locals.c
index d3d73d1979936e8215e200251652a37b38912637..02155f412b8a84c916616e06e953e2d5fe6152b9 100644 (file)
@@ -143,7 +143,7 @@ static void ParseRegisterDecl (Declaration* Decl, int Reg)
             ** we cannot allow that here.
             */
             if (ParseInit (Sym->Type) != Size) {
-                Error ("Cannot initialize flexible array members of storage class `register'");
+                Error ("Cannot initialize flexible array members of storage class 'register'");
             }
 
             /* Generate code to copy this data into the variable space */
@@ -171,7 +171,7 @@ static void ParseRegisterDecl (Declaration* Decl, int Reg)
 
     /* Cannot allocate a variable of zero size */
     if (Size == 0) {
-        Error ("Variable `%s' has unknown size", Decl->Ident);
+        Error ("Variable '%s' has unknown size", Decl->Ident);
     }
 }
 
@@ -272,10 +272,12 @@ static void ParseAutoDecl (Declaration* Decl)
             Sym->Flags |= SC_REF;
 
             /* Make note of auto variables initialized in current block.
-               We abuse the Collection somewhat by using it to store line
-               numbers. */
-            CollReplace (&CurrentFunc->LocalsBlockStack, (void *)(long)GetCurrentLine (),
-                CollCount (&CurrentFunc->LocalsBlockStack) - 1);
+            ** We abuse the Collection somewhat by using it to store line
+            ** numbers.
+            */
+            CollReplace (&CurrentFunc->LocalsBlockStack,
+                    (void *)(size_t)GetCurrentLine (),
+                    CollCount (&CurrentFunc->LocalsBlockStack) - 1);
 
         } else {
             /* Non-initialized local variable. Just keep track of
@@ -355,7 +357,7 @@ static void ParseAutoDecl (Declaration* Decl)
 
     /* Cannot allocate a variable of zero size */
     if (Size == 0) {
-        Error ("Variable `%s' has unknown size", Decl->Ident);
+        Error ("Variable '%s' has unknown size", Decl->Ident);
     }
 }
 
@@ -409,7 +411,7 @@ static void ParseStaticDecl (Declaration* Decl)
 
     /* Cannot allocate a variable of zero size */
     if (Size == 0) {
-        Error ("Variable `%s' has unknown size", Decl->Ident);
+        Error ("Variable '%s' has unknown size", Decl->Ident);
     }
 }