Paul Eggert wrote:
> The declarations should be marked. For example, the declaration of argmatch
> should be marked with _GL_ATTRIBUTE_PURE (or _GL_PURE) in argmatch.h.
Yes. Good point.
Jim, in the current idioms with macros from c++defs.h the attribute needs to
be added in the _GL_FUNCDECL_RPL
One other thing, and this is more important. The declarations
should be marked. For example, the declaration of argmatch
should be marked with _GL_ATTRIBUTE_PURE (or _GL_PURE)
in argmatch.h. We mark functions partly so that callers
can be optimized better, but typically this works for
other comp
Paul Eggert wrote:
> > +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
>
> The names _GL_ATTRIBUTE_PURE and _GL_ATTRIBUTE_CONST seem
> gratingly long to me; when reading a function signature they
> get in the way of other important information.
> ...
> renaming them to _GL_PURE and _GL_CON
Paul Eggert wrote:
> On 05/01/11 06:31, Jim Meyering wrote:
>> +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
>
> The names _GL_ATTRIBUTE_PURE and _GL_ATTRIBUTE_CONST seem
> gratingly long to me; when reading a function signature they
> get in the way of other important information. Also,
On 05/01/11 06:31, Jim Meyering wrote:
> +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
The names _GL_ATTRIBUTE_PURE and _GL_ATTRIBUTE_CONST seem
gratingly long to me; when reading a function signature they
get in the way of other important information. Also, these
two names use a differ
Here's a better pair of patches.
The first one makes gnulib-common.m4 emit definitions of these
two _GL_ATTRIBUTE_... macros.
The second addresses all of the warnings in gnulib code induced
by building coreutils with CFLAGS='-O3 -Wsuggest-attribute=const
-Wsuggest-attribute=pure -Wsuggest-attribut