Is (a = b ) = k undefined behavior if a,b and k are of int type and properly initialised?
thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Looks UB to me.
ais getting modified more than once b/w two sequence points.The result of
(a=b)is an lvalue1 which is a reference toa1 The result of the
assignment operation is the value stored in the left operand after the assignment has taken place; the result
is an lvalue ($5.17/1).