On Wed, 12 Aug 2020 at 12:23, 孙世龙 sunshilong <sunshilong369@xxxxxxxxx> wrote: > > >This mailing list is about GCC, not general C programming. The realloc > >function is not part of GCC. > Sorry, I didn't notice it. > I took it granted that libc is part of the GCC since there is a folder > named "libstdc++" in the Github of GCC(i.e. > https://github.com/gcc-mirror/gcc/tree/master/libstdc%2B%2B-v3). > > One more question arises, why there is no library for libc whereas > libstdc++ is provided by GCC? Because every unix-like OS already has its own libc, because C and UNIX were developed hand-in-hand. Traditionally they didn't have a C++ library, so a C++ compiler has to provide the C++ library.