public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tadeus Prastowo <tadeus.prastowo@unitn.it>
To: ptb@inv.it.uc3m.es
Cc: Jonathan Wakely <jwakely.gcc@gmail.com>,
	Liu Hao <lh_mouse@126.com>,
	Peter.T.Breuer@gmail.com, 	gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: signed/unsigned integer conversion for right shift seems
Date: Tue, 06 Feb 2018 17:44:00 -0000	[thread overview]
Message-ID: <CAN-HRFYp7QfovU15YQNaAJ6b0A+JscTnyqKeeqnq3gMvYqyctQ@mail.gmail.com> (raw)
In-Reply-To: <201802061719.w16HJ6i9020055@nbd.it.uc3m.es>

On Tue, Feb 6, 2018 at 6:19 PM, Peter T. Breuer <ptb@inv.it.uc3m.es> wrote:

[...]

> BTW, NOT saying something is applied in a specification should not mean
> that it is forbidden, as a general principle of specification languages.
> Is there somewhere in the C specification general blurb that says "no
> say, no do"?

[...]

> where it says that conversion MAY NOT or MUST
> NOT be applied to the arguments of >>.

Let's assume you could do one or more conversions as you wish.  But,
certainly you know you have to follow the spec, don't you?  Now the
specification of ISO-IEC 1989:1999 says in Section 6.5.7 Paragraph 3:
"The integer promotions are performed on each of the operands. The
type of the result is that of the promoted left operand."

Now, where do you want to perform your desired conversion?  Point A:
before "The integer promotions are performed on each of the operands"?
 Point B: before "The type of the result is that of the promoted left
operand"?  Point C: after "The type of the result is that of the
promoted left operand"?  Or any other point I have not mentioned?  Or
at two or more points that I have mentioned?

Try it for yourself if you can do one or more conversions at any of
the points I have mentioned without breaking the other part of the
spec.  So, if there is no loophole, a good spec shall not mention any
other extra thing, shall it?

> Regards and thanks
>
> PTB

--
Best regards,
Tadeus

  parent reply	other threads:[~2018-02-06 17:44 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 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                                       ` Tadeus Prastowo
2018-02-07 18:50                                         ` 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 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
2018-02-07  9:30                           ` Peter T. Breuer
2018-02-06 21:18                 ` Chris Hall
2018-02-06 17:44             ` Tadeus Prastowo [this message]
2018-02-06 19:00               ` Peter T. Breuer
2018-02-06 15:22 ` signed/unsigned integer conversion for right shift seems against C99 rule Alexander Monakov

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=CAN-HRFYp7QfovU15YQNaAJ6b0A+JscTnyqKeeqnq3gMvYqyctQ@mail.gmail.com \
    --to=tadeus.prastowo@unitn.it \
    --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).