9 } Values[2]= {{{"abc", "def"}}, {{"ghi", "jkl"}}};
16 volatile char code* * p;
18 //first subexpression 'Values[0].Name' is evaluted as follows:
20 //mov r3,#(_Values >> 8)
21 //mov r4,#(_Values >> 16) ;this is wrong - should be 'mov r4,#128' shouldn't it?
22 //second subexpression 'Values[1].Name' is evaluted as follows:
27 //addc a,#(_Values >> 8)
29 //mov r4,#128 ;this is all right
30 p = i ? Values[0].Name : Values[1].Name;
31 #if defined(SDCC_mcs51)
33 ASSERT((unsigned char)(v>>16)==0x80);
36 //everything is all right with explicit typecast - but why do I need it?
37 p = i ? (char code**)Values[0].Name : (char code**)Values[1].Name;
38 #if defined(SDCC_mcs51)
40 ASSERT((unsigned char)(v>>16)==0x80);
43 //this is the best/optimal version - again with explicit typecast
44 //Question: Why is it necessary to have explicit typecast to make things right?
45 p = i ? (char code* code*)Values[0].Name : (char code* code*)Values[1].Name;
46 #if defined(SDCC_mcs51)
48 ASSERT((unsigned char)(v>>16)==0x80);