This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Warning 52: Value has been truncated into 8 bits

Hi,

In my program which initially works fine, after i initialize 1 or more memory space for variables, it shows "Warning 52: Value has been truncated into 8 bits"!

Although it is just a warning, and won't affect the compilation, but it causes the application works unexpectedly.

Can you pls advice?
Thank you.

regards,
delphia

Parents
  • "Although it is just a warning, and won't affect the compilation, but it causes the application works unexpectedly"
    Warnings are import becuase it can compile, just maybe not the way you might expect. There should be no warnings you do not understand.

    Warning 52 is an assembler warning not a compiler warning.

    It means what it says. You are tring to use a value that is bigger than 8 bit where 8 bits is expected. Most likly a constant value. The assmbler thinks you are OK with that and truncated the high order bits.

Reply
  • "Although it is just a warning, and won't affect the compilation, but it causes the application works unexpectedly"
    Warnings are import becuase it can compile, just maybe not the way you might expect. There should be no warnings you do not understand.

    Warning 52 is an assembler warning not a compiler warning.

    It means what it says. You are tring to use a value that is bigger than 8 bit where 8 bits is expected. Most likly a constant value. The assmbler thinks you are OK with that and truncated the high order bits.

Children
No data