From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CD817398B864; Fri, 9 Apr 2021 13:25:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CD817398B864 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/99995] New: [11 Regression] FAIL: 17_intro/headers/c++1998/49745.cc with -std=gnu++20 Date: Fri, 09 Apr 2021 13:25:19 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org 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: Fri, 09 Apr 2021 13:25:19 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99995 Bug ID: 99995 Summary: [11 Regression] FAIL: 17_intro/headers/c++1998/49745.cc with -std=3Dgnu++20 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- In C++20 mode includes which includes for SYS_futex, and that means that POSIX truncate is declared, leading to: In file included from /home/jwakely/build/powerpc64le-unknown-linux-gnu/libstdc++-v3/include/bits= /atomic_wait.h:44, from /home/jwakely/build/powerpc64le-unknown-linux-gnu/libstdc++-v3/include/bits= /atomic_base.h:41, from /home/jwakely/build/powerpc64le-unknown-linux-gnu/libstdc++-v3/include/bits= /shared_ptr_atomic.h:33, from /home/jwakely/build/powerpc64le-unknown-linux-gnu/libstdc++-v3/include/memo= ry:78, from /home/jwakely/build/powerpc64le-unknown-linux-gnu/libstdc++-v3/include/powe= rpc64le-unknown-linux-gnu/bits/stdc++.h:82, from : /usr/include/unistd.h:1015: note: previous declaration 'int truncate(const char*, __off_t)' compiler exited with status 1 FAIL: 17_intro/headers/c++1998/49745.cc (test for excess errors) Excess errors: /home/jwakely/src/gcc/libstdc++-v3/testsuite/17_intro/headers/c++1998/49745= .cc:22: error: 'int truncate' redeclared as different kind of entity This is only seen when adding -std=3Dgnu++20 (or similar) to the test flags explicitly, and only when PCH is enabled so that -include bits/stdc++.h is added to the test flags, because otherwise that test doesn't include . But the underlying problem is that including means Bug 49745 has returned: we include from C++ library headers. This is only an issue for C++20 mode, and will fix itself when the code to = use futexes moves into libstdc++.so rather than being in headers. In the meantime, we might want to XFAIL that test for c++20 mode.=