On Do, 2015-08-06 at 20:28 +0200, Kővágó, Zoltán wrote: > Currently the gcc specific version only evaluates the arguments once, > while the generic version evaluates one argument twice, which can cause > debugging headaches when an argument has a side effect.
The answer to that is "don't do that". Do we have macro calls with side effects in the tree? > This patch at least provides consistent behavior between compilers. Makes sense. > -#else > #define audio_MIN(a, b) ((a)>(b)?(b):(a)) > #define audio_MAX(a, b) ((a)<(b)?(b):(a)) > -#endif include/qemu/osdep.h already provides MIN/MAX macros. I think we should either define audio_MIN (and audio_MAX) to those, or simply do s/audio_MIN/MIN/ in audio/*.c cheers, Gerd