On 2 January 2016 at 12:39, Jonathan Wakely <jwakely.gcc@xxxxxxxxx> wrote: > On 1 January 2016 at 15:04, user user wrote: >> Hi ! help please >> if((result=f())==0) >> is Undefined behavior ? > > This question is not appropriate on this mailing list, because it's > not about GCC. Please find somewhere more appropriate for general C > programming questions, such as http://stackoverflow.com > > In general, no, it's not undefined behaviour (why would it be?). > However if f() modifies result (e.g. because it's a global variable) > then it is undefined. Gah, I confused myself, even if result is modified it's still not undefined, because the function returns before the assignment.