view build-aux/gcc-warning.spec @ 17366:9855b352e525

regex: port to mingw's recent addition of undeclared alarm On mingw (at least, when cross-compiling with Fedora 18's mingw32-headers-2.0.999-0.15.trunk.20121110.fc18.noarch build), compilation of test-regex fails: test-regex.c: In function 'main': test-regex.c:42:11: error: 'SIGALRM' undeclared (first use in this function) test-regex.c:42:11: note: each undeclared identifier is reported only once for each function it appears in test-regex.c:43:3: warning: implicit declaration of function 'alarm' It turns out that recent mingw64 added an export of alarm() and SIGALRM, but guarded their declarations behind __USE_MINGW_ALARM (default off, and with alarm() only in the non-standard <io.h>); so the m4 tests were setting HAVE_ALARM to 1 based on link success but then failing to compile. * doc/posix-functions/alarm.texi (alarm): Document that alarm exists but still doesn't work in newer mingw. * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Check for alarm declaration, not existence. Ensure SIGALRM is not trapped. * m4/mktime.m4 (gl_FUNC_MKTIME): Likewise. * m4/regex.m4 (gl_REGEX): Likewise. * m4/remainderf.m4 (gl_FUNC_REMAINDERF_WORKS): Likewise. * tests/test-regex.c (main): Use correct probe for alarm. Signed-off-by: Eric Blake <eblake@redhat.com>
author Eric Blake <eblake@redhat.com>
date Mon, 11 Mar 2013 14:51:33 -0600
parents 56a92ebec4a3
children
line wrap: on
line source

# options to filter out, and why
--all-warnings				alias for -Wall
--extra-warnings			alias for -Wextra
-Waggregate-return			obsolescent
-Waliasing				fortran
-Walign-commons				fortran
-Wampersand				fortran
-Warray-temporaries			fortran
-Wassign-intercept			objc/objc++
-Wc++-compat				FIXME maybe? borderline.  some will want this
-Wc++0x-compat				c++
-Wc++11-compat				c++
-Wc-binding-type			fortran
-Wc-binding-type                        fortran
-Wcast-qual				FIXME maybe? too much noise; encourages bad changes
-Wcharacter-truncation			fortran
-Wcompare-reals                         fortran
-Wconversion				FIXME maybe? too much noise; encourages bad changes
-Wconversion-extra			fortran
-Wconversion-null			c++ and objc++
-Wctor-dtor-privacy			c++
-Wdeclaration-after-statement		FIXME: do not want.  others may
-Wdeclaration-after-statement           obsolescent
-Wdelete-non-virtual-dtor		c++
-Weffc++				c++
-Werror-implicit-function-declaration	deprecated
-Wfloat-equal				FIXME maybe? borderline.  some will want this
-Wformat				covered by -Wformat=2
-Wformat=				gcc --help=warnings artifact
-Wfunction-elimination			fortran
-Wimplicit-interface			fortran
-Wimplicit-procedure			fortran
-Wintrinsic-shadow			fortran
-Wintrinsics-std			fortran
-Winvalid-offsetof			c++ and objc++
-Wlarger-than-				gcc --help=warnings artifact
-Wlarger-than=<number>			FIXME: choose something sane?
-Wline-truncation			fortran
-Wliteral-suffix			c++ and objc++
-Wliteral-suffix                        c++ and objc++
-Wlong-long				obsolescent
-Wnoexcept				c++
-Wnon-template-friend			c++
-Wnon-virtual-dtor			c++
-Wnormalized=<id|nfc|nfkc>		FIXME: choose something sane?
-Wold-style-cast			c++ and objc++
-Woverloaded-virtual			c++
-Wpadded				FIXME: dunno
-Wpadded                                FIXME maybe?  warns about "stabil" member in /usr/include/bits/timex.h
-Wpedantic				FIXME: too strict?
-Wpmf-conversions			c++ and objc++
-Wproperty-assign-default		objc++
-Wprotocol				objc++
-Wreal-q-constant			fortran
-Wrealloc-lhs				fortran
-Wrealloc-lhs                           fortran
-Wrealloc-lhs-all			fortran
-Wrealloc-lhs-all                       fortran
-Wredundant-decls			FIXME maybe? many _gl_cxxalias_dummy FPs
-Wreorder				c++ and objc++
-Wselector				objc and objc++
-Wsign-compare				FIXME maybe? borderline.  some will want this
-Wsign-conversion			FIXME maybe? borderline.  some will want this
-Wsign-promo				c++ and objc++
-Wstack-usage=				FIXME: choose something sane?
-Wstrict-aliasing=			FIXME: choose something sane?
-Wstrict-null-sentinel			c++ and objc++
-Wstrict-overflow=			FIXME: choose something sane?
-Wstrict-selector-match			objc and objc++
-Wsurprising				fortran
-Wswitch-enum				FIXME maybe? borderline.  some will want this
-Wsynth					deprecated
-Wtabs					fortran
-Wtarget-lifetime                       fortran
-Wtraditional				obsolescent
-Wtraditional-conversion		obsolescent
-Wundeclared-selector			objc and objc++
-Wundef					FIXME maybe? too many false positives
-Wunderflow				fortran
-Wunsuffixed-float-constants            triggers warning in gnulib's timespec.h
-Wunused-dummy-argument			fortran
-Wuseless-cast				c++ and objc++
-Wuseless-cast                          c++ and objc++
-Wzero-as-null-pointer-constant		c++ and objc++
-frequire-return-statement		go