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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bc1361a952ec75ca X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,582dff0b3f065a52 X-Google-Attributes: gid1014db,public X-Google-Thread: 109fba,582dff0b3f065a52 X-Google-Attributes: gid109fba,public X-Google-ArrivalTime: 2001-08-09 17:05:33 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!enews.sgi.com!newshub2.rdc1.sfba.home.com!news.home.com!news1.rdc2.on.home.com.POSTED!not-for-mail Message-ID: <3B732554.576012A@home.com> From: "Warren W. Gay VE3WWG" X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++ Subject: Re: How Ada could have prevented the Red Code distributed denial of service attack. References: <3b690498.1111845720@news.worldonline.nl> <9kbu15$9bj@augusta.math.psu.edu> <9kbvsr$a02@augusta.math.psu.edu> <3B69DB35.4412459E@home.com> <3B6F312F.DA4E178E@home.com> <23lok9.ioi.ln@10.0.0.2> <3B70AB15.35845A98@home.com> <3B721FF5.B7D854F6@home.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 10 Aug 2001 00:05:32 GMT NNTP-Posting-Host: 24.141.193.224 X-Complaints-To: abuse@home.net X-Trace: news1.rdc2.on.home.com 997401932 24.141.193.224 (Thu, 09 Aug 2001 17:05:32 PDT) NNTP-Posting-Date: Thu, 09 Aug 2001 17:05:32 PDT Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: archiver1.google.com comp.lang.ada:11727 comp.lang.c:73290 comp.lang.c++:81404 Date: 2001-08-10T00:05:32+00:00 List-Id: Bart.Vanhauwaert@nowhere.be wrote: > Warren W. Gay VE3WWG wrote: > > I wasn't talking abuse. On 5 different platforms, the sizeof "ab" could > > yeild the answers 3,4 or 8, depending upon the platforms chosen ;-) > > This is not a very good result for such a simple compiler request. > > I think you misunderstand the basic design decision that led to > this. Implementations are free to choose sizes of basic types > for example to maximize speed. That's a valid choice. And because > my code doesn't depend on the results of sizeof(...) I obviously > prefer the approach where the language implementation selects > the optimal representation without me having to worry about it. Well, as my closing remark on this thread, all I can say is that the sizeof operator is clumsy. This is the only information about size you can get from the C/C++ compiler. OTOH, the Ada compiler can give you the precise size of the object in question, or it's implementation size. This way, you don't have to wrap your mind around "implementation issues", which are admitedly simple most of the time. However, it is just one more opportunity for an error to go unnoticed until you port the code to a new platform. I like to do things once, and then move on. I don't like to maintain code I did 3 years ago. I want to move onto new projects. So any compiler technology that helps me accomplish that, enhance's my general "experience", shall we say. -- Warren W. Gay VE3WWG http://members.home.net/ve3wwg