FW: Error from memcpy in cstring

Xi Ruoyao xry111@xry111.site
Thu Nov 9 13:18:35 GMT 2023


On Thu, 2023-11-09 at 13:14 +0000, Dingjun Chen wrote:

> include_directories(
>         "/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/i686-linux-musl/include/c++/13.2.0"
>         "/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/lib/gcc/i686-linux-musl/13.2.0/include/ssp"
>         "/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/i686-linux-musl/sysroot/usr/include"
>         "/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/i686-linux-musl/sysroot/usr/include/asm"
>         "/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/lib/gcc/i686-linux-musl/13.2.0/include/ssp"

All entries above just seem wrong.

/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/i686-
linux-musl/include/c++/13.2.0 should be a default system C++ header
path.

/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/i686-
linux-musl/sysroot/usr/include should be a default system header search
paths if --sysroot is used correctly.

The other paths contain internal implementation details, and they should
never be used with -I.

In this case /home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-
linux-musl/lib/gcc/i686-linux-musl/13.2.0/include/ssp contains a
string.h, so using it with -I causes #include <string.h> to find a wrong
string.h.

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University


More information about the Gcc-help mailing list