[PATCHv2] S390: Fix build failure in test string/tst-endian.c with gcc 6.

Mike Frysinger vapier@gentoo.org
Thu Jan 21 16:44:00 GMT 2016


On 21 Jan 2016 17:38, Stefan Liebler wrote:
> This patch suppresses these warnings with DIAG_* macros.
> The conditional #if __GNUC_PREREQ (6, 0) is needed, because an older gcc 
> would warn about:
> tst-endian.c: In function ‘do_test’:
> tst-endian.c:18:4: warning: unknown option after ‘#pragma GCC 
> diagnostic’ kind [-Wpragmas]
>      DIAG_IGNORE_NEEDS_COMMENT (6, "-Wtautological-compare");
>      ^

you can at least do it once at the top via a local define:
/* big comment block */
#if __GNUC_PREREQ (6, 0)
# define DIAG_IGNORE_NEEDS_COMMENT_AUTOLOGICAL_COMPARE() \
  DIAG_IGNORE_NEEDS_COMMENT (6, "-Wtautological-compare");
#else
# define DIAG_IGNORE_NEEDS_COMMENT_AUTOLOGICAL_COMPARE()
#endif

then the inline usage is simple
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20160121/e0529b76/attachment.sig>


More information about the Libc-alpha mailing list