<div dir="ltr"><br><br>On Sat, Apr 25, 2015 at 7:16 PM, Yuri <<a href="mailto:yuri@rawbw.com">yuri@rawbw.com</a>> wrote:<br>> I noticed that clang++ produces code in which gdb doesn't enter some<br>> functions, when clang-3.4.1 didn't have such problem. All compiled with -g,<br>> and no -O options<br><br>Could you provide a/some concrete example(s)? (preferably small/standalone examples (no header inclusions, etc))<br><br>> Additionally, STL containers aren't printed with pretty-printers. Is this<br>> not the right git repository location<br>> <a href="https://github.com/koutheir/libcxx-pretty-printers">https://github.com/koutheir/libcxx-pretty-printers</a> ?<br>><br>> gcc compiled code is free of both problems.<br>><br>> Additionally, gcc found the problem of signed vs. unsigned comparison:<br>> int i;<br>> vector<...> v;<br>> if (i >= v.size())   // <==== **** Here gcc finds the problem, and clang<br>> doesn't, as I think it should<br><br>Seems to warn, if you turn on the -Wsign-comparison:<br><font face="monospace, monospace"><br>vec.cpp:4:12: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned long') [-Wsign-compare]<br>  return i < v.size();<br>         ~ ^ ~~~~~~~~</font><br><br>> Also, gcc found that 'memcpy' not defined (#include <string.h> was really<br>> missing). Same with 'close' function and missing header unistd.h. I doubt<br>> that headers change depending on compiler. Not sure what to think here, but<br>> g++ seems to be more right than clang++.<br>><br>> gdb-7.8.2, FreeBSD 10.1<br>> plain C++ code, compiler with -Wall -g -std=c++11 and linked with -g<br>><br>> BTW, a long while ago I reported the bug that llvm produces clearly wrong<br>> debug info, with a very short and particular test case, and you just never<br>> fixed this, in "no comment" style. <br><br>Got a pointer to the bug number?<br><br>> This debug info problem here with C++<br>> might be directly related to that.<br>><br>> Yuri<br>> _______________________________________________<br>> cfe-dev mailing list<br>> <a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br></div>