public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/12673] New: Possible accept-illegal in access control
@ 2003-10-18 14:48 wwieser at gmx dot de
  2003-10-18 14:58 ` [Bug c++/12673] " gdr at integrable-solutions dot net
  2003-10-18 15:46 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: wwieser at gmx dot de @ 2003-10-18 14:48 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: Possible accept-illegal in access control
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: wwieser at gmx dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-linux-gnu
  GCC host triplet: i686-linux-gnu
GCC target triplet: i686-linux-gnu

The following code compiles cleanly using  
gcc (GCC) 3.3.2 20031003 (prerelease) 
 
If I recall correctly, this short of code was accepted by gcc-2.95  
then rejected by earlier gcc-3 versions and with gcc-3.3.2 it  
compiles cleanly again.  
 
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 
		}; 
}; 
 
void bar() 
{  A a;  A::B b;  b.a=&a;  b.foo();  }


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/12673] Possible accept-illegal in access control
  2003-10-18 14:48 [Bug c++/12673] New: Possible accept-illegal in access control wwieser at gmx dot de
@ 2003-10-18 14:58 ` gdr at integrable-solutions dot net
  2003-10-18 15:46 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: gdr at integrable-solutions dot net @ 2003-10-18 14:58 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/12673] Possible accept-illegal in access control
  2003-10-18 14:48 [Bug c++/12673] New: Possible accept-illegal in access control wwieser at gmx dot de
  2003-10-18 14:58 ` [Bug c++/12673] " gdr at integrable-solutions dot net
@ 2003-10-18 15:46 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-18 15:46 UTC (permalink / raw)
  To: gcc-bugs

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-10-18 15:21 -------
Closing as per GDR.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-10-18 15:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-18 14:48 [Bug c++/12673] New: Possible accept-illegal in access control wwieser at gmx dot de
2003-10-18 14:58 ` [Bug c++/12673] " gdr at integrable-solutions dot net
2003-10-18 15:46 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).