<div dir="ltr"><div dir="ltr">Hi,<div><br></div><div>I'm trying to enable -Wextra-semi in Chromium. I'm almost there; the last remaining issue is that we have a macro THREAD_CHECKER(name) that expands to nothing in release builds but to `ThreadChecker name` in debug builds. It's supposed to be used like</div><div><br></div><div>class C {</div><div>  THREAD_CHECKER(checker_);</div><div>};</div><div><br></div><div>And then in the implementation, you do CHECK_CALLED_ON_VALID_THREAD(checker_); which again does nothing in release builds but calls a method on checker_ in debug builds.</div><div><br></div><div>Since this is a declaration, this triggers -Wextra-semi. I figured the way to spell the usual `do {} while (0)` you tag on the end of a statement macro to silence this warning could be `static_assert(1, "")`, so I changed THREAD_CHECKER() to expand to that in release builds instead of nothing.</div><div><br></div><div>This works beautifully, but Objective-C interfaces don't support static_assert()s as I have learned. So I'd like to add support for that.</div><div><br>Before I start writing a patch for that: Are people fine with supporting static_assert in the member list of an @interface or @implementation in Obj-C? It not being supported seems like an oversight to me, but maybe I'm missing something – so I figured I'd ask before I start writing a patch :)</div><div><br></div><div>Nico</div></div></div>