4-2
EPSOn
S5U1C17001C ManUal
(C COMPilEr PaCkagE fOr S1C17 faMily) (Ver. 1.5.0)
4 SOUrCE filES
4.2 grammar of C Source
The
xgcc
C compiler included in this package is the GNU C Compiler (ver. 3.3.2) under ANSI C standards. Make
sure C sources are created according to ANSI C standards. If you want information about the syntax, please refer to
ANSI C textbooks generally available on the market.
4.2.1 Data Type
The
xgcc
C compiler supports all data types under ANSI C. The size of each data type (in bytes) and the effective
range of values that can be expressed are listed in Table 4.2.1.1.
Table 4.2.1.1 Data type and size
Data type
Size
Effective range of a number
char
1
-128 to 127
unsigned char
1
0 to 255
short
2
-32768 to 32767
unsigned short
2
0 to 65535
int
2
-32768 to 32767
unsigned int
2
0 to 65535
long
4
-2147483648 to 2147483647
unsigned long
4
0 to 4294967295
pointer
4
0 to 16777215
float
4
1.175e-38 to 3.403e+38 (normalized number)
double
8
2.225e-308 to 1.798e+308 (normalized number)
long long
8
-9223372036854775808 to 9223372036854775807
unsigned long long
8
0 to 18446744073709551615
wchar_t
2
0 to 65535
The
float
and
double
types conform to the IEEE standard format.
Handling of
long long
-type constants requires the suffix
LL
or
ll
(
long long
type) or
ULL
or
ull
(
un-
signed long long
type). If this suffix is not present, a warning is generated, since the compiler may not be
able to recognize
long long
-type constants as such.
Example:
long long ll_val;
ll_val = 0x1234567812345678;
→
warning: integer constant is too large for "long" type
ll_val = 0x1234567812345678LL;
→
OK
Type
wchar_t
is the data type needed to handle wide characters. This data type is defined in
stdlib.h
/
std-
def.h
as the type
unsigned short
.
Summary of Contents for S5U1C17001C
Page 6: ......
Page 17: ...1 General S5U1C17001C Manual 1 General ...
Page 18: ......
Page 21: ...1 2 Install S5U1C17001C Manual 2 Installation ...
Page 22: ......
Page 29: ...3 SoftDev S5U1C17001C Manual 3 Software Development Procedures ...
Page 30: ......
Page 103: ...4 SrcFiles S5U1C17001C Manual 4 Source files ...
Page 104: ......
Page 121: ...5 IDE S5U1C17001C Manual 5 gnU17 iDE ...
Page 122: ......
Page 365: ...6 Compiler S5U1C17001C Manual 6 C Compiler ...
Page 366: ......
Page 385: ...7 Library S5U1C17001C Manual 7 library ...
Page 386: ......
Page 405: ...8 Assemblr S5U1C17001C Manual 8 assembler ...
Page 406: ......
Page 439: ...9 Linker S5U1C17001C Manual 9 linker ...
Page 440: ......
Page 449: ...10 Debugger S5U1C17001C Manual 10 Debugger ...
Page 450: ......
Page 626: ...11 Tools S5U1C17001C Manual 11 Other Tools ...
Page 627: ......
Page 696: ...S1C17 Family C Compiler Package Quick Reference Reference ...