On Wed, Jul 12, 2017 at 16:25:45 +0100, Alex Bennée wrote: > Emilio G. Cota <c...@braap.org> writes: (snip) > I think having the __attribute__ stuff is confusing. Why don't we just > do what the newer debug stuff does: > > modified accel/tcg/translate-all.c > @@ -66,6 +66,12 @@ > /* make various TB consistency checks */ > /* #define DEBUG_TB_CHECK */ > > +#if defined(DEBUG_TB_FLUSH) > +#define DEBUG_TB_FLUSH_GATE 1 > +#else > +#define DEBUG_TB_FLUSH_GATE 0 > +#endif (snip) > Which will a) ensure all the debug code is compiled even when not > enabled and b) the compiler won't bitch at you when it optimises stuff > away. > > Better?
Much better! The unused attribute was there to achieve this, but what you propose is much better. E.