From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1029 invoked by alias); 30 Oct 2002 23:32:04 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 1005 invoked by uid 61); 30 Oct 2002 23:32:04 -0000 Date: Wed, 30 Oct 2002 15:32:00 -0000 Message-ID: <20021030233204.1003.qmail@sources.redhat.com> To: cludwig@cdc.informatik.tu-darmstadt.de, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org From: bangerth@dealii.org Reply-To: bangerth@dealii.org, cludwig@cdc.informatik.tu-darmstadt.de, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Subject: Re: c++/7522: access by friend function's default argument X-SW-Source: 2002-10/txt/msg01281.txt.bz2 List-Id: Synopsis: access by friend function's default argument State-Changed-From-To: open->feedback State-Changed-By: bangerth State-Changed-When: Wed Oct 30 15:32:03 2002 State-Changed-Why: I don't think this is a bug. 11.0.7 states: 7 The names in a default argument expression (_dcl.fct.default_) are bound at the point of declaration, and access is checked at that point rather than at any points of use of the default argument expression. I don't see anything right away in the standard that for checking access to the names used in the default value has to happen inside the scope of the function that uses them, but common reasoning would suggest that the enclosing scope is used, in which case the befriended function is not taken into account. I'll put this report into feedback mode. Please let us know if you can follow my reasoning, or whether we shall reopen the report. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7522