Sujet : Re: Threads across programming languages
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.cDate : 18. May 2024, 20:26:31
Autres entêtes
Organisation : None to speak of
Message-ID : <87fruely54.fsf@nosuchdomain.example.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Tim Rentsch <
tr.17687@z991.linuxsc.com> writes:
[...]
First, a pointer is not an object. In both C and C++, any pointer,
including a function pointer, is a scalar value. A pointer value
might be held in an object but it doesn't have to be. In most cases
function pointers are not stored in objects but simply used to call
the function pointed to.
[...]
Certainly a pointer value is not an object. Certainly a pointer object
*is* an object. It's not uncommon to informally refer to a pointer
object as "a pointer". I presume you would consider such usage to be
incorrect, and I don't disagree, but it is fairly common.
I often find it useful to avoid referring to "pointers", and instead
refer to "pointer types", "pointer values", "pointer objects", and so
on (likewise for arrays).
The C standard does not, as far as I can tell, provide a definition for
the standalone term "pointer". (I could have missed something; I
checked section 3, "Terms, definitions, and symbols", and the index.)
But the standard does, in several places, use the term "pointer" to
refer to a pointer value. I don't know whether it's consistent.
-- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.comvoid Void(void) { Void(); } /* The recursive call of the void */