[cfe-dev] clang++ r235810: gdb doesn't enter some C++ functions, libcxx-pretty-printers don't work, misses signed/unsigned comparisons, etc etc

David Chisnall David.Chisnall at cl.cam.ac.uk
Sun Apr 26 04:01:16 PDT 2015


On 26 Apr 2015, at 03:16, Yuri <yuri at rawbw.com> wrote:
> 
> Also, gcc found that 'memcpy' not defined (#include <string.h> was really missing). Same with 'close' function and missing header unistd.h. I doubt that headers change depending on compiler. Not sure what to think here, but g++ seems to be more right than clang++.
> 
> gdb-7.8.2, FreeBSD 10.1
> plain C++ code, compiler with -Wall -g -std=c++11 and linked with -g

The headers do change based on the compiler.  GCC includes its own modified versions of the system headers.  This causes a lot of problems to people running -CURRENT, as the ‘fixed’ headers that GCC includes need regenerating periodically.  Clang just uses the system headers.

David





More information about the cfe-dev mailing list