>Thomas:
>Some of you might be unaware that bcc already can work with ansi C
>*without* the need for using the "-ansi" switch. The standard C
Ken Yap:
> Except then you don't get the benefits of prototype checking, of course.
Yes, BCC doesn't even check prototypes when the "-ansi" switch is
given. It just pipes the text through unprotoize.
The idea is to be able to use an ANSI compiler (such as GCC) for
error checking during development and then use BCC for the final build.
The ANSI compiler would uncover errors. BCC would emit the executable
code. The guard macros allow for both ANSI and K&R comilers to work
in harmony.
There are probably other ways to do it. This way might be the most
expedient since an existing standard library header already
provides the infrastructure. But like Greg has pointed out, you still
have to write function bodies in the K&R way.
This technique might be a good way to transition to ANSI. I'm not even
sure if there is a consenus on a transition to ANSI, so this whole
discussion may be putting the cart before the horse.
Thomas
[EMAIL PROTECTED]