This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR c++/23840


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]