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]

Re: [PLUGINS] Add 'extern "C"' wrappers to several header files


On Wed, Jul 22, 2009 at 3:48 PM, Duncan Sands<baldrick@free.fr> wrote:
> Hi Diego, thanks for your comments.
>
>> Ian, wouldn't you have needed this for --enable-build-with-cxx?
>
> I wasn't aware of -enable-build-with-cxx. ?I just tried it and
> unfortunately my patch breaks the build when it is enabled.
> Compiling insn-attrtab.c:
>
> In file included from insn-attrtab.c:15:
> insn-attr.h:50: error: previous declaration of ‘int
> get_attr_length(rtx_def*)’ with ‘C++’ linkage
> output.h:50: error: conflicts with new declaration with ‘C’ linkage
> insn-attr.h:51: error: previous declaration of ‘void
> shorten_branches(rtx_def*)’ with ‘C++’ linkage
> output.h:58: error: conflicts with new declaration with ‘C’ linkage
>
> I'm not sure what the best way to proceed is.

Declare mixing C / C++ this way broken.  No C++ plugins if
GCC is not build with C++.

Richard.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]