V7 "short" == "int"
Morris Keesan
keesan at bbncca.ARPA
Sat Jun 23 09:26:07 AEST 1984
----------------------
We recently discovered that "unsigned short" is allowed in the V7 "cc" C
compiler, although not in the V7 C Reference Manual, and investigation showed
that this is because the keyword "short" is made lexically equivalent to "int".
This suggested that "short int", explicitly allowed by the manual, would not
be accepted by the compiler, and experimentation bore this out. Now comes the
fun part. The compiler accepts the declaration "long short", which is
equivalent to "long int", or "long". This is such an amusing quirk that I plan
not to fix it in our version of the compiler.
--
Morris M. Keesan
{decvax,linus,wjh12,ima}!bbncca!keesan
keesan @ BBN-UNIX.ARPA
More information about the Comp.lang.c
mailing list