Re: [viro-vfs:work.fd 11/19] fs/select.c:860:3: error: cannot jump from this goto statement to its label

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 07, 2024 at 01:20:10PM -0700, Nathan Chancellor wrote:
> 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

Mea culpa - messed up make arguments ;-/




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux