Menu ▾ ▴

#3046 [z80] Weird warning on code using uninitialized variable

closed-fixed
None
other
5
2020-06-13
2020-06-09
No
int f()
{
  int hrs, min;

  min /= 10;
  hrs /= 10;

  return hrs + min;
}

Compiling this with sdcc test.c -mz80 results in this :

test.c:5: warning 84: 'auto' variable 'min' may be used before initialization
test.c:6: warning 84: 'auto' variable 'hrs' may be used before initialization
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp2. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp2. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp0. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp0. Please contact sdcc authors with source code to reproduce.

Tested with commit 11662.

Related

Bugs: #2362
Bugs: #3051
Wiki: z80

Discussion

  • Erik Petrich

    Erik Petrich - 2020-06-13

    Fixed in revision [r11667]

     
  • Erik Petrich

    Erik Petrich - 2020-06-13
    • status: open --> closed-fixed
    • assigned_to: Erik Petrich
     

Log in to post a comment.