nyorain / rvg

High level vulkan 2D vector-like graphics api (C++)
Boost Software License 1.0
187 stars 11 forks source link

Compilation errors on gcc 7.3.0 #1

Closed jb55 closed 6 years ago

jb55 commented 6 years ago
../example/window.cpp:27:62: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
../example/window.cpp:28:70: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
../example/window.cpp:181:70: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
../subprojects/vpp/include/vpp/allocator.hpp:167:53: error: potential null pointer dereference [-Werror=null-dereference]
../subprojects/vpp/include/vpp/allocator.hpp:167:53: error: potential null pointer dereference [-Werror=null-dereference]
../src/rvg/fontstash.h:1115:15: error: potential null pointer dereference [-Werror=null-dereference]
../src/rvg/fontstash.h:1114:15: error: potential null pointer dereference [-Werror=null-dereference]
../src/rvg/fontstash.h:1116:15: error: potential null pointer dereference [-Werror=null-dereference]
../src/rvg/fontstash.h:1119:15: error: potential null pointer dereference [-Werror=null-dereference]
../src/rvg/fontstash.h:1113:20: error: potential null pointer dereference [-Werror=null-dereference]
../example/example.cpp:626:14: error: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Werror=unused-result]
nyorain commented 6 years ago

Those errors don't appear in gcc 8 and since most of them are not valid (as far as i can see) i guess they are warnings that got removed in gcc 8. Simply removing werror in this case should help. Run meson configure -Dwerror=false in your build dir and compile again.