Menu

#2216 copy bit field variable to memory

closed-fixed
None
MCS51
5
2013-12-15
2013-09-11
c_gapinski
No

I have problem with attached source code

I would like to add some bytes to xram memory, but if I use union byte_in_bit_memory compilation finished with error:

sdcc Main.c

Main.c:28: warning 88: cast of LITERAL value to 'generic' pointer
from type 'const-unsigned-int literal'
to type 'volatile-unsigned-char generic* fixed'
Internal error: validateOpType failed in OP_SYMBOL(IC_RESULT (ic)) @ SDCCptropt.c:335: expected symbol, got value

In second example if I use dummy_byte I've go only warning

Main.c:29: warning 88: cast of LITERAL value to 'generic' pointer
from type 'const-unsigned-int literal'
to type 'volatile-unsigned-char generic* fixed'

I used the newest version from svn:
SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ds390/TININative/ds400/hc08/s08/stm8 3.3.1 #8840 (Sep 11 2013) (Linux)

Discussion

  • c_gapinski

    c_gapinski - 2013-09-11

    Attached file

     
  • Maarten Brock

    Maarten Brock - 2013-09-11

    Why don't you specify the memory type in the definition of BIG_ARRAY if you know (according to the comment) where it should be. You are aware that there are several distinctive addresses 0x8000 in the mcs51 memory spaces, right? If you don't tell SDCC how should it know what you mean?

    Maarten

     
  • c_gapinski

    c_gapinski - 2013-09-12

    I add xdata specifier:
    BIG_ARRAY ((
    xdata volatile unsigned char *)0x8000)

    Warning 88 disapear, but internal error is the same:
    Internal error: validateOpType failed in OP_SYMBOL(IC_RESULT (ic)) @ SDCCptropt.c:335: expected symbol, got value

    I think, the adress value (0x8000 is not a problem).

     
  • Maarten Brock

    Maarten Brock - 2013-12-15
    • status: open --> closed-fixed
    • assigned_to: Maarten Brock
     
  • Maarten Brock

    Maarten Brock - 2013-12-15

    Fixed in SDCC 3.3.2 #8903.

     

Log in to post a comment.