This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Darwin vs. libstdc++
- To: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Subject: Re: Darwin vs. libstdc++
- From: Dale Johannesen <dalej at apple dot com>
- Date: Tue, 9 Oct 2001 11:59:35 -0700
- Cc: Dale Johannesen <dalej at apple dot com>, Stan Shebs <shebs at apple dot com>, Phil Edwards <pedwards at disaster dot jaj dot com>, Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>, gcc at gcc dot gnu dot org
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 <ctype.h> 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
<ctype.h> (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.