Unreachable Code

Help
NickNM
2005-07-22
2013-03-12
  • NickNM
    NickNM
    2005-07-22

    Hi:

    I have recently started using SDCC with the Chipcon CC2500 eval board.  One of the problems I am having when compiling the examples is the "unreachable code" warning.  This is caused by the Chipcon macros (which are ANSI compliant).  An example is as follows:
    #define UART_TX_ENABLE()           
    do { REN0 = 0; } while (0)
    How do I disable this warning (on a per macro basis or globally)?
    Also regardless if I disable this warning, will the SDCC optimize the code out (i.e dead code elimination)?  If so is their a way to prevent this?

    Thanks in advance. 

     
    • Maarten Brock
      Maarten Brock
      2005-07-22

      Nick,

      I cannot reproduce this with SDCC 2.5.0. Which version are you using?

      Maarten