Next
Previous
Contents
Deviations from the compliancy.
- functions are not always reentrant.
- structures cannot be assigned values directly, cannot be passed as function
parameters or assigned to each other and cannot be a return value from a function.
eg
struct s { ... };
struct s s1, s2;
foo()
{
...
s1 =
s2 ; /* is invalid in SDCC although allowed in ANSI */
...
}struct s foo1 (struct s parms) /* is invalid in SDCC although allowed in
ANSI */
{
struct s rets;
...
return rets;/* is invalid in SDCC although
allowed in ANSI */
}
- 'long long' (64 bit integers) not supported.
- 'double' precision floating point not supported.
- integral promotions are suppressed. What does this mean ? The compiler
will not implicitly promote an integer expression to a higher order integer,
exception is an assignment or parameter passing.
- No support for setjmp and longjmp (for now).
- Old K&R style function declarations are NOT allowed.
foo( i,j) /* this old style of function declarations */
int i,j; /* are
valid in ANSI .. not valid in SDCC */
{
...
}
- functions declared as pointers must be dereferenced during the call.
int (*foo)();
...
/* has to be called like this */
(*foo)();/* ansi standard
allows calls to be made like 'foo()' */
Next
Previous
Contents