8000 3.1b build fails on Cygwin due to wchar_t narrowing · Issue #6549 · fish-shell/fish-shell · GitHub
[go: up one dir, main page]

Skip to content

3.1b build fails on Cygwin due to wchar_t narrowing #6549

@ridiculousfish

Description

@ridiculousfish

Andrew Schulman reports on fish-users:

Hi. In Cygwin x86_64, the build fails with a bunch of "narrowing conversion
from ‘int’ to ‘wchar_t’" errors:


[51/113] /usr/bin/g++.exe  -DBINDIR=L\"/usr/bin\"
-DCMAKE_BINARY_DIR=\"fish-3.1b1-1.x86_64/build\"
-DCMAKE_SOURCE_DIR=\"fish-3.1b1-1.x86_64/src/fish-3.1b1\"
-DDATADIR=L\"/usr/share\" -DDOCDIR=L\"/usr/share/doc/fish\"
-DLOCALEDIR=\"/usr/sh
are/locale\" -DPREFIX=L\"/usr\" -DSYSCONFDIR=L\"/etc\" -D_REENTRANT
-D_UNICODE=1 -I. -Wno-comment -f
debug-prefix-map=fish-3.1b1-1.x86_64/build=/usr/src/debug/fish-3.1b1-1
-fdebug-prefix-map=fish-3.1b1-1.x86_64/src/fish-3.1b1=/usr/src/debug/fish-3.1b1-1
-fdiagnostics-color=always -Wall -Wextra -Wno-implicit-fallthrough
-Wno-comment -Wno-address -Wno-strict-aliasing -Wno-redundant-move  -O2 -g
-fno-exceptions -std=gnu++11 -MD -MT
CMakeFiles/fishlib.dir/src/fallback.cpp.o -MF
CMakeFiles/fishlib.dir/src/fallback.cpp.o.d -o
CMakeFiles/fishlib.dir/src/fallback.cpp.o -c
fish-3.1b1-1.x86_64/src/fish-3.1b1/src/fallback.cpp
FAILED: CMakeFiles/fishlib.dir/src/fallback.cpp.o
/usr/bin/g++.exe  -DBINDIR=L\"/usr/bin\"
-DCMAKE_BINARY_DIR=\"fish-3.1b1-1.x86_64/build\"
-DCMAKE_SOURCE_DIR=\"fish-3.1b1-1.x86_64/src/fish-3.1b1\"
-DDATADIR=L\"/usr/share\" -DDOCDIR=L\"/usr/share/doc/fish\"
-DLOCALEDIR=\"/usr/share/locale\" -DPREFIX=L\"/usr\" -DSYSCONFDIR=L\"/etc\"
-D_REENTRANT -D_UNICODE=1 -I. -Wno-comment
-fdebug-prefix-map=fish-3.1b1-1.x86_64/build=/usr/src/debug/fish-3.1b1-1
-fdebug-prefix-map=fish-3.1b1-1.x86_64/src/fish-3.1b1=/usr/src/debug/fish-3.1b1-1
-fdiagnostics-color=always -Wall -Wextra -Wno-implicit-fallthrough
-Wno-comment -Wno-address -Wno-strict-aliasing -Wno-redundant-move  -O2 -g
-fno-exceptions -std=gnu++11 -MD -MT
CMakeFiles/fishlib.dir/src/fallback.cpp.o -MF
CMakeFiles/fishlib.dir/src/fallback.cpp.o.d -o
CMakeFiles/fishlib.dir/src/fallback.cpp.o -c
fish-3.1b1-1.x86_64/src/fish-3.1b1/src/fallback.cpp
In file included from
fish-3.1b1-1.x86_64/src/fish-3.1b1/src/fallback.cpp:268:0:
fish-3.1b1-1.x86_64/src/fish-3.1b1/src/widecharwidth/widechar_width.h:45:1:
error: narrowing conversion of ‘983040’ from ‘int’ to ‘wchar_t’ inside { }
[-Wnarrowing]
};
^
fish-3.1b1-1.x86_64/src/fish-3.1b1/src/widecharwidth/widechar_width.h:45:1:
error: narrowing conversion of ‘1048573’ from ‘int’ to ‘wchar_t’ inside { }
[-Wnarrowing]
fish-3.1b1-1.x86_64/src/fish-3.1b1/src/widecharwidth/widechar_width.h:45:1:
error: narrowing conversion of ‘1048576’ from ‘int’ to ‘wchar_t’ inside { }
[-Wnarrowing]
fish-3.1b1-1.x86_64/src/fish-3.1b1/src/widecharwidth/widechar_width.h:45:1:
error: narrowing conversion of ‘1114109’ from ‘int’ to ‘wchar_t’ inside { }
[-Wnarrowing]
fish-3.1b1-1.x86_64/src/fish-3.1b1/src/widecharwidth/widechar_width.h:57:1:
error: narrowing conversion of ‘69821’ from ‘int’ to ‘wchar_t’ inside { }
[-Wnarrowing]
...


There are also lots of warnings like:

fish-3.1b1-1.x86_64/src/fish-3.1b1/src/common.cpp:1307:34: warning:
comparison is always false due to limited range of data type
[-Wtype-limits]
                    if (0x10FFFF < max_val) max_val =
static_cast<wchar_t>(0x10FFFF);
                        ~~~~~~~~~^~~~~~~~~

and

At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-redundant-move’

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that's not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0