This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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 pre-/post- in-/decrement


>>>>> "Ken" == Ken Werner <ken@linux.vnet.ibm.com> writes:

Ken> I overlooked that in case of C++ the various assignment,
Ken> pre-increment and pre-decrement operators return lvalues while they
Ken> return non-lvalues for C.

I still had this patch in my queue, but I wasn't sure if it was
obsoleted by something else...

While I don't really mind having language checks in the expression
evaluator, it seems like this particular error condition is something
that could be detected in the C parser.

Also, I think the C++ rule is more complicated.  I did not look through
the standard to find it, but g++ at least gives an error for a simple
scalar "x++ = 5".

Tom


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