From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2869D3896C3C; Tue, 25 May 2021 07:50:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2869D3896C3C From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/100731] [11/12 Regression] GCC 11 fails to build using GCC 4.8 because of missing includes Date: Tue, 25 May 2021 07:50:39 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.1.0 X-Bugzilla-Keywords: build X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenther at suse dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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: Tue, 25 May 2021 07:50:39 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100731 --- Comment #5 from rguenther at suse dot de --- On Tue, 25 May 2021, harald at gigawatt dot nl wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100731 >=20 > --- Comment #4 from Harald van Dijk --- > (In reply to Richard Biener from comment #3) >=20 > Yes, including is enough to get the build to pass. My last poi= nt in > comment #2, however, means that that leaves things in an inconsistent sta= te and > that the right fix depends on what the project wants. There are basically= two > options that look equally reasonable to me: adding an include of > (and, although not required to fix the build, ) and adding std:: > qualifiers to everything that needs it, or adding an include of (and > ) and changing the other existing includes to <*.h>. Happy = to > send a patch for whichever of these is preferred. At this point a minimal fix is prefered - in principle the file should be a valid source to any C++ 11 capable host compiler, not just GCC. The maintainer is on leave but we do want the build to be fixed. Now, since the file already includes csingal/cstring and=20 cstdarg I'd say using the C++ wrapper to C includes and qualifying the calls would be consistent with existing use (thus not including stdlib.h but cstdlib).=