On 4/30/20 6:37 AM, Marc Nieper-Wißkirchen wrote:
> P.S.: It would also be helpful so that warnings coming from
> "-Wsuggest-attribute=pure" can be handled for the GCC without
> affecting other compilers.

So, something like the attached file for modules/attribute-gcc? You can put
ATTRIBUTE_PURE in the declaration for a function, and for non-GCC compilers it
expands to nothing.
Description:
The __attribute__ keyword of GNU C

Files:

Depends-on:

configure.ac:
AH_VERBATIM([
/* These expand to the corresponding GCC attribute, or to nothing.  */

#define ATTRIBUTE_CONST _GL_ATTRIBUTE_CONST
#define ATTRIBUTE_MALLOC _GL_ATTRIBUTE_MALLOC
#define ATTRIBUTE_PURE _GL_ATTRIBUTE_PURE
#define ATTRIBUTE_UNUSED _GL_UNUSED
])

Makefile.am:

Include:

License:
LGPLv2+

Maintainer:
all

Reply via email to