Greg McGary writes:
> The AC_CHECK_FUNCS macro detects the presence of a function by
> attempting to link a tiny test program that uses the function. If the
> link is successful, then the function is known to exist in the
> library. The problem for BPs is that the test program uses a fake and
> simplistic declaration of the function with return type char and no
> arg types. Thus, `gcc -fbounded-pointers' will compile it without
> the" __BP_" prefix, but if the function really has pointers in its
> signature, it will exist in a BP-compiled library with the prefix and
> we'll improperly get a link failure.
What about this:
int strcmp();
int main()
{
return strcmp(0, 0);
}
This is a valid program, at least by some standard out there. But if I
understand you right then you would get a link failure from this if the
object code for strcmp() was compiled with bounded pointers.
AC_CHECK_FUNCS is right: a declaration without an argument list is
sufficient proof that the function exists. If bounded pointers violate
that then they need to be fixed.
I also wonder about all the people that use `nm' in one way or another for
similar tasks. Nobody expects name mangling in C.
--
Peter Eisentraut Sernanders väg 10:115
[EMAIL PROTECTED] 75262 Uppsala
http://yi.org/peter-e/ Sweden