This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/29040] missing access control checks in subclasses for nested types


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29040

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|gcc-bugs at gcc dot gnu.org        |
      Known to fail|                            |

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
To be clear: the issue isn't access control of subclasses per se: the real
issue is about access control for 'struct n' vs 'n' when the declaration of p
is parsed: 'struct n' is handled like 'struct whatever', is accepted without
even performing a lookup. Indeed, changing 'struct n' to 'n' per normal C++ for
this kind of code, leads to the expected error message. I think that accepting
'struct n' without lookup and thus without access control in this kind of code
used to be legal in cfront.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]