4 ms·
Was it the ANSI Std that did away with this style? Can't recall.
by sys_64738 6y ago
Was it the ANSI Std that did away with this style? Can't recall.
- xenadu02 6y agoANSI adopted function prototypes from C++ in C89. Originally C had no type checking on function parameters. All arguments were promoted to word width and pushed to the stack. If you gave a function fewer arguments it would just read garbage off the end of the stack. If you gave it excess arguments they were silently ignored.
- _kst_ 6y agoSort of. ANSI introduced prototypes, but old-style function declarations and definitions, though they were declared obsolescent, remained valid (i.e., any conforming C compiler is still required to support them). As of the 2011 standard, that's still the case. I think that C2X will finally remove them.