On 3/9/07, <b class="gmail_sendername">Jim Bacon</b> <<a href="mailto:jwbacon@comcast.net">jwbacon@comcast.net</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I'd really like to agree with that, Richard, but it seems to me that<br>'removing limits' like that could generate some "issues".<br>We're not dealing with 32 bit flash space, nor are we looking at
<br>'unlimited stack sizes' like we're used to on the PC.<br>My preference would be to just declare a compiler limit publicly,<br>and/or issue a caveat that this type of program structure can<br>possibly be placed too near a 64K limit.
</blockquote><div><br></div></div>I think Richard is correct. Switch statements need not be implemented as relative branches. In fact, the GNU tools generate jump tables if the number of switch targets is large or the the size of each case statement is large. And if the jump table can hold any absolute target address, there is no limit to how large a case statement is (within the memory limits of course).
<br><br>And I suspect that is exactly how Richard does things if whatever heuristic he uses determines that a relative branch should not be used.<br>-- <br>--<br>"To love for the sake of being loved is human; to love for the sake of loving is Angelic." -- Alphonse de Lamartine