 |
|
 |
RENESAS TOOL NEWS on October 1, 2004: RSO-M3T-NC308WA-041001D
A Note on Using C-Compiler Packages M3T-NC308WA and M3T-NC30WA
|
Please take tone of the following problem in using the M3T-NC308WA and
M3T-NC30WA C-compiler packages:
- On an inline function that returns a value of type _Bool
- Products and Versions Concerned
| (1) | C Compiler packages for the M16C/60, M16C/30, M16C/Tiny, M16C/20, M16C/10, and R8C/Tiny series of MCUs
M3T-NC30WA V.5.10 Release 1 through V.5.30 Release 1 |
| (2) | C Compiler packages for the M32C/80, and M16C/80 series of MCUs
M3T-NC308WA V.5.00 Release 1 through V.5.20 Release 1 |
- Description
If a source file is compiled in which an inline function that returns a value of type _Bool is called, a system error will arise.
- 2.1 Conditions
- This problem occurs if the following conditions are all satisfied:
| (1) | An inline function that returns a value of type _Bool is declared. |
| (2) | After this definition, the above inline function is called. |
| (3) | Option -Oforward_function_to_inline(-OFFTI) is not used at compilation. |
- 2.2 Example
---------------------------------------------------------------------
inline _Bool sub(void) // Condition (1)
{
return 1;
}
void func(void)
{
_Bool ret;
ret=sub(); // Condition (2)
}
-----------------------------------------------------------------------
- Workaround
This problem can be circumvented in any of the following ways:
| (1) | Use the -OFFTI option at compilation. |
| (2) | Declare no inline function having a return value of type _Bool. |
| (3) | Define the return value of the inline function as of type other than _Bool. |
- Schedule of Fixing the Problem
We plan to fix this problem in our next release of the products.
|
 |