This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Wed, Jul 22, 2009 at 12:01 PM, Paolo Bonzini<bonzini@gnu.org> wrote:
You can do this: add a #define (via configure.ac) when building with --enable-build-with-cxx, like AC_DEFINE([GCC_BUILT_WITH_CXX]), and use
#include "config.h" #if defined __cplusplus&& !defined GCC_BUILT_WITH_CXX extern "C" { #endif
...
#if defined __cplusplus&& !defined GCC_BUILT_WITH_CXX } #endif
I believe it is a mistake to build with a C++ compiler and decide NOT to take advantage of the additional checking of function calls.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |