linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: rstanley@rsiny.com
Cc: mtk.manpages@gmail.com, linux-man@vger.kernel.org
Subject: Re: Man page pre & post operators error
Date: Mon, 23 Sep 2019 09:43:30 +0200	[thread overview]
Message-ID: <b43e88f6-ba92-8e82-c4f5-0e24d98252d0@gmail.com> (raw)
In-Reply-To: <a872f7e970a7d2048243f21b9fb40ad5fa929ffe.camel@rsiny.com>

Hello Rick,

On 9/23/19 12:50 AM, Rick Stanley wrote:
> Thank you for the update.
> 
> I am sorry you have interpreted my request as a demand.  It was not
> meant or presented as such.

Okay. 

Thanks,

Michael

> On Sun, 2019-09-22 at 23:01 +0200, Michael Kerrisk (man-pages) wrote:
>> Hello Rick,
>>
>> On 9/20/19 4:19 PM, Rick Stanley wrote:
>>> Greetings!
>>>
>>> In the man pages, both in Linux and online in multiple sites, the
>>> pre
>>> and post operators are listed as equal precedence.  Two different
>>> web
>>> sites list them on different levels:
>>>
>>> http://man7.org/linux/man-pages/man7/precedence.7.html
>>> 	Level 1
>>>
>>> https://linux.die.net/man/7/operator
>>> 	Level 2
>>>
>>> Linux `man operator` list them on the second level, with right to
>>> left
>>> associativity:
>>>
>>>        Operator                            Associativity
>>>        () [] -> .                          left to right
>>>        ! ~ ++ -- + - (type) * & sizeof     right to left
>>>        ...
>>>
>>> Section "A.2.1 Expressions" of both the C99 & C11 C Draft
>>> Standards,
>>> list them on different levels:
>>>
>>> 	postfix ++ & -- on level 1, with left to right associativity
>>>
>>> 	prefix ++ & -- on level 2, with right to left associativity
>>
>> So, Harbison & Steele also seems to agree here. Things changed since
>> K&R! I've fixed the page:
>>
>>        Operator                            Associativity   Notes
>>        () [] -> . ++ --                    left to right   [1]
>>        ! ~ ++ -- + - (type) * & sizeof     right to left   [2]
>>        [...]
>>
>>        The following notes provide further information to
>> the  above  ta‐
>>        ble:
>>
>>        [1] The ++ and -- operators at this precedence level are the
>> post‐
>>            fix flavors of the operators.
>>        [2] The ++ and -- operators at this precedence level are
>> the  pre‐
>>            fix flavors of the operators.
>>
>>> Please review this and all the operator precedence and
>>> associativity in
>>> the current man page "man operator" against the official C99 & C11
>>> Standards documents, plus the current working draft for the next
>>> version of the Standard.
>>
>> You are free to do so. But please don't demand that someone else
>> does so, even if you say "please".
>>
>> Thank you for the bug report!
>>
>> Cheers,
>>
>> Michael
>>


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

  reply	other threads:[~2019-09-23  7:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-20 14:19 Man page pre & post operators error Rick Stanley
2019-09-20 17:00 ` Jakub Wilk
2019-09-22 21:01 ` Michael Kerrisk (man-pages)
2019-09-22 22:50   ` Rick Stanley
2019-09-23  7:43     ` Michael Kerrisk (man-pages) [this message]
2019-09-25 15:23     ` Rick Stanley
2019-09-25 19:42       ` Michael Kerrisk (man-pages)
2019-09-25 20:08         ` Michael Kerrisk (man-pages)
2019-09-25 22:53           ` Rick Stanley
2019-09-28 18:05         ` Manpage operator update Rick Stanley
2019-10-01 13:48         ` proposed patch to operator manpage Rick Stanley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b43e88f6-ba92-8e82-c4f5-0e24d98252d0@gmail.com \
    --to=mtk.manpages@gmail.com \
    --cc=linux-man@vger.kernel.org \
    --cc=rstanley@rsiny.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).