Open sikmir opened 8 years ago
Hi!
I faced same issue. As far as I can see, it's not an warning that treated as error (like -werror), but a real error detected only by newer gcc.
What is your host OS? You can use prebuilt toolchain in case you're on linux: https://github.com/embox/crosstool/releases/tag/current
Please try in #4 I update all tools version
$ gcc -v
<...>
gcc version 8.1.1 20180531 (GCC)
$ ./crosstool.sh i386
<...>
../../gcc-6.3.0/gcc/ubsan.c: In function ‘bool ubsan_use_new_style_p(location_t)’:
../../gcc-6.3.0/gcc/ubsan.c:1474:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
|| xloc.file == '\0' || xloc.file[0] == '\xff'
^~~~
make[1]: *** [Makefile:1085: ubsan.o] Error 1
make[1]: Leaving directory '/home/sikmir/Projects/crosstool/build-i386/build-gcc/gcc'
make: *** [Makefile:4135: all-gcc] Error 2
Building gcc failed
I can confirm the error. It's obviously because gcc 6.3 bug is detected by recent gcc's. The filename (ubsan) hints that the bug is not in the core but in utilities, so there is no rush to update gcc version.
I can assume several options:
Host gcc 6.2.1.