#898 sfr's used in a switch statement are not treated volatile

closed-fixed
Erik Petrich
5
2013-05-25
2005-03-16
Maarten Brock
No

sfr's used in a switch statement are not treated volatile.

SDCC :
mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/
ds400/hc08 2.4.8 #971 (Mar 13 2005) (MINGW32)

Example code is attached. SBUF should be read once,
but that is not the case.

Maarten

Discussion

  • Maarten Brock
    Maarten Brock
    2005-03-16

    C and asm showing the bug

     
    Attachments
  • Erik Petrich
    Erik Petrich
    2005-03-17

    • status: open --> closed
     
  • Erik Petrich
    Erik Petrich
    2005-03-17

    • milestone: --> fixed
    • assigned_to: nobody --> epetrich
    • status: closed --> closed-fixed
     
  • Erik Petrich
    Erik Petrich
    2005-03-17

    Logged In: YES
    user_id=635249

    Fixed in src/SDCCicode.c 1.218 (SDCC version 2.4.8 #976)