Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: Abstract Syntax Tree for C programs Date: Thu, 13 Jun 2019 02:17:59 -0700 Organization: A noiseless patient Spider Lines: 46 Message-ID: <86blz1973s.fsf@mailhub.linuxsc.com> References: <98193656-76f0-4718-9a97-a24ba0aa9b7c@googlegroups.com> <4ff90bb7-33e5-4dcd-828f-b0d40f237420@googlegroups.com> <8a72685f-2774-4187-98bf-c9ecd44b3240@googlegroups.com> <6ed2dfc1-a737-4fb3-b59a-3aa1c337061d@googlegroups.com> <86pnnp8snc.fsf@mailhub.linuxsc.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="ef0a227b331df30b5055ba709176503b"; logging-data="3688"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18r0ZFKwVDdbV5T9QgijEBJL80ivX07ry0=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:Lnk4YUhtp4zr4izMMx/07q/Rt8Q= sha1:OhTgIO8joMCzKFSt2Nd+78h42D0= Xref: csiph.com comp.lang.c:144793 Keith Thompson writes: > Tim Rentsch writes: > >> James Kuyper writes: > > [...] > >>> As a result, this is actually easily diagnosable at compile time, and >>> thus I would have expected it to be a constraint violation - which >>> leaves me wondering why it isn't. > > [Context: "this" is a cast of a void* value to a function pointer type > or vice versa.] > >> The Rationale document says this: >> >> Consequences of the treatment of pointer types in the >> Standard include: > > [...] > >> * Even with an explicit cast, it is invalid to convert a >> function pointer to an object pointer or a pointer to >> void, or vice versa. > > [...] > >> Note the third-to-last item. It seems clear the authors intended >> that converting between function pointer types and object pointer >> types is not just undefined behavior but simply never allowed in >> accepted C code. I guess I should make an explicit statement here. I take Keith at his (earlier) word that he has put me in his killfile, and hence do not assume he will read my postings. In cases where I do post a followup to a newsgroup item from Keith, my posting is meant for the benefit of any other readers that may be interested. > [...] > > (A personal note: Tim, you're still in my killfile, but that fact > doesn't place any obligations on me.) I take this statement to mean Keith is not interested in having a dialog on the subject, and so I will not comment further.