Jump to content

MrDummy1

Members
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About MrDummy1

  • Rank
    Newbrie
  1. Hi SourceBoost team, To reproduce take the following example: char a; char b = 1; char test1[1]; char test2[2]; char test3[2] = { 1 }; char test4[2] = { 2, 0 }; void main(void) {} With or without the -Su option boostc (tested with boostc 6.97 for a PIC12F615) generates char a; char b = 1; 01D5 3001 MOVLW 0x01 01D6 00D3 MOVWF gbl_b char test1[1]; char test2[2]; char test3[2] = { 1 }; 01D7 3001 MOVLW 0x01 01D8 00CB MOVWF gbl_test3 char test4[2] = { 2, 0 }; 01D9 3002 MOVLW 0x02 01DA 00CD MOVWF gbl_test4 01DB 01CE CLRF gbl_test4+D'1' According to Ansi (9899/1999 6.7.8) all unused elements should be set to 0, which I expected boostc to do if I left out the -Su flag. I retested with extra code referencing the uninitalized vars in case the compiler optimized them away, but this did not make any difference. Regards, MrDummy1
×
×
  • Create New...