C Compiler (Fcc911); D.1 C Compiler (Fcc911) - Fujitsu FR60 Hardware Manual

32-bit microcontroller mb91301 series
Hide thumbs Also See for FR60:
Table of Contents

Advertisement

D.1

C Compiler (fcc911)

Note that when programming is done in the C language, behavior cannot be
guaranteed if the following operations are performed for a little endian area:
• Allocation of a variable with an initial value
• Structure assignment
• Operations other than string arrangement using a string manipulation function
• Specification of the -K lib option when a string manipulation function is used
• Use of the double type or long double type
• Allocation of a stack to a little endian area
■ Allocation of a Variable with an Initial Value
Allocation of a variable with an initial value to a little endian area is not allowed.
No compiler has a function that generates the initial value of a little endian area. Although it is
possible to allocate a variable to a little endian area, an initial value cannot be set.
Include processing at the beginning of a program that sets an initial value.
[Example] Setting an initial value for the variable little_data in a little endian area
extern int little_data;
void little_init(void){
little_data = Initial value;
}
void main(void)
little_init();
}
■ Structure Assignment
When a structure is assigned to another structure, the compiler selects the optimum transfer
method (byte, halfword, or word). Thus, if structure assignment is performed between a
structure variable allocated to an ordinary area and a structure variable allocated to a little
endian area, a correct result cannot be obtained.
It is therefore necessary to assign each member in the structure.
APPENDIX D NOTES ON USING A LITTLE ENDIAN AREA
...
565

Advertisement

Table of Contents
loading

Table of Contents