public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/9345: Erroneous access controls in friend function parameter initializer
@ 2003-01-16 22:29 bangerth
  0 siblings, 0 replies; 3+ messages in thread
From: bangerth @ 2003-01-16 22:29 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, llewins, nobody

Synopsis: Erroneous access controls in friend function parameter initializer

State-Changed-From-To: open->closed
State-Changed-By: bangerth
State-Changed-When: Thu Jan 16 14:29:14 2003
State-Changed-Why:
    This is already fixed in mainline, which will eventually
    become gcc3.4. I guess one of Krian's patches achieved this.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9345


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

* Re: c++/9345: Erroneous access controls in friend function parameter initializer
@ 2003-01-16 22:16 Andrew Pinski
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Pinski @ 2003-01-16 22:16 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/9345; it has been noted by GNATS.

From: Andrew Pinski <pinskia@physics.uc.edu>
To: llewins@raytheon.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/9345: Erroneous access controls in friend function parameter initializer
Date: Thu, 16 Jan 2003 14:09:39 -0800

 This is fixed at least in gcc version 3.4 20030115 (experimental).
 
 Thanks,
 Andrew Pinski
 


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

* c++/9345: Erroneous access controls in friend function parameter initializer
@ 2003-01-16 22:06 llewins
  0 siblings, 0 replies; 3+ messages in thread
From: llewins @ 2003-01-16 22:06 UTC (permalink / raw)
  To: gcc-gnats


>Number:         9345
>Category:       c++
>Synopsis:       Erroneous access controls in friend function parameter initializer
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 16 14:06:01 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Lloyd Lewins
>Release:        unknown-1.0
>Organization:
>Environment:
cygwin
>Description:
The following code is copied from the C++ standard (section 11, clause 5)

class A {
	typedef int I;
	I f();
	friend I g(I);
	static I x;
};

A::I A::f() { return 0; }
A::I g(A::I p = A::x);
A::I g(A::I p) { return 0; }
A::I A::x = 0;

It generates an erroneous access error for A::X as shown below:

Reading specs from /usr/local/gcc32/lib/gcc-lib/i686-pc-cygwin/3.2/specs
Configured with: ../gcc-3.2/configure --prefix=/usr/local/gcc32 --enable-languag
es=c,c++ --disable-nls
Thread model: single
gcc version 3.2
 /usr/local/gcc32/lib/gcc-lib/i686-pc-cygwin/3.2/cc1plus.exe -v -D__GNUC__=3 -D_
_GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=0 -D__GXX_ABI_VERSION=102 -D_X86_=1 -D_X86
_=1 -Asystem=winnt -D__NO_INLINE__ -D__STDC_HOSTED__=1 -Acpu=i386 -Amachine=i386
 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ -D__stdcall=__
attribute__((__stdcall__)) -D__cdecl=__attribute__((__cdecl__)) -D_stdcall=__att
ribute__((__stdcall__)) -D_cdecl=__attribute__((__cdecl__)) -D__declspec(x)=__at
tribute__((x)) -D__i386__ -D__i386 -D__CYGWIN32__ -D__CYGWIN__ -Dunix -D__unix__
 -D__unix -isystem /usr/local/include -idirafter /usr/local/gcc32/i686-pc-cygwin
/include -idirafter /usr/include -idirafter /usr/local/gcc32/i686-pc-cygwin/incl
ude/w32api -idirafter /usr/include/w32api test.cc -D__GNUG__=3 -D__DEPRECATED -D
__EXCEPTIONS -quiet -dumpbase test.cc -Wall -version -o /c/TEMP/ccH38MtT.s
ignoring nonexistent directory "/usr/local/gcc32/i686-pc-cygwin/include"
ignoring nonexistent directory "/usr/local/gcc32/i686-pc-cygwin/include/w32api"
GNU CPP version 3.2 (cpplib) (80386, BSD syntax)
GNU C++ version 3.2 (i686-pc-cygwin)
        compiled by GNU C version 3.2.
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/local/gcc32/include/c++/3.2
 /usr/local/gcc32/include/c++/3.2/i686-pc-cygwin
 /usr/local/gcc32/include/c++/3.2/backward
 /usr/local/gcc32/include
 /usr/local/gcc32/lib/gcc-lib/i686-pc-cygwin/3.2/include
 /usr/include
 /usr/include/w32api
End of search list.
test.cc:5: `int A::x' is private
test.cc:9: within this context
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="test.cc"
Content-Disposition: inline; filename="test.cc"

class A {
	typedef int I;
	I f();
	friend I g(I);
	static I x;
};

A::I A::f() { return 0; }
A::I g(A::I p = A::x);
A::I g(A::I p) { return 0; }
A::I A::x = 0;


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

end of thread, other threads:[~2003-01-16 22:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-16 22:29 c++/9345: Erroneous access controls in friend function parameter initializer bangerth
  -- strict thread matches above, loose matches on Subject: below --
2003-01-16 22:16 Andrew Pinski
2003-01-16 22:06 llewins

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).