beautypg.com

Rized in the, Section on, As specified in the – Zilog ZUSBOPTS User Manual

Page 224: Library files not, Required for freestanding implementation, Double treated as float

background image

ANSI Standard Compliance

UM017105-0511

196

Zilog Developer Studio II – ZNEO™
User Manual

By contrast, in the hosted environment, the closest allowed form for

main

is:

int main (void);

Double Treated as Float

The ZNEO 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 194, only four of the standard library

header files are required by the standard to be supported in a freestanding compiler such as
the ZNEO 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

>

<

math.h

>

The Zilog implementation of the

math.h

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 spe-
cial values are part of the full ANSI/IEEE 754-1985 floating-point standard that is ref-
erenced in the ANSI C Standard.

<

stddef.h

>

<

stdio.h

>

Zilog supports only the portions of

stdio.h

that make sense in the embedded envi-

ronment. 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

.

<

stdlib.h

>

The

stdlib.h

header is ANSI-compliant in the Zilog library except that the follow-

ing functions – which are of limited or no use in an embedded environment – are not
supplied:

strtoul()

_Exit()

atexit()

This manual is related to the following products: