## 3.1.1 ISO C90 and ANSI C89

Use —std-c89 to compile in this mode.

Deviations from standard compliance:

- initialization of structure arrays must be fully braced.

  > struct s { char x } a[] = {1, 2}; /* invalid in SDCC */
  > struct s { char x } a[] = {{1}, {2}}; /* OK */

- 'double' precision floating point not supported. Instead a warning is emitted, and float is used instead. long double is treated the same.
- K&R style function declarations are not supported.

  > foo(i,j) /* this old style of function declarations */
  > int i,j; /* is valid in ANSI but not valid in SDCC */
  > {
  > ...
  > }

Some features of this standard are not supported in some ports:

- hc08, s08, mos6502, pic14, pic16: structures and unions cannot be passed as function parameters and cannot be a return value from a function, e.g.:

  > struct s { ... };
  > 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 */
  > }

- mcs51, ds390, hc08, s08, pdk13, pdk14, pdk15 and mos6502 ports: functions are not reentrant unless explicitly declared as such or --stack-auto is specified.