Topic: What's Difference in "Integral Promotion" among C89, C99 and C++


Author: "Douglas A. Gwyn" <gwyn@arl.army.mil>
Date: Tue, 27 Mar 2001 00:06:15 GMT
Raw View
Perry Yuan wrote:
> What's the difference in integral promotion among C89, C99 and C++?

C89 and C99 use value-preserving rules.  I don't know about
Standard C++ but strongly suspect that it does too.

Signedness-preserving rules were used in some older compilers,
including AT&T/Bell Labs' before C89.

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html                ]





Author: nmm1@cus.cam.ac.uk (Nick Maclaren)
Date: Tue, 27 Mar 2001 18:39:36 CST
Raw View
In article <3ABFC9A4.BE81342E@arl.army.mil>,
Douglas A. Gwyn <gwyn@arl.army.mil> wrote:
>Perry Yuan wrote:
>> What's the difference in integral promotion among C89, C99 and C++?
>
>C89 and C99 use value-preserving rules.  I don't know about
>Standard C++ but strongly suspect that it does too.
>
>Signedness-preserving rules were used in some older compilers,
>including AT&T/Bell Labs' before C89.

However, there are some differences between C90 and C99 to do with
the changes in the type design - though I think that you would have
to look pretty hard to find a practical difference in this case.


Regards,
Nick Maclaren,
University of Cambridge Computing Service,
New Museums Site, Pembroke Street, Cambridge CB2 3QG, England.
Email:  nmm1@cam.ac.uk
Tel.:  +44 1223 334761    Fax:  +44 1223 334679

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html                ]