On 04/18/2016 11:55 AM, Cary Coutant wrote:
That is why protected visibility is such a mess.
Not mess, but it comes with certain limitations. And that's okay. It's
intended as an optimization, and it should do that optimization if
requested, and error out if it can't be done for whatever reason.
I completely agree.
ISTM this ought to be the guiding principle here, with the additional
caveat that if one of the limitations is tickled that we issue a good
diagnostic.
The current situation (gcc-5, gcc-6-rc) essentially de-optimizes
protected systems in an attempt to work around the various limitations
of protected symbols. Reverting that change is, IMHO, what needs to
happen. My worry is that we're so damn late in the gcc-6 cycle that it
may need to be deferred to 6.2 or beyond.
Jeff