This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/7522: access by friend function's default argument
- From: bangerth at dealii dot org
- To: cludwig at cdc dot informatik dot tu-darmstadt dot de, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- Date: 30 Oct 2002 23:32:04 -0000
- Subject: Re: c++/7522: access by friend function's default argument
- Reply-to: bangerth at dealii dot org, cludwig at cdc dot informatik dot tu-darmstadt dot de, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
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