From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E61EA386F477; Thu, 4 Jun 2020 16:05:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E61EA386F477 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1591286718; bh=J0oiMxbdUxxtJaydVF6UOESouiwQNebWDDBkToqRegA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=oqlVGHnsSsVAs5YrZ84fr092BRiSlELp8PzHfoQap+Pu+LwB2hKUyVMuQ0A2yUkge HcclxUMqPEhp2zbw10CbMKhssrF8Zsv8LAJX8Q1jPGL60u4500u2iK5k7QvAUTjz+e NwYpvqPubLgDVE68QzQEJJHU87ZkbwlFBs5iuCho= From: "andrew2085 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/95349] Using std::launder(p) produces unexpected behavior where (p) produces expected behavior Date: Thu, 04 Jun 2020 16:05:18 +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: 10.1.0 X-Bugzilla-Keywords: alias, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: andrew2085 at gmail dot com 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: 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: Thu, 04 Jun 2020 16:05:19 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95349 --- Comment #33 from Andrew Downing --- Those are all perfectly good arguments, but the problem ended up not having anything to do with std::launder or new implicit object creation rules or anything else introduced in the most recent standards right? This should be well defined in c++11 and on https://godbolt.org/z/w5FoZN. It compiles correctly until gcc 5.1, and in all versions of the other major compilers I= 've tried that will actually compile on godbolt.org. As far as I can tell, it should also be well defined in c++98 and on if you use different types and check the size and alignment some other way.=