RFC: Make dllimport/dllexport imply default visibility

Geoffrey Keating geoffk@apple.com
Wed Jul 4 01:31:00 GMT 2007

On 03/07/2007, at 5:13 PM, Mark Mitchell wrote:

> Geoffrey Keating wrote:
>> GCC's concept of visibility is very different to that of some other
>> compilers.
> Yes, and that may be a problem.  For some features, we want to have  
> semantics that are consistent that across platforms; for others, we  
> want
> to match other compilers on a particular platform.

Yes.  __attribute__((visibility)) has consistent GNU semantics, and  
other features (eg. -fvisibility-ms-compat, __dllspec) match other  

> To be clear, I don't have any objection to the semantics you stated,
> from the point of view of first principles of language design.  But,
> they do not match existing practice on various systems -- and I  
> consider
> that a serious problem.

It's not possible for any semantics to match existing practise on  
every system, since systems differ.  As I said, I think that it would  
be best for GCC to have one standard consistent set of semantics for  
__attribute__((visibility)), and then if it's desirable to match  
existing practise on other systems that should be done with other  
features explicitly labelled as such.

I hope you don't mean that there are other system's compilers using  
the '__attribute__((visibility))' syntax in a way that's incompatible  
with GCC.  If there are, I think the appropriate response is a  
combination of fixincludes and a polite e-mail asking them to stop.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2462 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20070704/dc2c25da/attachment.p7s>

More information about the Gcc mailing list