The Sun ONE Studio 8 and Sun Studio 9 compilers on Solaris support the linker scoping specifiers __global, __hidden and __symbolic which roughly correspond to gcc's default, hidden and protected visibility attributes. Is there a chance to have these keywords supported on gcc? E.g. __global void linker_scope_global() {} __hidden void linker_scope_hidden() {} __symbolic void linker_scope_symbolic() {} void linker_scope_default() {} in addition to __attribute__ ((visibility ("default"))) void linker_scope_global() {} __attribute__ ((visibility ("internal"))) void linker_scope_internal() {} __attribute__ ((visibility ("hidden"))) void linker_scope_hidden() {} __attribute__ ((visibility ("protected"))) void linker_scope_symbolic() {} void linker_scope_default() {} The command line option -xldscope={global|hidden|symbolic} allows to set the default scope. See also: http://docs.sun.com/source/817-0924/sun.specific.html#83476 http://developers.sun.com/tools/cc/documentation/s1s8cc_documentation/READMEs/c.html#feature13
You can use the preprocessor aka '-D__hidden=__attribute__ ((visibility ("hidden")))' as setting what the defualt is, I think there is another bug for that.
Confirmed, but as I said you can use the preprocessor, just like what cgwin/mgwin does for their keywords.
> http://docs.sun.com/source/817-0924/sun.specific.html#83476 > http://developers.sun.com/tools/cc/documentation/s1s8cc_documentation/READMEs/c.html#feature13 Updated link for SS10, and a usage article: http://docs.sun.com/source/819-0494/sun.specific.html#83476 http://developers.sun.com/tools/cc/articles/symbol_scope.html
It's been nearly 13 years with no activity on this request. I think it's safe to close it as Won't Fix (or at a minimum, lower the Importance). Please feel free to reopen it if it's still of interest.