On Tue, May 25, 2021 at 11:15 AM Jakub Jelinek via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > Hi! > > This TU uses exit, but doesn't include <stdlib.h> or <cstdlib> and relies > on some other header to include it indirectly, which apparently doesn't > happen on reporter's host. > > The other <c*> headers aren't guarded either and we rely on a compiler > capable of C++11, so maybe we can rely on <cstdlib> being around > unconditionally. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk/11?
OK, but as the reporter notes none of the functions pulled by c* are std:: qualified at calls ... is this not a requirement? Richard. > 2021-05-25 Jakub Jelinek <ja...@redhat.com> > > PR bootstrap/100731 > * server.cc: Include <cstdlib>. > > --- c++tools/server.cc.jj 2021-05-24 14:20:01.905748402 +0200 > +++ c++tools/server.cc 2021-05-24 14:24:29.760813389 +0200 > @@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. > #include <csignal> > #include <cstring> > #include <cstdarg> > +#include <cstdlib> > // OS > #include <unistd.h> > #include <sys/types.h> > > Jakub >