[Top][All Lists]

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

Re: AC_CHECK_FUNCS always succeeds on AIX with Autoconf 2.56

From: Ville Laurikari
Subject: Re: AC_CHECK_FUNCS always succeeds on AIX with Autoconf 2.56
Date: Sun, 1 Dec 2002 21:17:45 +0200
User-agent: Mutt/1.4i

> Hi,
>    I've looked into this problem and created patch. In fact I've only 
> put back the original code while maintaining the current one, i.e. `f' 
> is assigned both in global initialization and also in main(). I've tried 
> this fix on Linux with gcc 2.96, Sun with gcc 2.95 and SunCC 7.0, HP-UX 
> with gcc 3.0.4 and AIX with gcc 3.1.1 and IBM C/C++ 3.6.6. I'm not able 
> to check it with unbundled cc A.05.36 for ia64 so someone probably 
> should check it (this configuration is why the old test was changed).

I think a clean fix would be to generate code that calls the
function that is being tested.  A function call can never be optimized
away at any stage unless it is known that the function has no
side-effects.  If the compiler knows this about a function then the
function must exist, and the test should succeed anyway.

Like this:

main ()
  char (*f) () = $ac_func;
  return 0;


reply via email to

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