------- Comment #5 from mmitchel at gcc dot gnu dot org  2008-11-05 18:28 
-------
The problem is this:

* We cannot do the full conversion at the point of parsing the default argument
because that may require creation of temporary variables and such.  So, in
check_default_arg we call can_convert.  But, whether a conversion is possible
or not does not check access because the standard says that access control has
no affect on conversion.

* Later, in covert_default_arg, we do the actual conversion, which triggers an
access-control check.

For default arguments, we need to perform the check in the first case, but not
the second.  So, we will need an additional flag to the conversion routines to
indicate that.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37971

Reply via email to