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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,28cd155693714664 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-23 03:29:49 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.cidera.com!Cidera!cyclone2.gnilink.net!cyclone1.gnilink.net!spamfinder.gnilink.net!nwrddc02.gnilink.net.POSTED!53ab2750!not-for-mail From: Hyman Rosen User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1a) Gecko/20020619 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Faulty languages and Liability References: <3dk*NGnrp@news.chiark.greenend.org.uk> <%rcR8.6726$cE5.5860@nwrddc02.gnilink.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Sun, 23 Jun 2002 10:29:48 GMT NNTP-Posting-Host: 162.83.247.204 X-Complaints-To: abuse@verizon.net X-Trace: nwrddc02.gnilink.net 1024828188 162.83.247.204 (Sun, 23 Jun 2002 06:29:48 EDT) NNTP-Posting-Date: Sun, 23 Jun 2002 06:29:48 EDT Xref: archiver1.google.com comp.lang.ada:26622 Date: 2002-06-23T10:29:48+00:00 List-Id: Matthew Woodcraft wrote: > Only in the same sense as any other compile-time check is. Are you > counting the compiler as a reader of the code? You're not telling the compiler anything special, since it knows you want the object to be aliased when you take a pointer to it. The reason to declare an object aliased is to inform the human reader of the code that the object will be accessed through a pointer. > Illegal as in 'the compiler will complain if you do it', or illegal as > in 'random breakage at runtime'? You're kidding, right? We're talking about C and C++ here. Random breakage at runtime, of course :-) Actually, the compiler can't complain, because it doesn't know. I assume a compiler could complain about obvious cases, but the ones where you change the constness through a pointer or reference can't be detected in all cases.