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: Jerker Bäck
Subject: RE: Intrinsic functions fails AC_CHECK_FUNCS test
Date: Fri, 24 Aug 2007 16:57:10 +0200

No, no, my mistake...I put the thing at the wrong place. The solution is
really simple:

c.m4(266)
-----------------------------------
#ifdef __cplusplus
extern "C"
#endif
char $1 ();
+ #if defined _MSC_VER
+ #pragma function( $1 )
+ #endif
-----------------------------------

Works for both MS and Intel compilers (tested), a warning C4391 is emitted
due to wrong prototype, but it's informational and not fatal. If the
function is not an intrinsic (normal case) a warning C4163 is emitted due to
#pragma function. This latter warning could be confusing for autoconf users:
"warning C4163: 'func' : not available as an intrinsic function"

To disable the warnings:
-----------------------------------
#ifdef __cplusplus
extern "C"
#endif
+ #if defined _MSC_VER
+ #pragma warning(disable : 4163 4391 4392)
+ char $1 ();
+ #pragma function( $1 )
+ #else
char $1 ();
+ #endif
-----------------------------------

Could one of these solutions be accepted by autoconf?

Thanks Jerker





reply via email to

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