GCC 13 bootstrap failure on i686-w64-mingw32

Jonathan Wakely jwakely.gcc@gmail.com
Sun Nov 20 19:17:32 GMT 2022


This fails on macOS too (and probably everything non-gnu).

On Sun, 20 Nov 2022, 12:36 LIU Hao via Gcc, <gcc@gcc.gnu.org> wrote:

> This is caused by 2efb237ffc68ec9bb17982434f5941bfa14f8b50, which has
> references to `strchrnul`,
> which does not exist on i686w-64-mingw32:
>
>    ```
>    g++ -std=c++11  -fno-PIE -c  -DIN_GCC_FRONTEND -g -D__USE_MINGW_ACCESS
> -DIN_GCC
> -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall
> -Wno-narrowing -Wwrite-strings
> -Wcast-qual -Wno-format -Wmissing-format-attribute -Woverloaded-virtual
> -pedantic -Wno-long-long
> -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -Icp
> -I../../gcc/gcc
> -I../../gcc/gcc/cp -I../../gcc/gcc/../include
> -I../../gcc/gcc/../libcpp/include
> -I../../gcc/gcc/../libcody -I/mingw32/include -I/mingw32/include
> -I/mingw32/include
> -I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/bid
> -I../libdecnumber
> -I../../gcc/gcc/../libbacktrace -I/mingw32/include
> -D__USE_MINGW_ANSI_STDIO=1 -I/mingw32/include -o
> cp/error.o -MT cp/error.o -MMD -MP -MF cp/.deps/error.TPo
> ../../gcc/gcc/cp/error.cc
>    ../../gcc/gcc/cp/contracts.cc: In function 'bool role_name_equal(const
> char*, const char*)':
>    ../../gcc/gcc/cp/contracts.cc:213:21: error: 'strchrnul' was not
> declared in this scope; did you
> mean 'strchr'?
>      213 |   size_t role_len = strchrnul (role, ':') - role;
>          |                     ^~~~~~~~~
>          |                     strchr
>    make[3]: *** [Makefile:1146: cp/contracts.o] Error 1
>    make[3]: *** Waiting for unfinished jobs....
>    ```
>
>
> Proposed solution:
>
>    ```
>    size_t role_len = strcspn (role, ":");
>    ```
>
>
>
> --
> Best regards,
> LIU Hao
>


More information about the Gcc mailing list