Mail Archives: djgpp/1997/03/02/06:18:21
On 28 Feb 1997, Paul Derbyshire wrote:
> I had an old version of PCC two or three years ago before I got DJGPP.
> It used a funny syntax:
>
> int main:
> int argc;
> char *argv[];
> {
> function stuff
> }
You mean this, I suppose:
int main (argc, argv)
int argc;
char *argv[];
{
function stuff
}
> On doing some research I learned PCC was using the ancient K&R syntax
> from the pre-ANSI days. Needless to say GCC uses ANSI instead.
GCC also accepts the K&R syntax, unless you add both -ansi and
-pedantic options to its command line. So the above should compile
with GCC.
- Raw text -