Re: Man page pre & post operators error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Rick,

On 9/25/19 5:23 PM, Rick Stanley wrote:
> Hello again!
> 
> In an effort to bring the current manpage for the C operator table up
> to the current official Standard, I went back and compared the current
> manpage operator table against the C99, C11, and C17(18) Draft
> Standards documents.  I do not have access to the Official ISO C
> Standards documents.
> 
> I have attached a PDF to document my interpretation of the Standards
> against the current `man operator` manpage
> 
> In addition to the pre & postfix ++ & -- operators, I have found one
> additional change & three additions to the table.  Because of these
> appearing in 6.5.x, and A.2.1, I assume they should be included in the
> operator table.
> 
> The current table consists of 15 levels of precedence, C99 adds one new
> level and C11 adds one more.
> 
> (type) cast operator change
> 
> In the current table, the cast operator is listed on level 2 of 15
> levels, along with other operators.  In C99 this operator has been
> demoted to a new level inserted between level 2 & 3 of the current
> level, expanding the table to 16 levels of precedence.  I assume the
> associativity is also "right to left", as is level 2.
> 
> _Generic operator/keyword addition
> 
> This new operator/keyword was added in C11.  A new top level was
> created and the remainder of the table has been demoted by one level.
> 
> default operator/keyword addition
> 
> This too has been added to the new top level in C11

But, 'default' is not an operator as far as I can tell?
(It is part of the '_Generic' construct, not an operator
in its own right.)

> _Alignof operator/keyword addition
> 
> This was added to what I refer to as, the new level 3, along with other
> prefix operators. 
> 
> A new header file has been added to the C11 Standard, stdalign.h
> (7.15).  This #defines alignof to the _Alignof operator/keyword.  C11
> also #defines alignas to a related keyword, _Alignas.
> 
> No additional additions or changes to the operator table appear to have
> been made in the C17(C18) C Standard.
> 
> Please confirm my observations with the official C Standards documents.
> This is a polite request, not a demand.

I'm pretty rusty these days on interpreting grammars, but modulo
my one point above ('default' should not be there), what you say seems
plausible.

Would you be comfortable writing a patch, with a cover message 
that includes much of the text you give above?

Thanks,

Michael

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



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux