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: 1014db,582dff0b3f065a52 X-Google-Attributes: gid1014db,public X-Google-Thread: 103376,bc1361a952ec75ca X-Google-Attributes: gid103376,public X-Google-Thread: 109fba,582dff0b3f065a52 X-Google-Attributes: gid109fba,public X-Google-ArrivalTime: 2001-08-15 22:16:24 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!howland.erols.net!news-out.worldnet.att.net.MISMATCH!wn3feed!worldnet.att.net!135.173.83.72!wnfilter2!worldnet-localpost!bgtnsc04-news.ops.worldnet.att.net.POSTED!not-for-mail From: "David Thompson" Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++ 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> Subject: Re: How Ada could have prevented the Red Code distributed denial of service attack. X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Message-ID: Date: Thu, 16 Aug 2001 05:16:23 GMT NNTP-Posting-Host: 12.89.147.208 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 997938983 12.89.147.208 (Thu, 16 Aug 2001 05:16:23 GMT) NNTP-Posting-Date: Thu, 16 Aug 2001 05:16:23 GMT Organization: AT&T Worldnet Xref: archiver1.google.com comp.lang.ada:11969 comp.lang.c:74633 comp.lang.c++:82994 Date: 2001-08-16T05:16:23+00:00 List-Id: 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. > Not true. In any conforming implementation of either C or C++ sizeof "ab" is 3. Perhaps you meant one of two other things: - sizeof 'a' /* a _character_ literal, not string */ is 1 in C++, but in C sizeof(int), which is not standardized and can vary, although I would be very surprised to ever find it 3. - given struct foo { char bar [3]; }, sizeof(struct foo) or in C++ of (foo), or of any object declared with such type, _could_ be larger than 3 if the implementation has nontrivial alignment requirements for such a type. -- - David.Thompson 1 now at worldnet.att.net