From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by sourceware.org (Postfix) with ESMTPS id 4F5973857C63 for ; Sat, 13 Mar 2021 10:41:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4F5973857C63 Received: by mail-wr1-x434.google.com with SMTP id b9so3140496wrt.8 for ; Sat, 13 Mar 2021 02:41:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=6EzNBiXnJhCx39P7asO3fbhik3iOVfC7kbjIThlhAdM=; b=GfUSskWOJM/oZSs3FRlrQV23V0p1xpuP2SM39PrUGP0N11MBbITgdnLXhSepPSg3wr ixzsFWfLUxgbclVNj11BFmVuEcqzxhMJZcurdVZXfTwPTJUC5xPg2ncym4jE0MH8HmzY wk8XvFA8DxgUj5w77InJS9eHlGpIv0vDHkSlAjqsCt/wORSFaVb4tZeMeEFJI0D8tie7 iiOM9HRyoHQkjEyy1T0v93oF1V2tIN7woXK61cwTCVqeQozWyHVeoGq9JRubb4FVNlRX 2hPWMTxkaHQypZuOTvgS5uWqa0cGIIvo18W8OOrpfv/9Wx9mi5zpIJvuXu2dQLJh/nax 6aKA== X-Gm-Message-State: AOAM533odp5uH115tNbHQ5RjD2CtovnSLWVXg4SpAePvHuepmtZlQXTv sJvICeH0olXRwx6KvUWilBg= X-Google-Smtp-Source: ABdhPJz5BEZ7aztzRV5ei2u+kKuQ0GmaPakSLcozB3nR4SAFaC02SXgtWa2YTzn3ZWbBVfVnqpA2JA== X-Received: by 2002:adf:9261:: with SMTP id 88mr17994008wrj.270.1615632111234; Sat, 13 Mar 2021 02:41:51 -0800 (PST) Received: from [192.168.1.143] ([170.253.51.130]) by smtp.gmail.com with ESMTPSA id l5sm2930236wmh.0.2021.03.13.02.41.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 13 Mar 2021 02:41:50 -0800 (PST) Subject: Re: [PATCH 00/17] man3: SYNOPSIS: Use 'restrict' in prototypes To: Jonathan Nieder Cc: mtk.manpages@gmail.com, linux-man@vger.kernel.org, libc-alpha@sourceware.org, Heinrich Schuchardt References: <20210311223330.722437-1-alx.manpages@gmail.com> From: "Alejandro Colomar (man-pages)" Message-ID: Date: Sat, 13 Mar 2021 11:41:49 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Mar 2021 10:41:53 -0000 Hi Jonathan, On 3/13/21 5:11 AM, Jonathan Nieder wrote: > Hi, > > Alejandro Colomar wrote: > >> This fixes the remaining pages. With this, all pages have been fixed to use >> 'restrict'. > > Probably the context for this came earlier, but I didn't see it in the > commit message, I figure I should ask: The origin is here: And a later (short) discussion about it is here: > > What is the benefit of getting this right for a human reader? Does > knowing which pointer arguments can't alias help them in tracking down > some bugs, for example? Or is it going to help them in some other > way? Yes, I think it will help fixing bugs, or more likely preventing them. Think for example the case of memcpy(3) (by that time 'restrict' didn't exist), where people would incorrectly use it as if it were memmove(3) ignoring that it could be dangerous (see the NOTES section in memcpy(3)). Cheers, Alex -- Alejandro Colomar Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/ http://www.alejandro-colomar.es/