Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #12782

Re: left shift count >= width of type

From Alessandro Basili <alessandro.basili@cern.ch>
Newsgroups comp.lang.c
Subject Re: left shift count >= width of type
Date 2011-11-05 19:17 +0100
Message-ID <9hlctbF1p7U1@mid.individual.net> (permalink)
References <9hcichF56iU1@mid.individual.net> <j8r9rk$5u0$1@dont-email.me> <9hij73F5fnU1@mid.individual.net> <4EB41D17.1070603@verizon.net>

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On 11/4/2011 6:12 PM, James Kuyper wrote:
> On 11/04/2011 12:46 PM, Alessandro Basili wrote:
>> On 11/2/2011 12:34 PM, James Kuyper wrote:
> ...
>>> However - and this is the key point - this is not a constraint, it's
>>> undefined behavior. Conforming implementations are NOT required to issue
>>> a diagnostic.
>>>
>>
>> And I believe that is what happened in this case.
> 
> <nit-pick> The fact that this code has "undefined behavior" is why
> whatever actually happens is permissible, regardless of what actually
> happens. "Undefined behavior" is not a specific kind of behavior that
> can happen or not happen.</nit-pick>

That lack of control on "what actually happens" is the driving force to
resolve the "undefined behavior". But I believe I got your point.

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

left shift count >= width of type Alessandro Basili <alessandro.basili@cern.ch> - 2011-11-02 10:55 +0100
  Re: left shift count >= width of type James Kuyper <jameskuyper@verizon.net> - 2011-11-02 07:34 -0400
    Re: left shift count >= width of type Keith Thompson <kst-u@mib.org> - 2011-11-02 13:47 -0700
    Re: left shift count >= width of type Alessandro Basili <alessandro.basili@cern.ch> - 2011-11-04 17:46 +0100
      Re: left shift count >= width of type James Kuyper <jameskuyper@verizon.net> - 2011-11-04 13:12 -0400
        Re: left shift count >= width of type Alessandro Basili <alessandro.basili@cern.ch> - 2011-11-05 19:17 +0100
  Re: left shift count >= width of type Thad Smith <ThadSmith@acm.org> - 2011-11-02 20:22 -0600

csiph-web