This is the mail archive of the gcc@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: C++ extension "cast-as-lvalues": time to deprecate?


> > But what, exactly, are we warning about?  Consider the following program:
> > [ example deleted, now is PR 10754] 
 
On Mon, May 12, 2003 at 09:41:50AM -0700, Mark Mitchell wrote:
> Oh, ugh, I didn't know we mishandled that.  That's just a bug; the only
> places we should be trying to support the cast-as-lvalue extension at this
> point are those places where GCC does: the left-hand side of an assignment
> statement.  It was there that I wanted to introduce the warning.
> 
> (Your example is a bug in G++ because we try to maintain the invariant that
> GNU extensions do not change the meaning of valid programs.  There are
> numerous places where that ideal is not achieved, but it is the ideal.)
 
It's now PR 10754.  Interestingly, although this is broken as far back as
2.95.2, 2.7.2.1 does the right thing so I guess we can call it a regression
if we really want to.


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