Code:
src/test.cpp:17:53: error: format ‘%lf’ expects a matching ‘double*’ argument [-Werror=format=]
src/test.cpp:17:53: error: format ‘%lf’ expects a matching ‘double*’ argument [-Werror=format=]
You are trying to read 2 double values of 5, but provide only 1 variable. This is undefined behavior. So your are lucky your program works at all. Fix it before asking why it does something specific.