public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Vincent Lefevre <vincent+gcc@vinc17.org>
To: "Peter T. Breuer" <ptb@inv.it.uc3m.es>
Cc: Jonathan Wakely <jwakely.gcc@gmail.com>,
	Liu Hao <lh_mouse@126.com>,
	Peter Breuer <Peter.T.Breuer@gmail.com>,
	gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: signed/unsigned integer conversion for right shift seems
Date: Wed, 07 Feb 2018 02:04:00 -0000	[thread overview]
Message-ID: <20180207020447.GF23233@zira.vinc17.org> (raw)
In-Reply-To: <201802062349.w16NngB3008887@nbd.it.uc3m.es>

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@vinc17.net> - 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)

  reply	other threads:[~2018-02-07  2:04 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-06 15:03 signed/unsigned integer conversion for right shift seems against C99 rule Peter Breuer
2018-02-06 15:21 ` Tadeus Prastowo
2018-02-06 15:29   ` signed/unsigned integer conversion for right shift seems against Peter T. Breuer
2018-02-06 15:38     ` Tadeus Prastowo
2018-02-06 16:17       ` Peter T. Breuer
2018-02-06 15:22 ` signed/unsigned integer conversion for right shift seems against C99 rule Alexander Monakov
2018-02-06 15:22 ` Liu Hao
2018-02-06 15:31   ` David Brown
2018-02-06 15:50   ` signed/unsigned integer conversion for right shift seems Peter T. Breuer
2018-02-06 15:57     ` Jonathan Wakely
2018-02-06 16:42       ` Peter T. Breuer
2018-02-06 16:45         ` Jonathan Wakely
2018-02-06 17:19           ` Peter T. Breuer
2018-02-06 17:35             ` Jonathan Wakely
2018-02-06 18:23               ` Peter T. Breuer
2018-02-06 18:27                 ` Jonathan Wakely
2018-02-06 18:37                   ` Tadeus Prastowo
2018-02-06 18:47                     ` Jonathan Wakely
2018-02-06 19:43                       ` Peter T. Breuer
2018-02-06 20:08                         ` Tadeus Prastowo
2018-02-06 20:15                           ` Jonathan Wakely
2018-02-07  9:59                             ` Peter T. Breuer
2018-02-07 12:28                               ` David Brown
     [not found]                                 ` <201802071634.w17GYiEL000904@nbd.it.uc3m.es>
2018-02-07 16:39                                   ` Jonathan Wakely
2018-02-07 17:25                                     ` Peter T. Breuer
2018-02-07 17:39                                       ` Jonathan Wakely
2018-02-07 18:32                                         ` Peter T. Breuer
2018-02-07 18:41                                           ` Jonathan Wakely
2018-02-07 17:39                                       ` Tadeus Prastowo
2018-02-07 18:50                                         ` Peter T. Breuer
2018-02-07 18:11                                       ` Jonathan Wakely
2018-02-06 19:28                   ` Peter T. Breuer
2018-02-06 20:11                     ` Jonathan Wakely
2018-02-06 23:49                       ` Peter T. Breuer
2018-02-07  2:04                         ` Vincent Lefevre [this message]
2018-02-07  9:30                           ` Peter T. Breuer
2018-02-06 21:18                 ` Chris Hall
2018-02-06 17:44             ` Tadeus Prastowo
2018-02-06 19:00               ` Peter T. Breuer

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=20180207020447.GF23233@zira.vinc17.org \
    --to=vincent+gcc@vinc17.org \
    --cc=Peter.T.Breuer@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=jwakely.gcc@gmail.com \
    --cc=lh_mouse@126.com \
    --cc=ptb@inv.it.uc3m.es \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).