From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7F506385DC33; Thu, 23 Nov 2023 15:18:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7F506385DC33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1700752730; bh=TBvQT9s0FmI+ujVKp9YIFKx7i2rUkiNeeoS5ifWxinA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mek2pEJX6WNLIdnz1K+WOb/+kLfReK8sRvHDtL9Plri2lOBMWrTJwXCZM/z+bTo06 8ES31lbwbMqK9W4NeuToNBeW+FOaeiAX2hpaj0vxklB8E5jAXCfVm3lPkarQwE3Gij 2FC1W8LAEBtVRnpRvbH7bPkKWx6IySdV/xPY95Pg= From: "post+sourceware.org at ralfj dot de" To: glibc-bugs@sourceware.org Subject: [Bug string/31055] Request: guarantee that memcpy(x, x, n) is well-defined Date: Thu, 23 Nov 2023 15:18:50 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: string X-Bugzilla-Version: 2.38 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: post+sourceware.org at ralfj dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot 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://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31055 --- Comment #6 from Ralf Jung --- I didn't know there's a "restrict" in the signature of this function even in the C standard. Yes that would have to be removed to make memcpy(x, x, n) well-defined. But= if there are no benefits from having the restrict there (which can be determin= ed by checking if the generated assembly changes, or by benchmarking), then there's no point in having it in the first place. --=20 You are receiving this mail because: You are on the CC list for the bug.=