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: [C++] GCC tree linkage types



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


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