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,da46977c58c329df X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-07 11:20:58 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news-x2.support.nl!newspeer.clara.net!news.clara.net!news2.euro.net!uunet!ash.uu.net!spool0900.news.uu.net!reader0901.news.uu.net!not-for-mail Message-ID: <3C62D397.8040001@mail.com> Date: Thu, 07 Feb 2002 14:20:55 -0500 From: Hyman Rosen User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.8+) Gecko/20020205 X-Accept-Language: en-us MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada's Slide To Oblivion ... References: <4519e058.0201310714.650888e1@posting.google.com> <3C598CAA.7040801@home.com> <3C59FCD3.928144FB@adaworks.com> <7v8za79id0.fsf@vlinux.voxelvision.no> <3C6288CB.3227AF20@cfmu.eurocontrol.be> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Organization: KBC Financial Products Cache-Post-Path: master.nyc.kbcfp.com!unknown@fixedcost.nyc.kbcfp.com X-Cache: nntpcache 2.3.3 (see http://www.nntpcache.org/) NNTP-Posting-Host: 204.253.250.10 X-Trace: 1013109672 reader1.ash.ops.us.uu.net 29353 204.253.250.10 Xref: archiver1.google.com comp.lang.ada:19728 Date: 2002-02-07T14:20:55-05:00 List-Id: Ray Blaak wrote: > You most certainly can: > typedef void (*FUNC)(); > int i = 0; > FUNC f = (FUNC) &i; > > That this crashes with access violations on a sane OS is a good thing, but > nothing in the language is preventing the code/data conversions. False. The typecast '(FUNC)&i' is not legal standard C or C++. It's not even a case of undefined results - it's just illegal. Some compilers permit it as an extension, though.