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 GNU semantics that are consistent that across platforms; for others, we wantto match other compilers on a particular platform.
Yes. __attribute__((visibility)) has consistent GNU semantics, and other features (eg. -fvisibility-ms-compat, __dllspec) match other compilers.
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 considerthat 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.
smime.p7s
Description: S/MIME cryptographic signature