From: SourceForge.net <no...@so...> - 2004-09-21 20:24:02
|
Bugs item #1032131, was opened at 2004-09-21 20:24 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1032131&group_id=599 Category: pic16 target Group: None Status: Open Resolution: None Priority: 5 Submitted By: ccsporters (tecodev) Assigned to: Nobody/Anonymous (nobody) Summary: error in unsigned right-shift Initial Comment: The following code snippet fails: ===== // set TYPE to "int" or "long" (works fine for "char") #define TYPE int int main () { volatile unsigned char count; volatile unsigned TYPE ires, ibase; count = 5; ibase = 0x1234; //ires = ((unsigned TYPE)0x1234) >> 5; ires = ((unsigned TYPE)0x1234) >> count; // this line fails //ires = ibase >> 5; ires = ibase >> count; // this line fails return 0; } ===== Compiling it with "sdcc -mpic16 -p18f452" fails: oops pic16_aopPut:AOP_DIR did this 0x12 oops pic16_aopPut:AOP_DIR did this a oops pic16_aopPut:AOP_DIR did this (_main_ibase_1_1 + 1) oops pic16_aopPut:AOP_DIR did this a shift2.asm:58:Error [113] Symbol not previously defined (a). shift2.asm:61:Error [113] Symbol not previously defined (a). shift2.asm:71:Error [113] Symbol not previously defined (a). shift2.asm:74:Error [113] Symbol not previously defined (a). I tried it with SDCC : pic16 2.4.4 #846 (Sep 21 2004) (UNIX). Raphael Neider ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1032131&group_id=599 |