 |
|
 |
RENESAS TOOL NEWS on November 16, 2004: RSO-M3T-NC308WA-041116D
A Note on Using C-Compiler Packages
M3T-NC308WA and M3T-NC30WA
|
Please take note of the following problem in using the M3T-NC308WA and
M3T-NC30WA C-compiler packages:
- On nesting inline functions
- Products and Versions Concerned
The C-compiler package for the M32C/80 and M16C/80 series:
M3T-NC308WA V.5.00 Release 1 through V.5.20 Release 1
The C-compiler package for the M16C/60, M16C/30, M16C/Tiny, M16C/20, M16C/10, and R8C/Tiny series:
M3T-NC30WA V.5.10 Release 1 through V.5.30 Release 1
- Description
When an inline function that takes a parameter is nested, it may refer to an incorrect argument (a variable, not an argument).
- Conditions
This problem occurs if the following conditions are both satisfied:
| (1) | An inline function is nested in another. |
| (2) |
Inline function A as a calling source and inline function B as the destination take the same parameter. |
Example
--------------------------------------------------------------------------
inline B(int aaa, char ccc) /* Condition (2) */
{
.....
}
inline A(int c, int aaa, char *ccc) /* Condition (2) */
{
int i;
char c;
B(i,c); /* Condition (1) */
}
--------------------------------------------------------------------------
- Workaround
This problem can be circumvented any of the following ways:
| (1) | Change the name of the parameter taken by the destination function
(inline function B in the above example). |
| (2) | Don't nest any inline function. |
| (3) |
Compile the program using the -Oforward_function_to_inline(-OFFTI) option.
(This option can be used on M3T-NC308WA V.5.20 Release 1 and M3T-NC30WA V.5.30 Release 1 only.) |
- Schedule of Fixing the Problem
We plan to fix this problem in our next release of the products.
|
 |