You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using Fedora 34 (gcc 11.2) to compile gives the following spat:
CXX src/vp.cpp
In file included from /home/jonasdn/sandbox/gap_sdk/install/workstation/include/vp/trace/component_trace.hpp:26,
from /home/jonasdn/sandbox/gap_sdk/install/workstation/include/vp/component.hpp:37,
from /home/jonasdn/sandbox/gap_sdk/install/workstation/include/vp/vp_data.hpp:26,
from /home/jonasdn/sandbox/gap_sdk/install/workstation/include/vp/vp.hpp:26,
from src/vp.cpp:27:
src/vp.cpp: In member function ‘js::config* vp::component::get_vp_config()’:
/home/jonasdn/sandbox/gap_sdk/install/workstation/include/vp/trace/trace.hpp:119:40: error: ‘this’ pointer is null [-Werror=nonnull]
119 | ((vp::trace *)(trace_ptr))->fatal(msg); \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
src/vp.cpp:241:5: note: in expansion of macro ‘vp_assert_always’
241 | vp_assert_always(this->vp_config != NULL, NULL, "No VP config found\n");
| ^~~~~~~~~~~~~~~~
In file included from /home/jonasdn/sandbox/gap_sdk/install/workstation/include/vp/vp.hpp:28,
from src/vp.cpp:27:
/home/jonasdn/sandbox/gap_sdk/install/workstation/include/vp/trace/implementation.hpp:112:15: note: in a call to non-static member function ‘void vp::trace::fatal(const char*, ...)’
112 | inline void vp::trace::fatal(const char *fmt, ...)
| ^~
cc1plus: all warnings being treated as errors
make[3]: *** [Makefile:63: /home/jonasdn/sandbox/gap_sdk/build/gvsoc/engine/vp.o] Error 1
make[3]: Leaving directory '/home/jonasdn/sandbox/gap_sdk/gvsoc/gvsoc/engine'
make[2]: *** [Makefile:25: build] Error 2
make[2]: Leaving directory '/home/jonasdn/sandbox/gap_sdk/gvsoc/gvsoc'
make[1]: *** [Makefile:303: gvsoc.build] Error 2
make[1]: Leaving directory '/home/jonasdn/sandbox/gap_sdk'
make: *** [Makefile:144: gvsoc] Error 2
It seems that the compiler is not convinced this macro is safe:
Using Fedora 34 (gcc 11.2) to compile gives the following spat:
It seems that the compiler is not convinced this macro is safe:
When called for instance by:
I could not seem to find the magic steps to convince it to allow this.
The text was updated successfully, but these errors were encountered: