https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96608
Bug ID: 96608
Summary: Build failure due to cast to type long on MinGW
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: analyzer
Assignee: dmalcolm at gcc dot gnu.org
Reporter: markus.boeck02 at gmail dot com
Target Milestone: ---
Current trunk (revision 808f4dfeb3a95f50f15e71148e5c1067f90a126d) fails when
using the MinGW target due to a few casts to the type long which is 32 bit on
Windows. Following compiler errors appear:
In file included from ../../gcc/analyzer/checker-path.cc:51:
../../gcc/analyzer/store.h: In member function 'hashval_t
ana::symbolic_binding::hash() const':
../../gcc/analyzer/store.h:271:41: error: cast from 'const ana::region*' to
'long int' loses precision [-fpermissive]
271 | return (binding_key::impl_hash () ^ (long)m_region);
| ^~~~~~~~~~~~~~
With the same error appearing roughly 10 times through the code base.
Compiler used was GCC 10.2.1.
Compilation command:
x86_64-w64-mingw32-g++-10 -fno-PIE -c -fdebug-prefix-map=/mnt/c=C: -g
-march=nehalem -O3 -I/mnt/c/GCC-Build/NewestLinux/Libraries/include -DIN_GCC
-DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wno-error=format-diag -fno-common -DHAVE_CONFIG_H -I. -Ianalyzer
-I../../gcc -I../../gcc/analyzer -I../../gcc/../include
-I../../gcc/../libcpp/include
-I/mnt/c/GCC-Build-Array/gcc/build-target-i686/./gmp
-I/mnt/c/GCC-Build-Array/gcc/gmp
-I/mnt/c/GCC-Build-Array/gcc/build-target-i686/./mpfr/src
-I/mnt/c/GCC-Build-Array/gcc/mpfr/src -I/mnt/c/GCC-Build-Array/gcc/mpc/src
-I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/bid -I../libdecnumber
-I../../gcc/../libbacktrace
-I/mnt/c/GCC-Build-Array/gcc/build-target-i686/./isl/include
-I/mnt/c/GCC-Build-Array/gcc/isl/include
-I/mnt/c/GCC-Build/NewestLinux/Libraries/include -o analyzer/checker-path.o -MT
analyzer/checker-path.o -MMD -MP -MF analyzer/.deps/checker-path.TPo
../../gcc/analyzer/checker-path.cc