ANSI/Non-ANSI Function Declaration Macros

Karl Heuer karl at haddock.ima.isc.com
Thu Dec 21 10:37:13 AEST 1989


In article <0300 at sheol.UUCP> throopw at sheol.UUCP (Wayne Throop) writes:
>I use a more complicated scheme involving the three macros...  This has been
>known to make people barf...

Barf.

Another alternative is to simply write the bloody thing using prototypes, and
then on pre-ANSI implementations, run it through a deprotoizing filter.  This
has the advantage that there's nothing to clean up once you decide that
supporting the absence of prototypes is as archaic as supporting the absence
of |unsigned char| or |void|.

One such deprotoizer can be obtained as a patch to gcc; I also maintain a much
shorter one that compares against my personal coding style rather than
everything that the language permits.

Karl W. Z. Heuer (ima!haddock!karl or karl at haddock.isc.com), The Walking Lint



More information about the Comp.lang.c mailing list