On 06/12/2012 07:40 PM, Adrian Perez de Castro wrote:
Hi,
Peter Jones <pjones@xxxxxxxxxx> writes:
On 06/11/2012 12:29 PM, Adrian Perez wrote:
Avoids declaring an integer variable inside the initializer of a for-loop.
This patch avoids needing to compile the source in C99 mode.
^^^
Ouch... This is s typo, “C89” should be written there.
Er, why? The c99 way is *better*, and we can easily compile in C99 mode.
I'm using GCC in default mode, which is -std=gnu89, so C89. This is the
only variable declaration inside a for-loop control part, so maybe it
makes sense to declare “i” outside the loop, to keep the style coherent.
I'm not really for making changes to support overriding the compiler flags
set in the Makefile. I'm still not seeing any advantage. Some other loops
don't use the C99 declarations simply because they're *older*. I'd take
patches to fix them, but I don't find it necessary to do so either.
--
Peter
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list