Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!rutgers!mit-eddie!uw-beaver!sumax!amc-gw!pilchuck!dataio!fnx!nazgul!bright From: bright@nazgul.UUCP (Walter Bright) Newsgroups: comp.lang.c++ Subject: Re: Incompatible changes in C++ Message-ID: <176@nazgul.UUCP> Date: 22 Nov 90 19:10:57 GMT References: <9011190326.AA13113@mole.ai.mit.edu> <11645@alice.att.com> Reply-To: bright@nazgul.UUCP (Walter Bright) Organization: Zortech, Seattle Lines: 17 In article <11645@alice.att.com> ark@alice.att.com (Andrew Koenig) writes: /Actually, the most significant incompatilibity between C++ and /ANSI C is that C++ treats / extern int f(); /as being equivalent to / extern int f(void); /whereas ANSI C treats it as / extern int f(...); Not quite right, ANSI C treats f() as 'f is a function, no prototyping info is available', which is distinctly different from f(...) which means that 'f accepts a variable number of arguments of variable types'. Zortech C has a switch (-r) which causes f() in C programs to be treated as f(void). Another aspect of this switch is that functions are required to be prototyped before use. I use this switch as a matter of course in all my C code, and don't suffer from prototyping bugs anymore.