Open SrGesus opened 3 hours ago
This is kind of weird, if i open the project in vscode it will prompt me to choose a compiler, and after choosing g++ it will compile without any error, but if i use the flag -D CMAKE_CXX_COMPILER=g++ it will not... c++ looks like a symbolic link to g++ so I don't know why this is happening.
Hmm running in verbose and looking at the compilation commands, the difference seems to be that the one that errors has the -O3 -DNDEBUG
flags
Weirdly enough it seems like -O3 is the flag that is causing this...
Have tested and the same happens with Clang if -O3
, I think it is not a compiler issue
It's kind of bothersome that
CUBOS_ASSERT(mNodeCount <= QueryNode::MaxCursorCount);
Won't make the error go away
Description
Sometimes the compiler doesn't seem to be able to infer that a QueryFilter's mNodeCount is lesser or equal than MaxCursorCount, this results in a compiler warning, and therefore a compiler error.
Reproduce
Steps to reproduce the behavior:
cmake -S. -Bbuild -D CMAKE_CXX_COMPILER=c++
cmake --build build -j 12
Expected behaviour
No compiler error.
Screenshots