From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 63D293858C2B; Fri, 24 Nov 2023 09:37:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 63D293858C2B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1700818626; bh=Z+1dmV1kjUZgElLfLU5ucloGZjMQJspAVBpfttgYG+I=; h=From:To:Subject:Date:In-Reply-To:References:From; b=yliS7HOZsAonueI+wztqVNCLNd8VnLbREHP03JRv6AGqlpENRHAynVTHJ/EbQArSL dCA5xvxwF+h5VEaPSrwSa348ojV+uRDITZ9eyAWH1xeGqPEZ7sJLcoinV3nhScZSji CWWZl/ue/QRTIs6rnOtC9eUewJ+0BQhXrxmtMnFg= From: "rguenth at gcc dot gnu.org" To: glibc-bugs@sourceware.org Subject: [Bug string/31055] Request: guarantee that memcpy(x, x, n) is well-defined Date: Fri, 24 Nov 2023 09:37:05 +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: rguenth at gcc dot gnu.org 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 #9 from Richard Biener --- (In reply to Ralf Jung from comment #8) > Is there a URL where that documentation can be found? That could be useful > to reference in the future. https://gcc.gnu.org/onlinedocs/gcc/Standards.html#C-Language at its end it says "Most of the compiler support routines used by GCC are present in libgcc, b= ut there are a few exceptions. GCC requires the freestanding environment provi= de memcpy, memmove, memset and memcmp. Contrary to the standards covering memc= py GCC expects the case of an exact overlap of source and destination to work = and not invoke undefined behavior. Finally, if __builtin_trap is used, and the target does not implement the trap pattern, then GCC emits a call to abort." --=20 You are receiving this mail because: You are on the CC list for the bug.=