[PATCH] ppc: avoid C99-style loop

Jan Beulich jbeulich@suse.com
Fri Apr 23 13:32:26 GMT 2021


On 23.04.2021 15:29, Nick Clifton wrote:
>> While work towards using/requiring C99 is underway, this "dialect" at
>> present doesn't look to get enforced anywhere,
> 
> Well except for the fact that feature of the dialect are now being used 
> in the sources...

Albeit for now only in a limited way.

>> .../opcodes/ppc-dis.c: In function ‘print_insn_powerpc’:
>> .../opcodes/ppc-dis.c:1071: error: ‘for’ loop initial declaration used outside C99 mode
> 
> That error implies that the compiler can operate in C99 mode, but that 
> it is not doing so.  Is this the case ?

Yes.

>  If so, then the real bug is 
> that the compiler is not being given the flag(s) that it needs to enable 
> this mode.

Right, as also expressed in a post-commit-message remark. I've
also said there "but since this wasn't done so far, and since I
wouldn't know where to put the addition, I opted for the more
simplistic fix."

Jan


More information about the Binutils mailing list