Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#431 local initialized code space vars

closed-fixed
Johan Knol
7
2013-05-25
2003-01-03
Anonymous
No

Hi,

.. it probably does not affect many, but if you
use local initialized variables in code space
they are appear twice in the .lst and .ihx files:

main()
{
unsigned char code ch[] = "This string should
appear once in the .lst file";
volatile unsigned char c;

c = ch[8];
}

gives in the .lst file:

156 .area CSEG
(CODE)
0040 157 _main_ch_1_1:
0040 54 68 69 73 20 73 158 .ascii "This
string should appear once in the .lst file "
74 72 69 6E 67 20
73 68 6F 75 6C 64
20 61 70 70 65 61
72 20 6F 6E 63 65
20 69 6E 20 74 68
65 20 2E 6C 73 74
20 66 69 6C 65 20
0070 00 159 .db 0x00
0071 160 __str_0:
0071 54 68 69 73 20 73 161 .ascii "This
string should appear once in the .lst file "
74 72 69 6E 67 20
73 68 6F 75 6C 64
20 61 70 70 65 61
72 20 6F 6E 63 65
20 69 6E 20 74 68
65 20 2E 6C 73 74
20 66 69 6C 65 20
00A1 00 162 .db 0x00
163 .area XINIT
(CODE)

(Sorry, the line-breaks forced by the web-formular are
somewhat awkward)

Regards,

Frieder

Discussion

  • Johan Knol
    Johan Knol
    2003-01-12

    • labels: --> C-Front End
    • priority: 5 --> 7
     
  • Johan Knol
    Johan Knol
    2003-01-24

    Logged In: YES
    user_id=63512

    fixed in src/SDCCast.c:156

     
  • Johan Knol
    Johan Knol
    2003-01-24

    • milestone: --> fixed
    • assigned_to: nobody --> johanknol
    • status: open --> closed-fixed