This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH: extern "C" structs
>>>>> "Jason" == Jason Merrill <jason@cygnus.com> writes:
Jason> If extern "C" affects the mangling of member functions,
Jason> that's a bug.
Right. It didn't. But, DECL_DESTRUCTOR_P was something like:
DECL_DESTRUCTOR_NAME (...) && DECL_LANGUAGE (...) == lang_cplusplus
And DECL_LANGUAGE gets set to C for a member function in a struct in
an extern "C" block. I don't know what to think of that.
Anyhow, it's much cleaner to have DECL_DESTRUCTOR_P just set a bit.
For example, Alex's new-ABI mangling code then has only a single entry
point; not the two separate ones we have now. Someday, we might even
be able to do lazy mangling -- that would save some space/time. But,
we still need to be able to tell what's a destructor and what's not.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com