This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PLUGINS] Add 'extern "C"' wrappers to several header files
Hi Diego, the workaround you suggested on #gcc works well:
#include <gmp.h>
extern "C" {
#include "gcc_header.h"
...
}
It seems that gmp.h is the only system header file used by gcc
that likes to use C++ when compiled by a C++ compiler, so this
is good enough. I don't plan to go further with my original
patch, though it could doubtless be made to work using iant's
suggestion of imitating the __BEGIN_DECLS approach of <sys/cdefs.h>.
Ciao,
Duncan.