Mercurial > hg > octave-nkf > gnulib-hg
changeset 17689:0fc09785fa2f
gnulib-common.m4: add _GL_UNUSED_LABEL
* m4/gnulib-common.m4: Add _GL_UNUSED_LABEL which is similar to
_GL_UNUSED, but handles g++ < 4.5 not supporting this syntax.
author | Pádraig Brady <P@draigBrady.com> |
---|---|
date | Sun, 01 Jun 2014 22:25:28 +0100 |
parents | 0d3cc0db9cb7 |
children | daca962ab9c1 |
files | ChangeLog m4/gnulib-common.m4 |
diffstat | 2 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2014-06-01 Pádraig Brady <P@draigBrady.com> + + gnulib-common.m4: add _GL_UNUSED_LABEL + * m4/gnulib-common.m4: Add _GL_UNUSED_LABEL which is similar to + _GL_UNUSED, but handles g++ < 4.5 not supporting this syntax. + 2014-05-31 Paul Eggert <eggert@cs.ucla.edu> dup2, fcntl, fcntl-h: port to AIX 7.1
--- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 @@ -49,6 +49,15 @@ is a misnomer outside of parameter lists. */ #define _UNUSED_PARAMETER_ _GL_UNUSED +/* gcc supports the "unused" attribute on possibly unused labels, and + g++ has since version 4.5. */ +#if !defined __cplusplus || __GNUC__ > 4 \ + || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) +# define _GL_UNUSED_LABEL _GL_UNUSED; +#else +# define _GL_UNUSED_LABEL +#endif + /* The __pure__ attribute was added in gcc 2.96. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))