Symbol visibility for gcj

David Daney ddaney@avtrex.com
Sat Mar 24 00:47:00 GMT 2007


Mark Wielaard wrote:
> On Fri, 2007-03-23 at 18:18 +0000, Andrew Haley wrote:
>> I don't believe it should cause any problems, but it is possible that
>> this will break some code that was using CNI to access private symbols
>> inside a DSO.  I don't think we care about that.
> 
> For CNI we seem to treat package private members as visible. Is using
> package private members from CNI still supported/will it be kept
> supported, or should such usage be turned into java protected members?
> 

There is no C++ equivalent to java's package private IIRC, so there 
seems to be no alternative to making them public in CNI.

Trying to access private members from CNI raises C++ protection errors, 
so it should be safe to make them invisible as you would get a compile 
time error if you tried to use them.

David Daney



More information about the Gcc-patches mailing list