[Bug c++/85943] Template function permits derived class access to private base class static variable

achuah at drwsg dot com gcc-bugzilla@gcc.gnu.org
Mon May 28 05:13:00 GMT 2018


Anthony Chuah <achuah at drwsg dot com> changed:

           What    |Removed                     |Added
            Summary|Template function permits   |Template function permits
                   |outside access to private   |derived class access to
                   |variable                    |private base class static
                   |                            |variable

--- Comment #2 from Anthony Chuah <achuah at drwsg dot com> ---
Apologies for yet another edit: next time I'll make sure to have the
fully-written report before submitting.

The issue appears to be that GCC will permit a derived class access to a
private static variable of its base class.

Please use this repro example instead https://godbolt.org/g/A3zCLk, because it
has a listing of different test cases.

More information about the Gcc-bugs mailing list