Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: C++ features for C Date: Mon, 14 May 2018 10:57:50 -0700 Organization: None to speak of Lines: 21 Message-ID: References: <11edbfd7-461d-4579-8ac7-a9e84a6b7630@googlegroups.com> <7b110d3e-ddb5-42a0-af99-aa5b0cb30832@googlegroups.com> <13efc313-d10c-4357-9aa7-6fa55b09d948@googlegroups.com> <6jJJC.146191$MD7.27173@fx14.am4> <3zKJC.11239$3a1.5531@fx11.am4> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="a1db6b86abbd7d0cf7030c7abf0a976b"; logging-data="5713"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19YnPLSP0JSp13LdTHq7gJl" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:1GkWjxL3ps0pwGv4uNwtGw8Zuds= sha1:Qgioc8sLtkDqNPQI6TMZfldcDd0= Xref: csiph.com comp.lang.c:130563 David Brown writes: [...] > The unary * operator needs an operand of pointer /type/, not a pointer. > It needs to be something that points somewhere - that is not the same > thing as a pointer itself. &x is an expression of pointer type, but it > is not a pointer. You cannot take its address, or increment it, or set > its value. It is like "1 + 2" is an expression of int type, it is not > an int. What you mean is that it is not a pointer *object*. The standard itself sometimes uses the unqualified term "pointer" to refer to a pointer value that is not the value of any pointer object. See, for example, the definition of malloc(): "The malloc function returns either a null pointer or a pointer to the allocated space." -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"