On Tue, Oct 29, 2002 at 10:38:08AM -0500, Paul Smith wrote:
> %% Dominik Vogt <fvwm-workers@fvwm.org> writes:
> 
>   dv>   - Removed C++ style comments
> 
>   dv>       This is not allowed in C:
> 
>   dv>         {
>   dv>           int x;
>   dv>           x = 1;
>   dv>           int y;
>   dv>         }
> 
> Just a pedantic note; both of the above _are_ legal in C, as of the ISO
> 1999 standard.  However, I agree with Dominik that we should avoid them
> in FVWM as compilers that support this syntax are still not ubiquitous.

It's not a theoretic problem.  gcc (2.95.4) simply refuses to
compile the following test program.  Otherwise I would never have
noticed it.

----------------------- foo.c -----------------------
int main(void)
{
        int x;
        x = 1;
        int y;
        y = 1;

        return 0;
}
-----------------------------------------------------

  $ gcc -o foo foo.c
  foo.c: In function `main':
  foo.c:5: parse error before `int'
  foo.c:6: `y' undeclared (first use in this function)

Anyway, since we are concerned about protability we can just
forget about the 1999 "standard" and stick with the old draft.

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, mail: [EMAIL PROTECTED], phone: 0721/91374-382
Schlund + Partner AG, Erbprinzenstr. 4-12, D-76133 Karlsruhe
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [EMAIL PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to