Article View: comp.std.c
Article #3520Re: Integral promotion.
From: Encom Technology Sydney
Date: Fri, 23 Feb 1996 03:42
Date: Fri, 23 Feb 1996 03:42
17 lines
1178 bytes
1178 bytes
Re: short = short + short causing a warning. This is all getting off the track. Since only a warning is generated this has very little to do with the standard. I think the point is why does short = short + short; generate a warning whereas int = int + int; does not. Both these statements are as prone to overflow as each other (although in the first case it may not happen until the int resulting from the addition is moved into the short if sizeof(int) > sizeof(short). The warning is even sillier since on the implementation mentioned ints and shorts are the same.
Technical Details
Message-ID:
<4gjd3g$nt9@solutions.solon.com>Path:
arc1-ca.pugleaf.net!solon.com!not-for-mailReferences:
<4fstj7$2l6@solutions.solon.com> <4fvgvb$e0t@solutions.solon.com> <4gfgfp$3k8@solutions.solon.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail From: encom@jolt.mpx.com.au (Encom Technology Sydney) Newsgroups: comp.std.c,comp.lang.c.moderated Subject: Re: Integral promotion. Followup-To: comp.std.c,comp.lang.c.moderated Date: 22 Feb 1996 21:42:40 -0600 Organization: Microplex Pty Ltd Sender: clc@solutions.solon.com Approved: clc@solutions.solon.com Message-ID: <4gjd3g$nt9@solutions.solon.com> References: <4fstj7$2l6@solutions.solon.com> <4fvgvb$e0t@solutions.solon.com> <4gfgfp$3k8@solutions.solon.com> NNTP-Posting-Host: solutions.solon.com X-Newsreader: TIN [version 1.2 PL2]