Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!orchid!jagardner From: jagardner@orchid.UUCP Newsgroups: comp.lang.c Subject: Re: Does ANSI C have lengthof() ? Message-ID: <10585@orchid.waterloo.edu> Date: Tue, 8-Sep-87 18:35:38 EDT Article-I.D.: orchid.10585 Posted: Tue Sep 8 18:35:38 1987 Date-Received: Thu, 10-Sep-87 02:40:16 EDT References: <9154@brl-adm.ARPA> <1265@mhres.mh.nl> <5360@utcsri.UUCP> Reply-To: datanguay@watbun.waterloo.edu (David Tanguay) Organization: U. of Waterloo, Ontario Lines: 16 In article <5360@utcsri.UUCP> flaps@utcsri.UUCP (Alan J Rosenthal) writes: > [...] > >Besides Doug Gwyn's completely-correct comment that you should be >saying "typedef char *numptr", this facility currently exists anyway: > According to the draft ANSI standard, "The expression shall be an integral constant expression that shall not contain a sizeof operator" ... This is in section 3.8.1, in reference to the "constant expression that controls conditional inclusion". (draft Oct 1 1986) I don't think it's cpp's place to know machine constants like sizeof. The draft allows "void *" (generic pointer), so that should solve your problems. David Tanguay