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