"missing endif": Huh?Who?What? - (nf)
emjej at uokvax.UUCP
emjej at uokvax.UUCP
Fri Apr 27 00:15:00 AEST 1984
#R:acf4:-1390000100:uokvax:3000023:000:637
uokvax!emjej Apr 26 09:15:00 1984
/***** uokvax:net.lang.c / acf4!lwe3207 / 6:44 am Apr 22, 1984 */
The following file elicits the interesting response "missing endif" from cc.
Replacing *v/*w with (*v)/(*w) fixes it:
---
foo (v,w)
int *v, *w;
{ int k;
k = *v/*w; }
---
/* ---------- */
The preprocessor thinks that the /* in *v/*w is the beginning of a comment,
and eliminates the rest of the code. I don't know why the "missing endif"
shows up; indeed, the version of the C compiler I had the misfortune to use
a while back didn't give a missing endif message, and cheerfully passed on
an empty file to the C compiler, which didn't mind a bit.
James Jones
More information about the Comp.lang.c
mailing list