This is the mail archive of the gcc-prs@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]

c++/7809: g++ 3.2 accepts friend declarations concerning inaccessible methods


>Number:         7809
>Category:       c++
>Synopsis:       g++ 3.2 accepts friend declarations concerning inaccessible methods
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          accepts-illegal
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 02 06:46:02 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     bagnara@cs.unipr.it
>Release:        unknown-1.0
>Organization:
>Environment:
$ uname -a
Linux zoltan.unisuv.it 2.4.19 #23 Sun Aug 4 18:03:23 CEST 2002 i686 unknown
$ gcc -v
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.2/specs
Configured with: ../gcc-3.2/configure --prefix=/usr/local
Thread model: posix
gcc version 3.2
>Description:
The following snippet (call it bug.cc) compiles
whereas, according to the standard (11p3 and 11.4p7),
it should not:

class A {
private:
  void f();

public:
  A();
};

class B {
  friend void A::f();
};
>How-To-Repeat:
$ g++ -c -W -Wall bug.cc
$ 
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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