Re: signed/unsigned integer conversion for right shift seems

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

 



On 2018-02-06 23:49:42 +0000, Peter T. Breuer wrote:
> An interesting new theory, if late to the party.  You now say that the
> phrase "the usual arithmetic conversions" (6.3.1.8) must be present in
> the subsection relating to the operator?

This is implied by what is said at the beginning of 6.3 (which 6.3.1.8
belongs to):

  "Several operators convert operand values from one type to another
   ^^^^^^^
  automatically."

"Several", not "All". And 2 sentences later:

  "The list in 6.3.1.8 summarizes the conversions performed by
  most ordinary operators;"
  ^^^^

"most", not "all".

So, you may wonder: Where do I get more detailed information about
when this is done? The answer is at the end of the sentence:

  "it is supplemented as required by the discussion of each operator
  in 6.5."

So it says that you need to look at 6.5, which is... that:

> Ingenious, and I'll look at that as a possibility.  Let's test.
> According to the index, the phrase occurs in
> 
>    usual arithmetic conversions, 6.3.1.8 [defn], 6.5.5, 6.5.6,
>    6.5.8, 6.5.9, 6.5.10, 6.5.11, 6.5.12, 6.5.15
> 
> 6.5.5 = multiplicative ops (* / %)
> 6.5.6 = additive ops (+ -)
> 6.5.8 = order relations (> < <= >=)
> 6.5.9 = equals relns
> 6.5.10= bitwise &
> 6.5.11= bitwise ^
> 6.5.12= bitwise |
> 6.5.15= ternery op ?:
> 
> That looks plausible. 6.5.7 (>> and <<) is about all that's missing.

Now, aren't you eventually convinced?

Note that 6.3.1.8 also says: "Many operators...". "Many", not "All".

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux