newlib-cygwin/winsup/cygwin/libc
Corinna Vinschen 50ad198085 Cygwin: Add 'fallthrough' pseudo keyword for switch/case use
This patch has been inspired by the Linux kernel patch

  294f69e662d1 compiler_attributes.h: Add 'fallthrough' pseudo keyword for switch/case use

written by Joe Perches <joe AT perches DOT com> based on an idea from
Dan Carpenter <dan DOT carpenter AT oracle DOT com>.  The following text
is from the original log message:

Reserve the pseudo keyword 'fallthrough' for the ability to convert the
various case block /* fallthrough */ style comments to appear to be an
actual reserved word with the same gcc case block missing fallthrough
warning capability.

All switch/case blocks now should end in one of:

	break;
	fallthrough;
	goto <label>;
	return [expression];
	continue;

In C mode, GCC supports the __fallthrough__ attribute since 7.1,
the same time the warning and the comment parsing were introduced.

Cygwin-only: add an explicit -Wimplicit-fallthrough=5 to the build
flags.
2020-08-05 21:58:22 +02:00
..
arc4random_stir.c Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
base64.c Cygwin: Add 'fallthrough' pseudo keyword for switch/case use 2020-08-05 21:58:22 +02:00
bsdlib.cc login_tty: Rewrite following FreeBSD's traces 2016-11-24 12:06:29 +01:00
fnmatch.c Cygwin: Add 'fallthrough' pseudo keyword for switch/case use 2020-08-05 21:58:22 +02:00
fts.c * libc/bsdlib.cc (forkpty): Close master and slave if fork fails to 2014-05-22 09:45:17 +00:00
ftw.c Cygwin: Add 'fallthrough' pseudo keyword for switch/case use 2020-08-05 21:58:22 +02:00
getentropy.cc getrandom: it's MIN, not MAX 2017-03-11 10:03:29 +01:00
getopt.c Cygwin: fix formatting: drop spaces leading tabs 2020-03-11 13:45:58 +01:00
inet_addr.c Throughout Cygwin, use u_intN_t or uintN_t 2016-03-24 16:39:15 +01:00
inet_network.c * Merge in cygwin-64bit-branch. 2013-04-23 09:44:36 +00:00
minires-os-if.c Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
minires.c Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
minires.h Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
msgcat.c Cygwin: Add 'fallthrough' pseudo keyword for switch/case use 2020-08-05 21:58:22 +02:00
nftw.c Cygwin: Add 'fallthrough' pseudo keyword for switch/case use 2020-08-05 21:58:22 +02:00
rcmd.cc Cygwin: fix formatting: drop spaces leading tabs 2020-03-11 13:45:58 +01:00
rexec.cc Cygwin: Add 'fallthrough' pseudo keyword for switch/case use 2020-08-05 21:58:22 +02:00
strfmon.c Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
strptime.cc Cygwin: Add 'fallthrough' pseudo keyword for switch/case use 2020-08-05 21:58:22 +02:00
xsique.cc Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00