On Aug 10, 7:03pm, t...@netbsd.org (Matthias Scheler) wrote: -- Subject: Re: CVS commit: src/sys/sys
| On Mon, Aug 10, 2009 at 12:59:57PM -0400, Christos Zoulas wrote: | > | That should allows us to keep the old-casts and avoid warnings. | > | > This cannot possibly work because the syntax parsing happens after the macro | > is expanded and the macro is expanded in c++ code. | | Why would that matter? G++ should not complain about old style casts | in 'extern "C"' sections. | extern "C" { #define bar(a) (int)(a) }; void foo(void) { double d = 2; int a = bar(a); } The c function implemented as a macro should be able to be used in c++ code. christos