edt 0 Posted March 29, 2007 Report Share Posted March 29, 2007 I came across the following behavior. The problem is very reproducible. I think the compiler accidentally assumes every immediate value is 0. 33: switch (3) { 34: case 0: 35: trisa = 0x01; 0003 3001 MOVLW 0x1 0004 1683 BSF 0x3, 0x5 0005 1303 BCF 0x3, 0x6 0006 0085 MOVWF 0x5 36: break; 37: case 1: 38: trisa = 0x23; 39: break; 40: } I'm seeing this with BoostC 6.70 on Windows XP. The target is a P16f877A. Quote Link to post Share on other sites
emte 0 Posted March 29, 2007 Report Share Posted March 29, 2007 (edited) Does it still do this if you insert the "default:" case as ANSI defines it? Your example seems to be missing it... Edited March 29, 2007 by emte Quote Link to post Share on other sites
edt 0 Posted March 30, 2007 Author Report Share Posted March 30, 2007 Does it still do this if you insert the "default:" case as ANSI defines it? <{POST_SNAPBACK}> Yes Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.