On Sun, May 25, 2014 at 03:55:38PM -0700, John wrote: > I ran across this puzzling difference between gcc and llvm today and think > the specification to produce consistent output for this code should be worked > out. > http://stackoverflow.com/questions/15929795/llvm-and-gcc-different-output-same-code/23856132#23856132
In what way you misunderstand ISO C99, 6.5.2.2/10: "The order of evaluation of the function designator, the actual arguments, and subexpressions within the actual arguments is unspecified, but there is a sequence point before the actual call." Both compilers give sensible output for the bad testcase. Please follow on (if at all needed) to gcc-help mailing list, this has nothing to do with GCC development. Jakub