Zilog EZ80F916 User Manual
Page 186

UM014423-0607
Using the ANSI C-Compiler
ZiLOG Developer Studio II
eZ80Acclaim!
®
User Manual
166
For this reason, in the eZ80Acclaim! C-Compiler,
main()
needs to be of type
void
; any
returned value is ignored. Also,
main()
is not passed any arguments. In short, the follow-
ing is the prototype for
main()
:
void main (void);
Unlike the hosted environment in which the closest allowed form for main is as follows:
int main (void);
Double Treated as Float
The eZ80Acclaim! C-Compiler does not support a double-precision floating-point type.
The type
double
is accepted, but is treated as if it were
float
.
Library Files Not Required for Freestanding Implementation
As noted in “Freestanding Implementation” on page 164, only four of the standard library
header files are required by the standard to be supported in a freestanding compiler such as
the eZ80Acclaim! C-Compiler. However, the compiler does support many of the other
standard library headers as well. The supported headers are listed here. The support
offered in the ZiLOG libraries is fully compliant with the Standard except as noted here:
•
<
assert.h
>
•
<
ctype.h
>
•
<
errno.h
>
•
The ZiLOG implementation of this library is not fully ANSI compliant in the general
limitations of the handling of floating-point numbers: namely, ZiLOG does not fully
support floating-point NANs, INFINITYs, and related special values. These special
values are part of the full ANSI/IEEE 754-1985 floating-point standard that is
referenced in the ANSI C Standard.
•
•
ZiLOG supports only the portions of stdio.h that make sense in the embedded
environment. Specifically, ZiLOG defines the ANSI required functions that do not
depend on a file system. For example, printf and sprintf are supplied but not fprintf.
•
This header is ANSI compliant in the ZiLOG library except that the following
functions of limited or no use in an embedded environment are not supplied:
strtoul()
_Exit()
atexit()