This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Darwin vs. libstdc++
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.
Exactly, which is why I suspect that people think the standard
doesn't require that functions be available. One of those reasons
to have testsuite, so that well-meaning people don't remove the
required bits and leave only the optimization in the headers.
(Ironically, this is correct in every other flavor of BSD that I
looked at - only NeXT/Apple managed to get this wrong, haven't
studied the version trail to find an actual miscreant though.)
Stan