From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 2689A38540A5 for ; Mon, 12 Dec 2022 16:10:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2689A38540A5 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670861411; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wC3oZmy+Xi+XZWmRn/gJDDdAVdXNPrIPy0SuIQZ6luc=; b=i+XRgED8gHn8vOK0PyRNUbgifRazYATywjl7UJSCIe6UUmhpHS3DKVya0jQ+NuU07+1F6P 4YNCn7kW0fRp6LTF5PYgUKXyZUCBa+WIZhRDcPghLFWzJRWVPwylrI+fELmNqQpFLE8f9p iB9tcziYv/nhmMrQWcytyMNvpI3rRUk= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-134-xcOvPV9ENgOgioZ28rWSpQ-1; Mon, 12 Dec 2022 11:10:06 -0500 X-MC-Unique: xcOvPV9ENgOgioZ28rWSpQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 129CE1C09B67; Mon, 12 Dec 2022 16:10:06 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.195.114]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C16B6492B00; Mon, 12 Dec 2022 16:10:05 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 2BCGA0fs065095 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 12 Dec 2022 17:10:00 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 2BCG9x0e065094; Mon, 12 Dec 2022 17:09:59 +0100 Date: Mon, 12 Dec 2022 17:09:59 +0100 From: Jakub Jelinek To: Alejandro Colomar Cc: Jonathan Wakely , Martin =?utf-8?B?TGnFoWth?= , gcc@gcc.gnu.org, GNU C Library Subject: Re: Missing optimization: mempcpy(3) vs memcpy(3) Message-ID: Reply-To: Jakub Jelinek References: <8f9d61cf-14a5-4099-e2b6-7c8cac47a28b@suse.cz> <2baeaa96-b111-1f1c-ddf5-928edc8b3588@gmail.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=unavailable 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, Dec 12, 2022 at 04:56:27PM +0100, Alejandro Colomar wrote: > "Names beginning with ‘str’, ‘mem’, or ‘wcs’ 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 only reserved if the implementation provided them. And what we discuss here is how to reliably find out if it was an implementation that provided them, 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 implement mempcpy. Jakub