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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,4215feeab2a8154a X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!fdn.fr!gegeweb.org!aioe.org!not-for-mail From: John McCabe Newsgroups: comp.lang.ada Subject: Re: C++0x and Threads - a poor relation to Ada's tasking model? Date: Fri, 14 Aug 2009 15:54:31 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <850893f5-46e5-443f-af0f-f16eef5cfa37@n2g2000vba.googlegroups.com> <57766742-5e6e-4b68-8094-57db1fa8951d@s15g2000yqs.googlegroups.com> <2kra85p2lsrd7200mcfr9fn65s123468br@4ax.com> <625c577b-9097-4a8d-a9cb-dd986dd81f89@h30g2000vbr.googlegroups.com> NNTP-Posting-Host: RXEkuaSUwmKe0XIGFYSK7A.user.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.7.9 X-Newsreader: Forte Agent 2.0/32.652 Cancel-Lock: sha1:XJuvQ37uVlCpq1uxxRsZV81huL0= Xref: g2news2.google.com comp.lang.ada:7791 Date: 2009-08-14T15:54:31+01:00 List-Id: On Fri, 14 Aug 2009 07:49:12 -0700 (PDT), REH wrote: >On Aug 14, 10:30�am, John McCabe >wrote: >> Not significantly as far as I can see; C++ says behaviour on overflow >> on signed integers is undefined, and C seems to say that it's up to >> the implementation (which seems like the same thing). Both say >> unsigned overflow doesn't occur because they use modulo arithmetic. >> >> Unless of course I'm looking in the wrong place. >> > >No, you're not. They both say that signed integer overflow is >undefined behavior. Good. One day I will go through some more of that standard, unless I get my wish and we start using Ada here :-} > They diverge when it comes to other portability >guarantees. Of course, but I was referring just to this example when using "C/C++"! >This is, of course, pedantry on my part but >I just wanted to show that isn't safe to assume that C and C++ share >the same rules. That's something I was aware of but it's always worth reminding me :-)