------- Additional Comments From joseph at codesourcery dot com 2005-09-22 17:24 ------- Subject: Re: New: Missing "operation on xxx may be undefined" on obvious undefined code
On Thu, 22 Sep 2005, pinskia at gcc dot gnu dot org wrote: > Take the following example: > void f(int *a) > { > *a++ = __extension__ ({ int bb = *a; bb; }); > } I'm not convinced this is undefined: statement expressions act like (inline) function calls for the purpose of sequence point rules so the execution of the statement expression suspends the execution of the rest of the surrounding expression and there are sequence points at the beginning and end of the statement expression. It is, however, at least unspecified order of evaluation and a warning here would still make sense. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24016