On 2017-11-30 01:16 PM, Eric Engestrom wrote: > Commit f0ba7d897d1c22202531a added this code to expose asserts to the > compiler in an attempt to hide 'unused variable' warnings, incorrectly > claiming it was a no-op. This has two bad effects: > - any assert with side-effects are executed when they should be > disabled
The "0 &&" should prevent this. > - the whole content of the assert must be understandable by the > compiler, which isn't true if variable or members are correctly > guarded by NDEBUG Yes, not having to guard things by NDEBUG was a major point of doing it this way. :) -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev