From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 96D6E385703F; Sun, 23 May 2021 15:43:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 96D6E385703F From: "harald at gigawatt dot nl" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/100731] New: GCC 11 fails to build using GCC 4.8 because of missing includes Date: Sun, 23 May 2021 15:43:46 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Version: 11.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: harald at gigawatt dot nl X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 May 2021 15:43:46 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100731 Bug ID: 100731 Summary: GCC 11 fails to build using GCC 4.8 because of missing includes Product: gcc Version: 11.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap Assignee: unassigned at gcc dot gnu.org Reporter: harald at gigawatt dot nl Target Milestone: --- When building GCC 11 with GCC 4.8 on a platform without _GLIBCXX_USE_C99, t= he build fails. The result is: ../../gcc-11.1.0/c++tools/server.cc: In function =E2=80=98void internal_err= or(const char*, ...)=E2=80=99: ../../gcc-11.1.0/c++tools/server.cc:199:10: error: =E2=80=98exit=E2=80=99 w= as not declared in this scope exit (2); ^ ../../gcc-11.1.0/c++tools/server.cc: In function =E2=80=98void error(const = char*, ...)=E2=80=99: ../../gcc-11.1.0/c++tools/server.cc:233:10: error: =E2=80=98exit=E2=80=99 w= as not declared in this scope exit (1); ^ ../../gcc-11.1.0/c++tools/server.cc: In function =E2=80=98void print_usage(= int)=E2=80=99: ../../gcc-11.1.0/c++tools/server.cc:284:15: error: =E2=80=98exit=E2=80=99 w= as not declared in this scope exit (status); ^ ../../gcc-11.1.0/c++tools/server.cc: In function =E2=80=98void print_versio= n()=E2=80=99: ../../gcc-11.1.0/c++tools/server.cc:299:10: error: =E2=80=98exit=E2=80=99 w= as not declared in this scope exit (0); ^ ../../gcc-11.1.0/c++tools/server.cc: In function =E2=80=98int maybe_parse_socket(std::string&, module_resolver*)=E2=80=99: ../../gcc-11.1.0/c++tools/server.cc:828:48: error: =E2=80=98strtoul=E2=80= =99 was not declared in this scope unsigned port =3D strtoul (cptr + 1, &endp, 10); ^ ../../gcc-11.1.0/c++tools/server.cc: In function =E2=80=98void internal_err= or(const char*, ...)=E2=80=99: ../../gcc-11.1.0/c++tools/server.cc:200:1: warning: =E2=80=98noreturn=E2=80= =99 function does return [enabled by default] } ^ ../../gcc-11.1.0/c++tools/server.cc: In function =E2=80=98void print_versio= n()=E2=80=99: ../../gcc-11.1.0/c++tools/server.cc:300:1: warning: =E2=80=98noreturn=E2=80= =99 function does return [enabled by default] } ^ ../../gcc-11.1.0/c++tools/server.cc: In function =E2=80=98void print_usage(= int)=E2=80=99: ../../gcc-11.1.0/c++tools/server.cc:285:1: warning: =E2=80=98noreturn=E2=80= =99 function does return [enabled by default] } ^ ../../gcc-11.1.0/c++tools/server.cc: In function =E2=80=98void error(const = char*, ...)=E2=80=99: ../../gcc-11.1.0/c++tools/server.cc:234:1: warning: =E2=80=98noreturn=E2=80= =99 function does return [enabled by default] } ^ If the functions from are wanted, this file should just include directly rather than relying on C++ headers pulling it in. This happens for me on uclibc but is reproducible on glibc by locally modif= ying GCC 4.8's c++config.h to not define _GLIBCXX_USE_C99.=