It\'s K&R-C and here is the code: http://v6shell.org/history/if.c
Look at the main-Method. There is this line \"if(exp())\".
But the function exp is decl
If you look at the definition:
exp(s) {
int p1;
p1 = e1();
if (eq(nxtarg(), "-o")) return(p1 | exp());
ap--;
return(p1);
}
s
is not usedWhy does C not do any of those checks? From what I hear it's 'cause during first few years of C, computers were fairly weak. Doing those checks would require multiple passes to scan the source code, which basically increases compile time by a magnitude of n passes. So it just does a single pass, and takes every name as is, which is why function overloading is not supported
So if the definitions did make use of s
in some way, you would most likely get some horrible runtime error with wonderful outputs to the console