Re: overkill on portability macros

Jean Francois Groff (jfg@dxcern.cern.ch)
Mon, 8 Jun 92 17:32:23 +0200


Date: Mon, 8 Jun 92 17:32:23 +0200
From: jfg@dxcern.cern.ch (Jean Francois Groff)
Message-Id: <9206081532.AA21936@dxcern.cern.ch>
To: Dan Connolly <connolly@pixel.convex.com>
Cc: www-talk@nxoc01.cern.ch
Subject: Re: overkill on portability macros

> But ANSI C and PCC share syntax for _defining_ functions.
> The preprocessor dancing is necessary for _declaring_ functions
> like so:
>
> int foo __ARGS__((int x, int y, int z));
>
> but in the .c files, you can just do the usual
>
> int foo(x,y,z)
> int x;
> int y;
> int z;

  True, but in the latter case you don't get any type checking of the
parameters in functions that happen NOT to be declared before their
definition. I agree that the syntax with extra commas is ugly, though,
but there was no better way.

	JF