Commit Graph

5 Commits

Author SHA1 Message Date
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
Corinna Vinschen 61522196c7 * Merge in cygwin-64bit-branch. 2013-04-23 09:44:36 +00:00
Corinna Vinschen bebb25961c * libc/ftw.cc (ftw): Allow nfds < 0 for glibc compatibility.
* libc/nftw.c (nftw): Ditto.
2008-02-10 15:19:08 +00:00
Corinna Vinschen a8b939adc7 * ftw.c: Include winsup.h.
* nftw.c: Ditto.
	* include/ftw.h: Guard declarations appropriately.
2005-08-08 13:39:56 +00:00
Corinna Vinschen e6ae6cd338 * Makefile.in (DLL_OFILES): Add fts.o, ftw.o, nftw.o.
* cygwin.din: Export fts_children, fts_close, fts_get_clientptr,
	fts_get_stream, fts_open, fts_read, fts_set, fts_set_clientptr,
	ftw, nftw.
	* fts.c: New file, imported from FreeBSD.
	* ftw.c: Ditto.
	* nftw.c: Ditto.
	* include/fts.h: Ditto.
	* include/ftw.h: Ditto.
	* include/cygwin/version.h: Bump API minor number.
2005-08-08 09:45:42 +00:00