johnsonjh / pmince

pmince: Portable MINCE (MINCE is Not Complete[ly] EMACS)

Home Page:https://github.com/johnsonjh/pmince

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Portability: Early SGS and PCC compiler errors

johnsonjh opened this issue · comments

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):

  1. Add #ifdef to leave out undocumented instructions.
  2. Convert switch/case to if/else.