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!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!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 12:09:27 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <362f621e-a01c-4772-ba02-4e18e9962188@j19g2000vbp.googlegroups.com> <128d63da-361f-4e33-be5e-e06bdc71e39f@r34g2000vba.googlegroups.com> <850893f5-46e5-443f-af0f-f16eef5cfa37@n2g2000vba.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:+lAfEKgKCL/6fOzePn87Ih9iNSA= Xref: g2news2.google.com comp.lang.ada:7768 Date: 2009-08-14T12:09:27+01:00 List-Id: On Thu, 13 Aug 2009 09:24:33 -0700 (PDT), REH wrote: >On Aug 13, 9:51�am, John McCabe wrote: >> My point I guess is that some processors may have support for >> facilities that map nicely on to Ada's exception handling, some >> probably don't, but generalising in the way you have is not an >> accurate representation (like there being no way to provide an >> accurate representation of an object in C/C++ :-) > >You are making the assumption that hardware exceptions map to software >exceptions. It's not an assumption, it's a point; if an Ada compiler were to choose not to use the features of the processor where those features mapped closely to a feature of the language, then that's their choice. I would hope that most compilers would assess whether the use of that feature would be more effective than doing it "by hand" and choose whichever is the most appropriate. > An Ada run-time may do this (or it may not). See above. > C++ does not ( there is no such animal as C/C++). Under the circumstances I use C/C++ to represent C and C++ as this particular example is common to both; they both incorpoate overwrapping semantics for operations on integer types (unlike Ada, which provides a separate Modular type for that purpose). >Ada has specific requirements for >what happens when your Int16 overflows. C++ considered a signed >integer overflow undefined behavior. The compiler is allowed to do >anything it wants. Oh dear.