This is the mail archive of the
mailing list for the GCC project.
Re: [gcc-in-cxx] Remove extern "C" from libdecnumber
Andrew Pinski <email@example.com> writes:
> On Tue, May 26, 2009 at 9:16 PM, Ian Lance Taylor <firstname.lastname@example.org> wrote:
>> 2009-05-26 ÂIan Lance Taylor Â<email@example.com>
>> Â Â Â Â* dfp.c: If __cplusplus, use extern "C" around inclusion of
>> Â Â Â Âlibdecnumber header files.
> That is bad coding style (most C++ text books recommend against doing
> that). In fact it is one of the reasons why we should define a coding
> style right now for C++ usage in GCC.
I'm not sure that C++ coding style guidelines are wholly relevant when
working with a mixed language code base which combines code from
different sources. I agree that it would be better to have the extern
"C" in the libdecnumber header files. However, that code came from an
upstream source. So the correct approach here is to convince the
upstream source to add the extern "C". In the meantime, I think that
something like this patch is better than changing the libdecnumber
sources. Would it make you happier if I moved the #include libdecnumber
statements into a header file in the gcc subdirectory?