Portability: Early SGS and PCC compiler errors
johnsonjh opened this issue · comments
Jeffrey H. Johnson commented
Example: Motorola SYSTEM V/68, Release 2, Version 1.0, VME/10 68010:
$ cc -c -O -DSYSV -DRUNOPTS -DUSEDIRENT ccpu.c
"ccpu.c", line 2142: compiler error: switch table overflow
Other systems using AT&T System V SGS compiler derivatives have the same trouble (e.g. Multics C).
On these compilers, the maximum switch table size is a preprocessor defintion set at compile time, so not trivial to patch.
Possible solutions (besides updating the compiler):
- Add
#ifdef
to leave out undocumented instructions. - Convert
switch
/case
toif
/else
.