This is the mail archive of the gcc@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: Phase 1 of gcc-in-cxx now complete (Ada)


Robert Dewar <dewar@adacore.com> writes:

> Ian Lance Taylor wrote:
>
>> I think the function to change is Gen_Output_File_C in bindgen.adb.
>
> I don't really see any urgency for this change, yes gnatbind has
> the option to generate C, but it is not the normal path, and only
> of use in unusual circumstances, so I don't really see the need
> for this output to be C++ compatible. The documentation doesn't
> claim this after all.

gnatbind -C appears to be used when bootstrapping gcc to generate .c
files.  With --enable-build-with-cxx, those .c files will be compiled
with a C++ compiler.  The symbols emitted by that compilation need to be
linkable with the symbols emitted when compiling Ada code, so the .c
files need extern "C" to avoid C++ mangling.

Or at least so it seems to me.  I may be missing some key step.

Ian


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