On 1/3/19 2:23 PM, Peter Maydell wrote:
> On Mon, 31 Dec 2018 at 14:56, Aleksandar Markovic
> <aleksandar.marko...@rt-rk.com> wrote:
>> MIPS queue for December 2018 - v2
[...]
> Hi; I'm afraid this doesn't build on all my test hosts:
> 
> target/mips/translate.c: In function ‘gen_mxu_Q8MAX_Q8MIN’:
> target/mips/translate.c:25092:9: error: ‘for’ loop initial
> declarations are only allowed in C99 mode
>          for (int i = 2; i >= 0; i--) {
>          ^
> target/mips/translate.c:25092:9: note: use option -std=c99 or
> -std=gnu99 to compile your code
> target/mips/translate.c:25129:9: error: ‘for’ loop initial
> declarations are only allowed in C99 mode
>          for (int i = 2; i >= 0; i--) {
>          ^
> 
> (This probably only shows up on builds with older versions
> of gcc which don't default to c99.)
> 
> We don't use variable-declaration-in-for-loop.

Hmmm I wonder if we shouldn't relax that now than all supported
compilers do support C99.
Rational is having cleaner function declarations lead to easier reviews.

Reply via email to