SDCC : mcs51/gbz80/z80/ds390/pic16/pic14/TININative/ds400/hc08 3.0.0 #6037
uint8_t variable0 = 0;
Declaring these 2 global variables, both should be initialized to 0 according to ANSI, but only variable0 is.
Bug sample attached showing that variable1 is not initialized to 0 because LED1 blinks (check simple code attached).
When running this code on a simulator it works correctly but I think that it is because RAM values are not random on start. However it's not working on real-life PIC.
Category "none" because I don't know where the bug is.
If you need anything else please let me know.
Thank you very much
P.S: hex file is different if variables are declared this way (and I think that hex file shouldn't change):
Log in to post a comment.