Uploaded image for project: 'ReactOS Build Environment'
  1. ReactOS Build Environment
  2. ROSBE-164

compute_powtab.c:142:3: error: 'for' loop initial declarations are only allowed in C99 mode

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Trivial
    • 2.2.1
    • RosBE-Unix

    Description

      Slackware 14.1, GCC 8.4.2

      In short:note: use option -std=c99 or -std=gnu99 to compile your code

      Error :

      Extracting mpfr... OK
      Running "../gcc/configure --prefix=/usr/local/RosBE-2/i386 --target=i686-w64-mingw32 --with-sysroot=/usr/local/RosBE-2/i386 --with-pkgversion=RosBE-Windows --enable-languages=c,c++ --enable-fully-dynamic-string --enable-checking=release --enable-version-specific-runtime-libs --enable-plugins --disable-shared --disable-multilib --disable-nls --disable-werror --disable-win32-registry --enable-sjlj-exceptions --disable-libstdcxx-verbose"... OK
      Running "/usr/bin/gmake -j 5 all-gcc"... FAILED
      Please take a look at the log file "/root/RosBE-Unix-2.2/sources/build.log"
      If you did not do something wrong, please save the log file and contact the ReactOS Team.
      Aborted!
      

      From RosBE-Unix-2.2/sources/build.log :

       
      /bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../gcc/gmp/mpn -I..  -D__GMP_WITHIN_GMP -I../../../gcc/gmp -DOPERATION_`echo hamdi
      compute_powtab.c: In function 'mpn_compute_powtab_mul':
      compute_powtab.c:142:3: error: 'for' loop initial declarations are only allowed in C99 mode
         for (long pi = start_idx; pi >= 0; pi--)
         ^
      compute_powtab.c:142:3: note: use option -std=c99 or -std=gnu99 to compile your code
      compute_powtab.c: In function 'mpn_compute_powtab_div':
      compute_powtab.c:226:3: error: 'for' loop initial declarations are only allowed in C99 mode
         for (long pi = n_pows - 1; pi >= 0; pi--)
         ^
      compute_powtab.c:274:13: error: redefinition of 'pi'
         for (long pi = n_pows; pi >= 0; pi--)
                   ^
      compute_powtab.c:226:13: note: previous definition of 'pi' was here
         for (long pi = n_pows - 1; pi >= 0; pi--)
                   ^
      compute_powtab.c:274:3: error: 'for' loop initial declarations are only allowed in C99 mode
         for (long pi = n_pows; pi >= 0; pi--)
         ^
      compute_powtab.c: In function 'powtab_decide':
      compute_powtab.c:296:3: error: 'for' loop initial declarations are only allowed in C99 mode
         for (size_t pn = (un + 1) >> 1; pn != 1; pn = (pn + 1) >> 1)
         ^
      compute_powtab.c:304:10: error: redefinition of 'pn'
         size_t pn = un - 1;
                ^
      compute_powtab.c:296:15: note: previous definition of 'pn' was here
         for (size_t pn = (un + 1) >> 1; pn != 1; pn = (pn + 1) >> 1)
                     ^
      compute_powtab.c:308:3: error: 'for' loop initial declarations are only allowed in C99 mode
         for (long i = n_pows - 2; i >= 0; i--)
         ^
      gmake[3]: *** [compute_powtab.lo] Error 1
      gmake[3]: *** Waiting for unfinished jobs....
      libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../../gcc/gmp/mpn -I.. -D__GMP_WITHIN_GMP -I../../../gcc/gmp -DOPERATION_scan0 -DNO_ASM -pipe -O2 -Wl,-S -g0 -ma
      libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../../gcc/gmp/mpn -I.. -D__GMP_WITHIN_GMP -I../../../gcc/gmp -DOPERATION_scan1 -DNO_ASM -pipe -O2 -Wl,-S -g0 -ma
      libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../../gcc/gmp/mpn -I.. -D__GMP_WITHIN_GMP -I../../../gcc/gmp -DOPERATION_popcount -DNO_ASM -pipe -O2 -Wl,-S -g0
      libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../../gcc/gmp/mpn -I.. -D__GMP_WITHIN_GMP -I../../../gcc/gmp -DOPERATION_hamdist -DNO_ASM -pipe -O2 -Wl,-S -g0 -
      gmake[3]: Leaving directory `/root/RosBE-Unix-2.2/sources/gcc-build/gmp/mpn'
      gmake[2]: *** [all-recursive] Error 1
      gmake[2]: Leaving directory `/root/RosBE-Unix-2.2/sources/gcc-build/gmp'
      gmake[1]: *** [all] Error 2
      gmake[1]: Leaving directory `/root/RosBE-Unix-2.2/sources/gcc-build/gmp'
      gmake: *** [all-gmp] Error 2
      

      Attachments

        Activity

          People

            Colin Finck Colin Finck
            jimtabor jimtabor
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: