Skip to main content
Renesas Electronics America - Knowledgebase

Bitwise access and the error code E0520018, E0520065 (CC-RL)

Last Updated:04/17/2017


I am using the CC-RL compiler for RL78 devices. The error codes E0520018 and E0520065 appear when I add “.<numeral>” to the name of a variable for access to a bit of the variable. 
E0520018: Expected a “)”.
E0520065: Expected a “;”.


CC-RL does not have a facility for the output of code which controls the value of a specific bit by adding “_.<numeral>” to the name of a variable.
Define the variable so that its value can be handled as either a union of bytes or bits.

typedef union {
 unsigned char ByteMem;
     unsigned char no0:1;
     unsigned char no1:1;
     unsigned char no2:1;
     unsigned char no3:1;
     unsigned char no4:1;
     unsigned char no5:1;
     unsigned char no6:1;
     unsigned char no7:1;
 } BitfMem;
volatile Byte_Bitf_Member data;
void func(void)
 data.ByteMem = 1; // Operation to assign the value 1 to the byte
 data.BitfMem.no7 = 1; // Operation to assign the value 1 to a bit

Suitable Products
e² studio
CS+ (formerly CubeSuite+)
C Compiler Package for RL78 Family