4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-19 12:59:21 +08:00
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
..
2020-05-30 19:41:18 +02:00
2020-05-26 10:22:41 +02:00
2016-06-25 00:43:01 +02:00
2019-10-23 10:05:42 +02:00
2019-10-23 10:05:42 +02:00
2018-02-20 17:59:53 +01:00
2017-03-27 22:03:58 +01:00
2015-08-17 11:05:43 +02:00
2018-04-16 22:46:11 -05:00
2018-02-07 13:07:44 +01:00
2019-06-25 15:44:43 -04:00
2019-06-25 15:44:43 -04:00
2019-07-19 14:14:33 -04:00
2020-07-01 20:30:52 +02:00