From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dale Johannesen To: Neil Booth Cc: Dale Johannesen , Stan Shebs , Phil Edwards , Bryce McKinlay , gcc@gcc.gnu.org Subject: Re: Darwin vs. libstdc++ Date: Tue, 09 Oct 2001 11:59:00 -0000 Message-id: References: <20011009191753.A4712@daikokuya.demon.co.uk> X-SW-Source: 2001-10/msg00605.html On Tuesday, October 9, 2001, at 11:17 AM, Neil Booth wrote: > Stan Shebs wrote:- > >> Really? I don't see anything in my C89 or C99 specs that suggests >> that isalnum and friends don't need function definitions. For one >> thing, you can't take the address of a macro, so the standard would >> have to say explicitly that the address of isalnum is undefined. > > You could have both. Anything with a following '(' uses the macro. > Taking the address of the function will not have a following '(', and > so would not be treated by CPP as a macro invocation. Yes. A function is required to exist (explicitly, in c89, I don't have the other specs handy); an additional macro implementation is permissible, but not required. The functions are there in the Darwin library; it is a known bug in that some declarations are missing. Here is a complete list: isalnum, isalpha, iscntrl, isdigit, isgraph, islower, isprint, ispunct, isspace, isupper, isxdigit. Anyone so inclined can hack around the problem by adding declarations for these to (before the existing macro definitions). Sorry, none of the Apple people who post to this list has any control over when (or whether) this gets fixed in releases.