This is the mail archive of the
mailing list for the GDB project.
Re: [patch] fix pre-/post- in-/decrement
>>>>> "Ken" == Ken Werner <firstname.lastname@example.org> 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".