Apply attribute returns_nonnull in libiberty

Marc Glisse marc.glisse@inria.fr
Fri Oct 11 18:25:00 GMT 2013


On Fri, 11 Oct 2013, David Malcolm wrote:

> On Fri, 2013-10-11 at 19:53 +0200, Marc Glisse wrote:
>> With the patch now...
>
> [...]
>
>> -extern char *concat_copy (char *, const char *, ...) ATTRIBUTE_SENTINEL;
>> +extern char *concat_copy (char *, const char *, ...) ATTRIBUTE_SENTINEL ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURNS_NONNULL;
>
> An aesthetic idea: should the attributes be ordered to reflect the order
> that the related entities appear in the declaration?  Return types
> appear before parameters in declarations, and thus perhaps the
> attributes describing them should also.

I have no opinion about it, I'll do whatever reviewers tell me.

> This would make the above look like this (introducing a newline to avoid
> overlong lines):

I didn't introduce new lines because there were already many overlong 
lines in this file, but I can wrap those as well if needed.

-- 
Marc Glisse



More information about the Gcc-patches mailing list