Next: 7.5 Cyclomatic Complexity
Up: 7 SDCC Technical Data
Previous: 7.3 External Stack
  Contents
  Index
7.4 ANSI-Compliance
Deviations from the compliance:
- 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, e.g.:
struct s { ... };
struct s s1, s2;
foo()
{
...
s1 = s2 ; /* is invalid in SDCC although allowed
in ANSI */
...
}
struct s foo1 (struct s parms) /* 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.
- 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 but 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: 7.5 Cyclomatic Complexity
Up: 7 SDCC Technical Data
Previous: 7.3 External Stack
  Contents
  Index
Bernhard Held
2003-08-29