From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 53B233858D1E; Sat, 9 Sep 2023 19:19:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 53B233858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694287143; bh=uHmg8XPc8hB4qKrohx5pvskqxnUuyihH/dfnRBW2+/M=; h=From:To:Subject:Date:In-Reply-To:References:From; b=V9ShP1uRB09GZ0U0km+MEDnijUiQLU0lLH+jCLVRRhdtBbMPvagtt7j7hOA84/Blp iiY/YQko6MFGwjPYzvax8VACbyyZMBxikDAeVEr2sabmT5I5eIjGn+fRRry7d40MYi Zpn/6SqkCfBrOlC/KDqCIzzt9V6HqPq6E/+bh/AQ= From: "unlvsur at live dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/111353] bits/new_allocator.h: No such file or directory in freestanding C++ toolchain Date: Sat, 09 Sep 2023 19:19:02 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: unlvsur at live dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111353 --- Comment #5 from cqwrteur --- It's evident that there's a flaw in the standard, making it impossible to allocate uninitialized memory for freestanding environments. That's precise= ly why I reported it as a potential issue for future proposals. Unfortunately, some individuals, including yourself, mistook my intent for trolling. The t= ruth is, we can't have features that rely on compiler magic to be implemented by users; this necessitates reporting it as a Defect Report (DR) to WG21. While std::addressof still had a workaround via __builtin_addressof, you're currently left without such an alternative. Perhaps it would be beneficial for the standard to introduce specialized functions like constexpr_allocate_at and constexpr_deallocate_at, similar to construct_at. These functions could offer a constexpr-compatible means of allocating memory without involving allocators or operator new. see this issue: https://github.com/microsoft/STL/issues/4002=