From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by sourceware.org (Postfix) with ESMTPS id 9FC843858CD1 for ; Mon, 27 Nov 2023 14:54:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9FC843858CD1 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=owlfolio.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=owlfolio.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9FC843858CD1 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=64.147.123.25 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701096849; cv=none; b=G1uMLaSXAlq1+G64fv1yVvIAF4IIsYLspmlFNqN3y1D0kph5BgMUzBaxLI6J6DUxFq/1WkhnOohzJESHT2/gzMk7UdWKRSgHTuz4BrtnQCfdZbyPq/okbioOhojAmk9faiKY5nQn3Z/UoYvXQCdh2hk+jj/hasEwSOW52euQrnU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701096849; c=relaxed/simple; bh=HB8W+OnZWq4My9VaOz4HcCcaptoBCKmKvBsUYd8ioTQ=; h=DKIM-Signature:DKIM-Signature:MIME-Version:Message-Id:Date:From: To:Subject; b=G9gol7plX887b09ykaroKIFxLsxktrn0CC3mE5jymbi1TT6Glncl+O8Wpy6GZDm10b/yULdy+0EYu3yzZn2m2vnaUZV9RPgmFDarAxJezLb7KWHUXqQdtmhJdG64fBxRZobNhue0sO8WUhDr7aIpt3PgxljveRF4axZeqXZwkeQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 66E683200A0A; Mon, 27 Nov 2023 09:54:07 -0500 (EST) Received: from imap45 ([10.202.2.95]) by compute5.internal (MEProxy); Mon, 27 Nov 2023 09:54:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=owlfolio.org; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1701096846; x=1701183246; bh=Ij 0bgPhy4cXFwHcJWXDhjrq4f5BQcc3l3o8/ffGi3+o=; b=bj9x2T6i0dgMyfvP6i BFqPzroM3125IYRrOh29su8TB4HglV+N4gJwcTo0eXwSsdsR5T56Zpq4c/xuM9ud WanEOkaDnrIScvhpnTGRJ5m6tnoUjZqAKzA4WZwXXG04Yhn4dC67YMlLj5bI1eCs InLrMqMebUcB5B+KLYdMqbmW3aTT9PZzwwL5F9O0lKFxPsVLeS0svdZAJUKERkWM 8pbRsencI7JeqwPT+zFCWKiqeWDvaqTR6xD9YMJI3Y3OMzttTJoJM8NPiZMNbGpi 6t8Gah4TyjciyKJPlZ//SjLuWIq3lmq+xdYHfVDQfc/zgjc/xYn9KhDbh/EiHUxr fNlA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1701096846; x=1701183246; bh=Ij0bgPhy4cXFw HcJWXDhjrq4f5BQcc3l3o8/ffGi3+o=; b=bgvkBLxC3n8L7K9zyCmEc/Kx1iQZK MCaTeqgzLruWvBlG7v4BglzdCwkcUXyUiVtE3gTeVJxjeNZ8DqqcLCZgxT7Cg9yf b8Qazkx9Xh/4io+N8b0JEMCpW5xQvjDpsGfhh7lk+dCwP6rvZS4oAuHV9Nc+ceiw wjnZQ8YEe9iZu1KwyQzl1b3Vh+5SkAIBS6R3LC4SIbawt62EJ/lx0uH3LShRHRbD sifBoENBzPb5Hkem/wg+lJAuI6OuwkOCYqokmfw5SFNUe4ixYJhJw4jZWGgvuenO kr9PLQKUiYdMpo6fK+yBOXiGztVLc73hbXZ+2zmAkJNuuGON7LMaryqjQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeiuddgjeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedfkggr tghkucghvghinhgsvghrghdfuceoiigrtghksehofihlfhholhhiohdrohhrgheqnecugg ftrfgrthhtvghrnhephfelfeehudfhleegheegjeevheeuieehvdfgueeuteetleeiieet heefhfeludeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepiigrtghksehofihlfhholhhiohdrohhrgh X-ME-Proxy: Feedback-ID: i876146a2:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id AE037272007B; Mon, 27 Nov 2023 09:54:06 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-1234-gac66594aae-fm-20231122.001-gac66594a MIME-Version: 1.0 Message-Id: In-Reply-To: <5dc45a47-3266-4ae6-80ec-17601be8454a@ralfj.de> References: <5dc45a47-3266-4ae6-80ec-17601be8454a@ralfj.de> Date: Mon, 27 Nov 2023 09:53:45 -0500 From: "Zack Weinberg" To: "Ralf Jung" , "Wilco Dijkstra" Cc: "GNU libc development" Subject: Re: Support for memcpy with equal source and destination Content-Type: text/plain X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, Nov 27, 2023, at 9:45 AM, Ralf Jung wrote: >> Paul's example was to show that with restrict you could write a conformant >> C implementation. I think it is sufficient to cast away restrict without adding an >> extra branch (the existing generic C version does this). > > I don't think it is possible to cast away restrict. The restrict rules apply to > all pointers derived from the restrict pointer. As a practical matter, if we remove restrict annotations from the public memcpy declaration in string.h, _someone_ is going to think that's a bug, and also I wouldn't be surprised if future compilers started complaining about mismatches with their internal prototype. (Neither GCC 13 nor clang 16 does this _now_.) zw