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++/12673] Possible accept-illegal in access control


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From gdr at integrable-solutions dot net  2003-10-18 14:48 -------
Subject: Re:  New: Possible accept-illegal in access control

"wwieser at gmx dot de" <gcc-bugzilla@gcc.gnu.org> writes:

| I admit that I do not know the C++ standard well enough to be able  
| to tell which behavior is the correct one. Just cancel my report in  
| case GCC's current behavior is correct.  
|  
| ----------<snip>----------- 
| class A 
| { 
| 	private: 
| 		int x; 
| 	public: 
| 		struct B 
| 		{ 
| 			A *a; 
| 			void foo() 
| 			{  a->x=1;  }  // Hmm: x private member of A 

This is not a bug in the compiler.  The standard has been changed and
C++03 says that nested classes are automatically given friendship by
the enclosing class.  A clear confusion, but nevertheless a standard
confusion. 

The bug can be closed as INVALID.

-- Gaby


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