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,da46977c58c329df X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-07 09:27:43 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!newsfeed.bc.tac.net!news.bc.tac.net!not-for-mail Sender: blaak@TORUS 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> From: Ray Blaak Message-ID: Organization: The Transcend X-Newsreader: Gnus v5.7/Emacs 20.7 Date: 07 Feb 2002 09:25:47 -0800 NNTP-Posting-Host: 208.181.209.61 X-Complaints-To: news@bctel.net X-Trace: news.bc.tac.net 1013102855 208.181.209.61 (Thu, 07 Feb 2002 09:27:35 PST) NNTP-Posting-Date: Thu, 07 Feb 2002 09:27:35 PST Xref: archiver1.google.com comp.lang.ada:19722 Date: 2002-02-07T09:25:47-08:00 List-Id: Ian Wild writes: > C, in practice as well as theory, has two flavours of pointer, > and there's no operation that will convert between code > pointers and data pointers. You simply *can't* read or write > via code space pointers, nor can you call a data pointer. You most certainly can: void foo() { typedef void (*FUNC)(); // calling some data int i = 0; FUNC f = (FUNC) &i; f(); // writing some code f = foo; int *p = (int*) f; *p = 2; } 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. -- Cheers, The Rhythm is around me, The Rhythm has control. Ray Blaak The Rhythm is inside me, blaak@telus.net The Rhythm has my soul.