This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++ extension "cast-as-lvalues": time to deprecate?
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Fergus Henderson <fjh at cs dot mu dot OZ dot AU>
- Cc: Giovanni Bajo <giovannibajo at libero dot it>, gcc at gcc dot gnu dot org
- Date: Fri, 9 May 2003 09:31:50 +0100 (BST)
- Subject: Re: C++ extension "cast-as-lvalues": time to deprecate?
- References: <3b6301c315bd$194a7c60$114e2697@bagio> <20030509040644.GA15534@ceres.cs.mu.oz.au>
On Fri, 9 May 2003, Fergus Henderson wrote:
> Are you suggesting just deprecating it just in C++, or also in C?
>
> I would prefer that it not be deprecated.
> The reason is that this is a useful extension in C
I would like it deprecated in C. There is an excessive amount of
complicated code in the C front end to implement this extension, it
creates lvalues whose address cannot be taken, and the description in the
manual indicates that everything that can be done with lvalue casts can be
done just by writing out the syntax the manual gives as an expansion of
lvalue casts (which you could even define as an lvalue_cast_assign macro
if you want to convert lots of code using them). Removing lvalue casts
would improve the compiler's maintainability.
--
Joseph S. Myers
jsm28@cam.ac.uk