From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id 7254F3856B63 for ; Mon, 12 Dec 2022 17:42:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7254F3856B63 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-x633.google.com with SMTP id ud5so30005472ejc.4 for ; Mon, 12 Dec 2022 09:42:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=GGrkaPihg/0vZTiZPxiKzXIm7E78V0A2C3EOxmY795A=; b=Qf+HrfkB+4ATEFukoOq+W9fI3T+ADZAzQDKuWuczu+KMfEkkmMknp8rQ12Tgj3Ouf+ im7BM6w1HlN8LcEfzXhVli2cdh/R9v+moMEACjdtI3MJ2OP1AwfAchgLl6zPFsxRULb7 l7esbyJuYqixNHbfbbW967T58zZZxMM4JH+IZv6N9FVw7jxXokGHlB6LfebafavTk2kD i7OmQwYQO4aqv4VlKFzdXYeOBOPw8A88z9AOSxIBSFZHcJLU9cTEwr3cjYcZv0UWoHEK ZupNl/sKxjXVvk8aH2vk+nuS8siSiCgnkU0aTFXcwavorWexTHC9Y/rpuMiRlD9mAiM3 QXGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GGrkaPihg/0vZTiZPxiKzXIm7E78V0A2C3EOxmY795A=; b=x/iW/1SRqnHITOMfbqkdkboNpj/jDG+IGe5sdZs4yBjdEZpfXO6oLsT2IMLevCJqJn KMf33t57RI7aF6wyQn/tQKPwt8JaQp6NWTQG77WQPvBUuLtohcNXHtUuJyyTgfpr9NQb RmZFR5u9s5vKeIHaDXIQ3gFjHMU1V9q4O5qCxqsmHviB5MxkAhQasmeO0iDKWTSg8/FP sOACo7oUsTZwfjpjjSyRf5q61h7ykSoLgora+BMsMP+nDnNXwtAMvqV0Uf//qtkpSfT/ gY29LOO0tOXr1dPS+RVXatImbBJdWPNg4m0/A4DzEgrttujewIzdnfPZS6PLkdYGaWoQ jSCA== X-Gm-Message-State: ANoB5pnydRx2L5F4j4cA85HXVhdB9ETg29dlWm9W3lC8Bo3Nj2lYFMSZ VXkThmnAE09RMHlFyNFQNFaCr50Aqx7Vmr7Qkhc= X-Google-Smtp-Source: AA0mqf7kxH6IQMBHHHHmJYtipQTfyEha4/xjojWpr4DqnYaMaBjZS0d4VKQF7M1SR78/gEN7YhZH5/grhlYDlKR+LGk= X-Received: by 2002:a17:906:a38c:b0:7c0:d58f:3409 with SMTP id k12-20020a170906a38c00b007c0d58f3409mr8125716ejz.416.1670866932181; Mon, 12 Dec 2022 09:42:12 -0800 (PST) MIME-Version: 1.0 References: <8f9d61cf-14a5-4099-e2b6-7c8cac47a28b@suse.cz> <2baeaa96-b111-1f1c-ddf5-928edc8b3588@gmail.com> In-Reply-To: From: Jonathan Wakely Date: Mon, 12 Dec 2022 17:42:01 +0000 Message-ID: Subject: Re: Missing optimization: mempcpy(3) vs memcpy(3) To: Jakub Jelinek Cc: Alejandro Colomar , =?UTF-8?Q?Martin_Li=C5=A1ka?= , gcc@gcc.gnu.org, GNU C Library Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP 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, 12 Dec 2022 at 16:10, Jakub Jelinek wrote: > > On Mon, Dec 12, 2022 at 04:56:27PM +0100, Alejandro Colomar wrote: > > "Names beginning with =E2=80=98str=E2=80=99, =E2=80=98mem=E2=80=99, or = =E2=80=98wcs=E2=80=99 followed by a lowercase letter > > are reserved for additional string and array functions. See String and = Array > > Utilities." > > It is not that simple. > mem*, str* and wcs* are just potentially reserved identifiers, they are o= nly > reserved if the implementation provided them. And only if the program includes . > And what we discuss here > is how to reliably find out if it was an implementation that provided the= m, > because in case of gcc the implementation is GCC and the C library and > perhaps some other libraries too. > gcc can be used with lots of different C libraries, and many don't implem= ent > mempcpy. > > Jakub >