improve diagnostics in C++ and small modifications