Fixed in svn revision #4984. Frieder, thanks for your for discovering the cause!
Borut Frieder Ferlemann wrote: > Hi Martin, > > Martin Leopold schrieb: > >> problems with sdcc. The statement returns a bunch of warnings and fails >> in the assembler with the following error: >> >> sdcc -mmcs51 test_condit.c >> test_condit.c:15: warning 94: comparison is always false due to limited >> range of data type >> test_condit.c:15: warning 94: comparison is always false due to limited >> range of data type >> test_condit.c:15: warning 94: comparison is always false due to limited >> range of data type >> test_condit.c:15: warning 94: comparison is always false due to limited >> range of data type >> test_condit.c:15: warning 94: comparison is always false due to limited >> range of data type >> test_condit.c:15: warning 94: comparison is always false due to limited >> range of data type >> ?ASxxxx-Error-<o> in line 136 of test_condit.asm >> <o> .org in REL area or directive / mnemonic error >> >> ... >> > > The assembler seems to choke on the extra long line in the test_condit.asm > file: > > ; test_condit.c:15: U0GCR = 230400 == 2400 ? 6 + ((CLKCON & (1 << > CC2430_CLKCON_OSC)) >> CC2430_CLKCON_OSC) : 230400 == 4800 ? 7 + ((CLKCON & > (1 << CC2430_CLKCON_OSC)) >> CC2430_CLKCON_OSC) : 230400 == 9600 ? 8 + > ((CLKCON & (1 << > CC2430_CLKCON_OSC)) >> CC2430_CLKCON_OSC) : 230400 == 14400 ? 8 + ((CLKCON & > (1 << CC2430_CLKCON_OSC)) >> CC2430_CLKCON_OSC) : 230400 == 19200 ? 9 + > ((CLKCON & (1 << CC2430_CLKCON_OSC)) >> CC2430_CLKCON_OSC) : 230400 == 28800 > ? 9 + ((CLKCON & (1 << > CC2430_CLKCON_OSC)) >> CC2430_CLKCON_OSC) : 230400 == 38400 ? 10 + ((CLKCON & > (1 << CC2430_CLKCON_OSC)) >> CC2430_CLKCON_OSC) : 230400 == 57600 ? 10 + > ((CLKCON & (1 << CC2430_CLKCON_OSC)) >> CC2430_CLKCON_OSC) : 230400 == 76800 > ? 11 + ((CLKCON & (1 << > CC2430_CLKCON_OSC)) >> CC2430_CLKCON_OSC) : 230400 == 115200 ? 11 + ((CLKCON > & (1 << CC2430_CLKCON_OSC)) >> CC2430_CLKCON_OSC) : 230400 == 153600 ? 12 + > ((CLKCON & (1 << CC2430_CLKCON_OSC)) >> CC2430_CLKCON_OSC) : 230400 == 230400 > ? 12 + ((CLKCON & (1 << > CC2430_CLKCON_OSC)) >> CC2430_CLKCON_OSC) : 230400 == > > > > As a workaround you can compile test_condit.c if you tell SDCC > to not include the C-source in the asssembler file: > > sdcc --no-c-code-in-asm test_condit.c > > Another workaround would be to first run "indent" over test_condit.c > so some line-feeds are inserted: > > indent test_condit.c > sdcc test_condit.c > > It's nice you bombard SDCC with autogenerated code (nesC), > this problem would not likely have been detected with > human-written code:) > > Greetings, > Frieder > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Sdcc-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sdcc-user
