Software download for tools
   



Evaluation Software


Upgrades


Utilities


  Sample Codes  


 
Known bugs in Renesas C/C++ Compiler Package
for H8, H8S, H8SX family Ver.6
The Known bugs in the ver.6 series of the Renesas C/C++ Compiler Package for H8, H8S, H8SX family are listed below.

The target products/versions of these bugs are as follows.

Package Package version Compiler version
For Windows
6.00 Release02
6.00.02
For Solaris
6.00 Release02
6.00.02
For HP9000/700
6.00 Release02
6.00.02

The detail of Known bugs information

1. Set and Refer the bit field member(H8C-0002)

1.1 Description
When a bit field member is set or referred via address, the object module may be incorrect.

1.2 Conditions
This problem may occur if the following five conditions are satisfied:
(1)H8SXA or H8SXX is selected as CPU option.
(2)A structure has a bit field member which bit size is lower than 8-bit.
(3)The structure variable(above (2)) is not allocated on a register.
(4)An expression is set/reference to it(above (3) variable)
(5)An offset from top of the structure( above (4)'s bit field member) is following:
Address Size:20 0x0-0x7fff or 0x000f8000- 0x000fffff
Address Size:24 0x0-0x7fff or 0x00ff8000- 0x00ffffff
Address Size:28 0x0-0x7fff or 0x0fff8000- 0x0fffffff
Address Size:32 0x0-0x7fff or 0xffff8000- 0xffffffff

1.3 Workaround
This problem can be circumvented in either of the following ways:
Substitute the address of structure variable which has bit field members to pointer type variable and set/refer the bit field member by the pointer variable.

Original:
     
     typedef struct {
         unsigned char a:2;                   // Condition (2)(3)(5)
         unsigned char b:2;
         unsigned char c:4;
     }st;

     extern st str;                           // Condition(3)

     void func(unsigned char);

     char ff(char var01)
     {
         func(str.b);                         // Condition(4)
     } 
     
Modified:
     
     typedef struct {
        unsigned char a:2;
        unsigned char b:2;
        unsigned char c:4;
     }st;

     extern st str;
     volatile st *tmp;

     void func(unsigned char);

     char ff(char var01)
     {
        tmp = &str;
        // Substitute the address of structure variable to pointer variable
        func(tmp->b);
        // Refer the bit field member via pointer
     }
    
 

© 2005 Renesas Technology Corp., All Rights Reserved.