Article View: comp.std.c
Article #3543Re: Integral promotion.
From: Dan Pop
Date: Sat, 17 Feb 1996 18:18
Date: Sat, 17 Feb 1996 18:18
31 lines
1736 bytes
1736 bytes
In <4g27gn$q5k@solutions.solon.com> Chris Torek <torek@elf.bsdi.com> writes: :In article <4fvgrm$dv9@solutions.solon.com>, <msb@sq.com> wrote: : :>Excerpts from the standard: :> :>* From 6.3.16.1/3.3.16.1: :># In "simple assignment" (=), the value of the right operand is :># converted to the type of the left operand ... :> :>* From 6.2.1.2/3.2.1.2: :># When a value with integral type is demoted to a signed integer with :># smaller size ... if the value cannot be represented the result is :># implementation-defined. ^^^^^^^^^^^^^ :> ^^^^^^^^^^^^^^^^^^^^^^ :>Hence implementation-defined behavior occurs. : :Thus, the implementation has to say exactly how it handles this. :There is still some question as to whether the implementation can :define it as an overflow resulting in program termination, is there :not? This is open to debate. According to the standard, the result of the conversion is implementation-defined, not the behaviour of the program. Dan -- Dan Pop CERN, CN Division Email: danpop@mail.cern.ch Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
Technical Details
Message-ID:
<4g565t$bam@solutions.solon.com>Path:
arc1-ca.pugleaf.net!solon.com!not-for-mailReferences:
<4fstj7$2l6@solutions.solon.com> <4fu835$9de@solutions.solon.com> <4fvgrm$dv9@solutions.solon.com> <4g27gn$q5k@solutions.solon.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail From: danpop@mail.cern.ch (Dan Pop) Newsgroups: comp.std.c,comp.lang.c.moderated Subject: Re: Integral promotion. Date: 17 Feb 1996 12:18:37 -0600 Organization: CERN European Lab for Particle Physics Sender: clc@solutions.solon.com Approved: clc@solutions.solon.com Message-ID: <4g565t$bam@solutions.solon.com> References: <4fstj7$2l6@solutions.solon.com> <4fu835$9de@solutions.solon.com> <4fvgrm$dv9@solutions.solon.com> <4g27gn$q5k@solutions.solon.com> NNTP-Posting-Host: solutions.solon.com X-Newsreader: NN version 6.5.0 #7 (NOV)