[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GCC 4.9.1 suggests -std=c99
From: |
Dmitry Antipov |
Subject: |
Re: GCC 4.9.1 suggests -std=c99 |
Date: |
Tue, 09 Sep 2014 20:42:55 +0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 |
On 09/09/2014 07:50 PM, Eli Zaretskii wrote:
It's a better style
IMHO only if it is just a control variable, and in the only loop.
If it isn't, e.g. in:
int i;
...
for (i = 0; i < XXX; i++)
...
i = a;
a = b;
b = i;
...
for (i = 0; i < YYY; i++)
...
then C99/C++-style:
...
for (int i = 0; i < XXX; i++)
...
int i = a;
a = b;
b = i;
...
for (int i = 0; i < YYY; i++)
...
becomes a monkey's typing exercise.
Dmitry