From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by sourceware.org (Postfix) with ESMTPS id 18E8B386F45F for ; Fri, 2 Oct 2020 09:46:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 18E8B386F45F Received: by mail-wm1-x341.google.com with SMTP id j136so1042324wmj.2 for ; Fri, 02 Oct 2020 02:46:31 -0700 (PDT) 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=k7Hhuemfp3mKNaXUT6qzUz0k6PTD3VDw6bwx0JTczJo=; b=AqVi4ms4ICmAAY3LNNAnhLo+th08jUxKnI1aO60oo2UWlzRnxnGlMFuMm60D4hcY5p upyZ5KlAcl2a7BNLEQAEq7ddPLjRynWR1fvuIMN9mxCc7ICmS/YZ7G2JiiktbcpYhYta /m3QvhP7EQ+5QAvdt8MJdWC6STiKgOODkRCmHdMRrQlJkuvIw1DYn1avlr9P/vzbS0N9 8CWuLv1JVly6/gSUiYOYMposSI9JZc09gvG85Q59zJUtOpXuq09eBss7HGL/Giuh1QSv zy+2vhL72sJdkTohUzwlFsruwFDMD0qA8BTVB2JfHzfM6diO2gHdnz6GuLWyCbBYG/h/ lVug== X-Gm-Message-State: AOAM532gUJNt/0L1m8Zf5iZX/FDYv7M7yv26zyOIs5pEg1G6ubvY87kD Eos8Fby/yn+AZOzoBYHeLCY= X-Google-Smtp-Source: ABdhPJxO+Th2kpEoTzGVKjn7E83acLr4QHVaPweT7Ou7LL0X8gmxyjjMbP9e4h/pAeY+69BqtVKnwQ== X-Received: by 2002:a1c:62c2:: with SMTP id w185mr1866605wmb.109.1601631990175; Fri, 02 Oct 2020 02:46:30 -0700 (PDT) Received: from [192.168.1.143] ([170.253.60.68]) by smtp.gmail.com with ESMTPSA id z8sm1118156wrl.11.2020.10.02.02.46.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 02 Oct 2020 02:46:29 -0700 (PDT) Subject: Re: [PATCH 2/2] system_data_types.7: void *: Add info about pointer artihmetic To: mtk.manpages@gmail.com, eggert@cs.ucla.edu, David.Laight@ACULAB.COM Cc: linux-man@vger.kernel.org, gcc-patches@gcc.gnu.org, libc-alpha@sourceware.org, linux-kernel@vger.kernel.org References: <20201002094451.17997-1-colomar.6.4.3@gmail.com> From: Alejandro Colomar Message-ID: <71ccc433-a5e4-92a7-6f09-d809c64b63f0@gmail.com> Date: Fri, 2 Oct 2020 11:46:28 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20201002094451.17997-1-colomar.6.4.3@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-9.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, 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: Fri, 02 Oct 2020 09:46:32 -0000 Hi Michael, The 2/2 is a typo. This is a standalone patch. Cheers, Alex On 2020-10-02 11:44, Alejandro Colomar wrote: > Reported-by: Paul Eggert > Reported-by: David Laight > Signed-off-by: Alejandro Colomar > --- > > Paul and David, > Thanks for your input! > > Alex > > > man7/system_data_types.7 | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/man7/system_data_types.7 b/man7/system_data_types.7 > index 6451782db..bc7d5a8a0 100644 > --- a/man7/system_data_types.7 > +++ b/man7/system_data_types.7 > @@ -1918,6 +1918,17 @@ A value of this type can't be dereferenced, > as it would give a value of type > .I void > which is not possible. > +Likewise, pointer arithmetic is not possible with this type. > +However, in GNU C, poitner arithmetic is allowed > +as an extension to the standard; > +this is done by treating the size of a > +.I void > +or of a function as 1. > +A consequence of this is that > +.I sizeof > +is also allowed on > +.I void > +and on function types, and returns 1. > .PP > The conversion specifier for > .I void * >