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]

Public / Private in headers


I don't know if you consider this a bug, nor if it's been fixed in recent
versions of GCC, but I experienced this: when compiling a C++ module with
a class definition, member's names are exported without regard to their
visibility modificators. So, if I link that module with another containing
(and using) same members, but all declared public, I can access and modify
a class' internal structure: now, I know, I made the class and declaring
it in a different way is like shoot me in the foot, but this give me the
chance to create a derived class that can export as public the members
declared as private by its parent, in contrast with standard's
specifications, as far as I know.


Good bye and many compliments for the great job.

Ferdinando Formica


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