On Fri, Jun 07, 2024 at 04:24:28PM +0100, Al Viro wrote: > > >> fs/select.c:860:3: error: cannot jump from this goto statement to its label > > 860 | goto out; > > | ^ > > fs/select.c:862:12: note: jump bypasses initialization of variable with __attribute__((cleanup)) > > 862 | CLASS(fd, f)(fd); > > | ^ > > 13 warnings and 1 error generated. > > Sigh... That's why declarations in the middle of block really stink. > Sadly, the use of CLASS() very much invites that kind of crap. > For this series I decided to suppress the gag reflex and see how > it goes, but... ouch. > > Worse, neither current gcc, nor clang 14 catch that kind of crap ;-/ Hmmm, I am able to reproduce this with clang 14.0.6 from kernel.org [1] with x86_64 allnoconfig: $ make -skj"$(nproc)" ARCH=x86_64 LLVM=1 allnoconfig fs/select.o fs/select.c:860:3: error: cannot jump from this goto statement to its label goto out; ^ fs/select.c:862:12: note: jump bypasses initialization of variable with __attribute__((cleanup)) CLASS(fd, f)(fd); ^ 1 error generated. $ clang --version | head -1 ClangBuiltLinux clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1) It is a bug that GCC does not warn about this as far as I understand it: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91951 [1]: https://mirrors.edge.kernel.org/pub/tools/llvm/ Cheers, Nathan