This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR c++/23840
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Richard Guenther <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 01 Oct 2005 05:12:51 -0700
- Subject: Re: [PATCH] Fix PR c++/23840
- References: <Pine.LNX.4.58.0509141636360.7701@wotan.suse.de>
Richard Guenther wrote:
> This fixes the ICE and the rejects-valid by allowing taking the
> address of a VA_ARG_EXPR.
> PR c++/23840
> * typeck.c (build_unary_op): Taking address of VA_ARG_EXPR
> is ok.
I don't think that's correct. I can't find anything in either the C or
C++ standards that suggests that you can take the address of the result
of va_arg.
However, clearly, lvalue_p_1 should treat a VA_ARG_EXPR of class type as
an lvalue, when treat_class_rvalues_as_lvalues is true. I'll try that.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304