Altos C compiler funnies
Joseph S. D. Yao
jsdy at hadron.UUCP
Wed Dec 18 18:12:50 AEST 1985
In article <557 at scirtp.UUCP> dfh at scirtp.UUCP (David F. Hinnant) writes:
>We have an Altos 586 running Xenix 3.0. ...
> long i; MUST be declared as "long int"
> short int i; MUST be declared as "short"
> unsigned long i; doesn't work at all
> unsigned long int i; ditto
>However both "unsigned i;" and "unsigned int i;" work OK. The compiler
>error message from "short i;" is "Type clash" while the error message from
>"long i;", "unsigned long i", etc. is "misplaced long".
Several early C compilers didn't allow unsigned longs, because it
wasn't easy on their architectures. I auppose that's what's going
on there. On the Altos 586 running Xenix 2.[35][abc] we had no
problem with {long|short} [int] i; although since (again) early
compilers treated long and short as qualifiers to the "real" data
type I keep using "long int" and "short int". The fact that they
seem to be treated opposite in your compiler must be a bug. Have
you tried these all isolated, and with different variable names?
--
Joe Yao hadron!jsdy at seismo.{CSS.GOV,ARPA,UUCP}
More information about the Comp.lang.c
mailing list