On Thu, Oct 8, 2015 at 3:11 AM, Nicolas George <geo...@nsup.org> wrote: > Le sextidi 16 vendémiaire, an CCXXIV, Ganesh Ajjanagadde a écrit : >> Anyway, it seems to me that for whatever reason short circuit >> evaluation is not respected by the GCC preprocessor (I lack the energy >> or interest to investigate why, it seems ridiculous to me): >> https://bugs.webkit.org/show_bug.cgi?id=133785 > > Do not believe everything you read from apple developers, this statement is > completely wrong. > > Short-circuit evaluation works with the preprocessor, you can check with > this for example: > > #if defined(x) && x > > What does not work is a malformed expression: > > #if defined(x) && x(42) > > ... because x(42), if x is not defined, expands to 0(42), which is not > syntactically valid as an expression.
Thanks for the clarification. I was still expecting slightly more from the preprocessor - I assumed if x is not defined, it does not even bother parsing the remainder of the line, and this was the sense of short circuit evaluation that I expected. Thinking it over, there are other reasons why it might want a valid expression throughout the line. > > Regards, > > -- > Nicolas George > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel