bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Intrinsic functions fails AC_CHECK_FUNCS test


From: Ralf Wildenhues
Subject: Re: Intrinsic functions fails AC_CHECK_FUNCS test
Date: Thu, 23 Aug 2007 20:34:13 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

Hello Erik, Jerker, however you call yourself ;-)

* Jerker Bäck wrote on Tue, Aug 21, 2007 at 03:20:51PM CEST:
> 
> AC_CHECK_FUNCS(memcpy) =>
[...]
>  conftest.c(72) : warning C4391: 'char memcpy()' : incorrect
>     return type for intrinsic function, expected 'void'
>  conftest.c(83) : error C2168: 'memcpy' : too few actual 
>     parameters for intrinsic function
[...]
> The problem is not trivial and can lead to unexpected fatal behaviour.

Yep.  Fixing this inside Autoconf isn't trivial either, though
(at least insofar noone has put forth a good suggestion yet).

> Common current intrinsic CRT functions:
> abs, _alloca, labs, memcmp, memcpy, memset, _setjmp, strcat, strcmp, strcpy,
> strlen, strset, wcscat, wcscmp, wcscpy, wcslen, _wcsset.
> c:a 50 common math functions + a bunch of others.
> 
> A similar thread:
> http://lists.gnu.org/archive/html/bug-autoconf/2007-03/msg00029.html
> 
> And the solution was?

To just assume that the functions are present (and consequently not
check for those where that could be assumed).

Another thing you could do is write a config.site file with the right
settings preseeded.  I generate these by running
  configure -C

and copying and fixing the interesting bits from config.cache.
If you have a nice complete list for this particular compiler,
feel free to post it here, so the next person with the same
problem has less work to do.  ;-)

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]