[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev cpp portabliity question
From: |
Vlad Harchev |
Subject: |
Re: lynx-dev cpp portabliity question |
Date: |
Fri, 15 Oct 1999 18:09:22 +0500 (SAMST) |
On Fri, 15 Oct 1999, T.E.Dickey wrote:
> > What syntax error you are talking about? gcc handles this as expected, the
> > result is 'x+x' (the ANSI spec says this is a correct behaviour, and most
> > obvious incorrect behaviour is infinite loop).
>
> as given, you have an incomplete statement (what's "x" in this context).
OK, what about following code:
------
int main(int argc,char** argv)
{
int x=3;
#define x x+x
return x;
};
------
I'm interested on how many compilers will hang on/reject such code.
The message subject was "cpp portablity" thou' :)
> > > > #define x x+x
> > > > x
>
> --
> Thomas E. Dickey
> address@hidden
> http://www.clark.net/pub/dickey
>
Best regards,
-Vlad