Skip to main content
Knowledgebase
Home
Renesas India - Knowledgebase

W0520068 Message(CC-RL)

Last Updated:04/17/2017

Question:

I am using the CC-RL compiler for RL78 devices. The message W0520068 appears when I write the statement to shift the constant 1 shown below.
W0520068: Integer conversion resulted in a change of sign.
Why is this judged to change the sign?
(Statement) a&(1<<b)

Answer:

The constant is of the int type, so the highest-order bit represents the sign.
The message is shown since shifting the 1 of the int type to the left affects the value of the highest-order bit.
The message will not appear if the 1 in the statement is clearly specified as having no sign by using the suffix U as shown below. 
(Example)
 a & (1U << b)
Suitable Products
e² studio
CS+ (formerly CubeSuite+)
C Compiler Package for RL78 Family
  • Was this article helpful?