]> git.sur5r.net Git - cc65/commitdiff
Revert accidentally committed changes for a future PR
authorBas Wassink <b.wassink@ziggo.nl>
Sun, 24 Mar 2019 20:15:34 +0000 (21:15 +0100)
committerBas Wassink <b.wassink@ziggo.nl>
Sun, 24 Mar 2019 20:15:34 +0000 (21:15 +0100)
src/cc65/locals.c
src/cc65/symtab.c

index 02155f412b8a84c916616e06e953e2d5fe6152b9..e2e71e96c02585d62ebe92f7ef5d81e0fcc87f3f 100644 (file)
@@ -276,7 +276,7 @@ static void ParseAutoDecl (Declaration* Decl)
             ** numbers.
             */
             CollReplace (&CurrentFunc->LocalsBlockStack,
-                    (void *)(size_t)GetCurrentLine (),
+                    (void *)(long)GetCurrentLine (),
                     CollCount (&CurrentFunc->LocalsBlockStack) - 1);
 
         } else {
index 72f7f54daf193567529229517b69027e8f8310cb..02b7f0501a8293a7ee4c4ff759b45a362c3a6bd6 100644 (file)
@@ -671,7 +671,7 @@ DefOrRef* AddDefOrRef (SymEntry* E, unsigned Flags)
     DOR = xmalloc (sizeof (DefOrRef));
     CollAppend (E->V.L.DefsOrRefs, DOR);
     DOR->Line = GetCurrentLine ();
-    DOR->LocalsBlockId = (ssize_t)CollLast (&CurrentFunc->LocalsBlockStack);
+    DOR->LocalsBlockId = CollLast (&CurrentFunc->LocalsBlockStack);
     DOR->Flags = Flags;
     DOR->StackPtr = StackPtr;
     DOR->Depth = CollCount (&CurrentFunc->LocalsBlockStack);
@@ -729,9 +729,9 @@ SymEntry* AddLabelSym (const char* Name, unsigned Flags)
                 /* Are we jumping into a block with initalization of an object that
                 ** has automatic storage duration? Let's emit a warning.
                 */
-                if ((size_t)CollLast (AIC) != (size_t)(DOR->LocalsBlockId) &&
+                if ((long)CollLast (AIC) != DOR->LocalsBlockId &&
                     (CollCount (AIC) < DOR->Depth ||
-                    (size_t)CollAt (AIC, DOR->Depth - 1) != DOR->LocalsBlockId)) {
+                    (long)CollAt (AIC, DOR->Depth - 1) != DOR->LocalsBlockId)) {
                     Warning ("Goto at line %d to label %s jumps into a block with "
                     "initialization of an object that has automatic storage duration",
                     GetCurrentLine (), Name);
@@ -758,9 +758,9 @@ SymEntry* AddLabelSym (const char* Name, unsigned Flags)
                 /* Are we jumping into a block with initalization of an object that
                 ** has automatic storage duration? Let's emit a warning.
                 */
-                if ((ssize_t)CollLast (AIC) != DOR->LocalsBlockId &&
+                if ((long)CollLast (AIC) != DOR->LocalsBlockId &&
                     (CollCount (AIC) >= DOR->Depth ||
-                    (ssize_t)CollLast (AIC) >= (long)DOR->Line))
+                    (long)CollLast (AIC) >= (long)DOR->Line))
                     Warning ("Goto at line %d to label %s jumps into a block with "
                     "initialization of an object that has automatic storage duration",
                     DOR->Line, Name);