op_def.cpp:224:29: error: narrowing conversion of '4278190080u' from 'unsigned int' to 'int' inside { } [-Wnarrowing] { "END", typ_end, 1, 1} }; ^ build log: http://sprunge.us/QNSi clang++ -std=c++11 has a more clear error message: op_def.cpp:205:29: error: constant expression evaluates to 4278190080 which cannot be narrowed to type 'int' [-Wc++11-narrowing] { "CLEAR", typ_switch, 1, GLE_FILL_CLEAR }, ^~~~~~~~~~~~~~ ./color.h:63:25: note: expanded from macro 'GLE_FILL_CLEAR' #define GLE_FILL_CLEAR 0XFF000000 ^~~~~~~~~~ op_def.cpp:205:29: note: insert an explicit cast to silence this issue { "CLEAR", typ_switch, 1, GLE_FILL_CLEAR }, ^~~~~~~~~~~~~~ static_cast<int>( ) ./color.h:63:25: note: expanded from macro 'GLE_FILL_CLEAR' #define GLE_FILL_CLEAR 0XFF000000 ^~~~~~~~~~
Either fix it or shove under USE_CXXSTD=gnu++98 carpet but it'd requiring respect of CXXFLAGS.
Created attachment 179878 [details] Fix error of narrowing conversion
d_x.cpp: In member function 'void X11GLEDevice::setfillstyle(int)': d_x.cpp:239:1: error: narrowing conversion of '128' from 'int' to 'char' inside { } [-Wnarrowing] }; ^ d_x.cpp:239:1: error: narrowing conversion of '128' from 'int' to 'char' inside { } [-Wnarrowing] d_x.cpp:239:1: error: narrowing conversion of '136' from 'int' to 'char' inside { } [-Wnarrowing] [...] gcc6 build log: http://sprunge.us/bUhW clang++ -std=c++11 is more informative: d_x.cpp:203:10: error: constant expression evaluates to 128 which cannot be narrowed to type 'char' [-Wc++11-narrowing] { 0x00, 0x80, 0x00, 0x40, 0x00, 0x20, 0x00, 0x10, 0x00, 0x08, 0x00, 0x04, ^~~~ d_x.cpp:203:10: note: insert an explicit cast to silence this issue { 0x00, 0x80, 0x00, 0x40, 0x00, 0x20, 0x00, 0x10, 0x00, 0x08, 0x00, 0x04, ^~~~ static_cast<char>( ) d_x.cpp:204:28: error: constant expression evaluates to 128 which cannot be narrowed to type 'char' [-Wc++11-narrowing] 0x00, 0x02, 0x00, 0x01, 0x80, 0x00, 0x40, 0x00, 0x20, 0x00, 0x10, 0x00, ^~~~ d_x.cpp:204:28: note: insert an explicit cast to silence this issue 0x00, 0x02, 0x00, 0x01, 0x80, 0x00, 0x40, 0x00, 0x20, 0x00, 0x10, 0x00, ^~~~ static_cast<char>( ) d_x.cpp:206:16: error: constant expression evaluates to 136 which cannot be narrowed to type 'char' [-Wc++11-narrowing] { 0x11, 0x11, 0x88, 0x88, 0x44, 0x44, 0x22, 0x22, 0x11, 0x11, 0x88, 0x88, ^~~~ d_x.cpp:206:16: note: insert an explicit cast to silence this issue { 0x11, 0x11, 0x88, 0x88, 0x44, 0x44, 0x22, 0x22, 0x11, 0x11, 0x88, 0x88, ^~~~ static_cast<char>( ) [...]
Created attachment 179889 [details] Fix clang/libc++ and gcc6 errors Ironically, with a little more push Clang builds fine: http://sprunge.us/FYLA
Created attachment 179890 [details] Fix clang/libc++ and gcc6 errors Oops, unbreak GCC + libc++ as used by some architectures (sparc64, mips*). In file included from Tokenizer.h:51:0, from Tokenizer.cpp:47: StringKeyHash.h:79:18: error: '__gnu_cxx' is not a namespace-name using namespace __gnu_cxx; // using gnu extensions such as "hash" ^~~~~~~~~ StringKeyHash.h:79:27: error: expected namespace-name before ';' token using namespace __gnu_cxx; // using gnu extensions such as "hash" ^
Created attachment 179891 [details] Fix clang/libc++ and gcc6 errors Previous one accidentally broke clang + libc++.
I approve the patch/attachment #179891 [details]. (I set flag + meaning that)
A commit references this bug: Author: rakuco Date: Sun Aug 6 17:53:22 UTC 2017 New revision: 447478 URL: https://svnweb.freebsd.org/changeset/ports/447478 Log: Fix libc++ and GCC6 build errors. This allows us to drop USE_GCC=yes while also allowing it to build with GCC 6, which uses -std=gnu++14 by default. PR: 217001 Submitted by: jbeich Approved by: nivit (maintainer) Changes: head/graphics/gle-graphics/Makefile head/graphics/gle-graphics/files/patch-src_gle_d__x.cpp head/graphics/gle-graphics/files/patch-src_gle_op__def.h head/graphics/gle-graphics/files/patch-src_gle_surface_ffitcontour.cpp head/graphics/gle-graphics/files/patch-src_gle_tokens_StringKeyHash.h