On Mon, May 11, 2020 at 11:12 AM Linus Torvalds <torva...@linux-foundation.org> wrote: > > Would using "__builtin_choose_expr()" be able to avoid this whole issue?
We actually have a fair amount of "pick expression based on size", so with a few helper macros we could make the code look better than the case statements too. Something (ENTIRELY UNTESTED!) like the attached patch, perhaps? NOTE! I only converted one single use to that "pick_size_xyz()" model. If this actually works for clang too, we could do the others. I guess I should just test it, since I have that clang tree. Linus
patch
Description: Binary data