[cfe-dev] Is there a way to get linkonce / selectany in C programs?
Nikola Smiljanic
popizdeh at gmail.com
Tue Jul 1 23:13:52 PDT 2014
Grepping the source code tells me that selectany is only implemented as
microsoft extension. Test files use it in combination with __declspec and
they enable this functionality with -fsm-compatibility. Note that I have no
idea what this attribute actually does, I just did a search for you :)
On Wed, Jul 2, 2014 at 2:31 PM, Talin <viridia at gmail.com> wrote:
> I'm working with a code generator that produces C code and I need linkonce
> to eliminate duplicate definitions - but the clang compiler complains that
> the 'selectany' attribute is not recognized (even though I see looking
> through the clang source code that there's code to handle it.) So I'm
> wondering why the attribute isn't recognized, I'm guessing it could be any
> number of things (platform [OS X], source language (.c), and so on...)
>
> --
> -- Talin
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140702/f52301d6/attachment.html>
More information about the cfe-dev
mailing list