 |
|
 |
RENESAS TOOL NEWS [RSO-M3T-NC308WA_2-030601D]
A Note on Using C Compilers M3T-NC308WA, M3T-NC30WA, M3T-NC79WA, and M3T-NC77WA
|
Please take note of the following problem in using the M3T-NC308WA, M3T-NC30WA, M3T-NC79WA, and M3T-NC77WA C compilers (with an assembler and integrated development environment):
- On defining structure-type arrays
- Products and Versions Concerned
- M3T-NC308WA V.1.00 Release 1 through V.5.00 Release 1
- for the M32C/80 and M16C/80 series MCUs
- M3T-NC30WA V.1.00 Release 1 through V.5.00 Release 2
- for the M16C/60, M16C/30, M16C/20, and M16C/10 series MCUs
- M3T-NC79WA V.2.00 Release 1 through V.4.10 Release 1A
- for the 79xx series MCUs
- M3T-NC77WA V.3.00 Release 1 through V.5.20 Release 4
- for the 77xx series MCUs
- Description
Writing an expression that references an element of a structure-type array may result in incorrect code being generated.
- Note:
- In the M3T-NC77WA V.3.00 Release 1 through V.3.20 Release 4, the error message "[Error(ccom):xxx.c,line 12] incomplete struct get by []" is displayed; no error messages are displayed in the other compilers.
- Conditions
This problem occurs if the following four conditions are satisfied:
- (1) A structure-type array is defined.
- (2) A structure is defined.
- (3) The definition in (1) precedes the one in (2).
- (4) In the program exists an expression referencing an element of the array defined in (1).
- Example
--------------------------------------------------------
struct AAA a[10]; /* Conditions (1) and (3) */
struct AAA { /* Condition (2) */
int a;
int b;
};
int gi;
void smp(int i)
{
gi = a[i].b; /* Condition (4) */
}
--------------------------------------------------------
- Workaround
Define the structure in Condition (2) in advance of defining the structure-type array in Condition (1).
--------------------------------------------------------
struct AAA {
int a;
int b;
};
struct AAA a[10];
--------------------------------------------------------
- Schedule of Fixing the Problem
For the M3T-NC308WA and M3T-NC30WA, this problem has been fixed both in V.5.10 Release 1.
For the M3T-NC79WA and M3T-NC77WA, we plan to fix it in our next release of them.
|
 |