This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [C++] GCC tree linkage types
- From: Matt Austern <austern at apple dot com>
- To: Chris Lattner <sabre at nondot dot org>
- Cc: gcc at gcc dot gnu dot org, Richard Henderson <rth at redhat dot com>
- Date: Thu, 6 Nov 2003 12:45:34 -0800
- Subject: Re: [C++] GCC tree linkage types
- References: <Pine.LNX.4.44.0310271019520.5698-100000@nondot.org>
On Oct 27, 2003, at 8:24 AM, Chris Lattner wrote
Specifically, if I comment out the maybe_make_one_only call, the
function
ends up with strong external linkage, and solves my problem. The
question
is, however, what is the right solution to this? Why does Win32 want
explicit instantiations in linkonce sections? Can you have multiple
explicit instantiations of the same template in the same program?
Perhaps DECL_COMDAT is the right answer to this?
I've actually got a more general question. We've got DECL_WEAK,
DECL_ONE_ONLY, and DECL_COMDAT. They're not quite the same,
but they're very similar.
So my question: since we've got three flags, in principle we've got
2^3 = eight possible combinations of flags. I bet most of those eight
don't make any sense. Which combinations are errors, which are
meaningful, and what are the distinctions between the meaningful
combinations? Should the answer to that question be documented
somewhere?
--Matt