Subject: [Boost-bugs] [Boost C++ Libraries] #13252: Bootstrap.bat gcc throws compilation error (code is not c90 complilant)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-10-09 21:16:47
#13252: Bootstrap.bat gcc throws compilation error (code is not c90 complilant)
----------------------------------+----------------------------
Reporter: carlos.federico005@⦠| Owner: (none)
Type: Bugs | Status: new
Milestone: To Be Determined | Component: Building Boost
Version: Boost 1.65.0 | Severity: Problem
Keywords: |
----------------------------------+----------------------------
Trying to compile the new Boost 1.65.1 with Mingw w64 (gcc 4.8.3) on a
Windows 10.
While running {{{bootstrap.bat gcc}}} I get:
{{{
...
\boost_1_65_1\tools\build\src\engine>.\bootstrap\jam0 -f build.jam
--toolset=gcc "--toolset-root= "
...found 161 targets...
...updating 3 targets...
[MKDIR] bin.ntx86_64
[COMPILE] bin.ntx86_64\b2.exe
debugger.c: In function 'debug_start_child':
debugger.c:1128:5: error:
'for' loop initial declarations are only allowed in C99 mode
for ( int i = 1; i < argc; ++i )
^
debugger.c:1128:5: note: use option -std=c99 or -std=gnu99 to compile
your code
strings.c: In function 'string_rtrim':
strings.c:195:5: warning: ISO C90 forbids mixed declarations and code
[-Wpedantic]
char * p = self->value + self->size - 1;
^
...
}}}
So making a small modification (declare the ''i'' variable outside the
for-loop) into {{{boost_1_65_1\tools\build\src\engine\debugger.c:1128}}} I
can make it compile perfectly.
I guess adding {{{--std=c99}}} or {{{--std=c11}}} into
{{{boost_1_65_1\tools\build\src\engine\config_toolset.bat:204}}} could
been even better.
-- Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13252> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-10-09 21:23:52 UTC