From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,98ad5b2a2cd88a53 X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,98ad5b2a2cd88a53 X-Google-Attributes: gid103376,public From: robert_dewar@my-dejanews.com Subject: Re: Ada or C++ acting 'correctly' here? Date: 1999/02/28 Message-ID: <7baig1$mg1$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 449810822 References: <7b8c7u$sj1@drn.newsguy.com> <7b9i8l$6ql$1@ash.prod.itd.earthlink.net> <36D85A54.2A0E6283@ibm.net> X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) X-Http-Proxy: 1.0 x9.dejanews.com:80 (Squid/1.1.22) for client 166.72.82.111 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Sun Feb 28 04:59:49 1999 GMT Newsgroups: comp.lang.ada,comp.lang.c++ Date: 1999-02-28T00:00:00+00:00 List-Id: In article <36D85A54.2A0E6283@ibm.net>, bijuthom@ibm.net wrote: > No. The C++ compiler is non-conforming. The C++ standard > says that if a constant expression cannot be represented > in the target type, the program is ill-formed. (Chapter > 5, paragraph 5.) A C++ compiler is required to issue a > diagnostic message while compiling an ill-formed > program. (It is *not* an undefined behaviour.) Interesting, this is new to me, is this something that has been in informal C++ definitions from the start, or was it something added for the ISO standard? By the way, I still think this shows an advantage of Ada, one cannot imagine bumping into a non-conforming Ada 95 compiler that would not reject the Ada example here. I suspect the C++ situation is precisely an indication of the fact that C++ compilers are not yet generally fully conforming with the ISO standard. -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own