lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 17 Jun 2019 16:41:18 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Joe Perches' <joe@...ches.com>, Pavel Machek <pavel@....cz>,
        "Shawn Landden" <shawn@....icu>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Gustavo A . R . Silva" <gustavo@...eddedor.com>,
        Andy Whitcroft <apw@...onical.com>
Subject: RE: [PATCH] Use fall-through attribute rather than magic comments

From: Joe Perches
> Sent: 17 June 2019 17:26
> On Mon, 2019-06-17 at 17:56 +0200, Pavel Machek wrote:
> > Hi!
> >
> > > +/*
> > > + *   gcc: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-fallthrough
> > > + *   gcc: https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/
> > > + */
> > > +#if __has_attribute(__fallthrough__)
> > > +# define __fallthrough                    __attribute__((__fallthrough__))
> > > +#else
> > > +# define __fallthrough
> > > +#endif

Should the trailing ; be added to the above?
I think the above would require:
	case foo:
		bar();
		__fallthrough;
	case baz:

When commented out that leaves a completely empty statement (adjacent ;)
I'm sure some compilers complain about those as well.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ