On 5/10/20 1:24 PM, Bruno Haible wrote:
> I view ATTRIBUTE_PURE, ATTRIBUTE_CONST as mainly an optimization hint. They
> produce diagnostics only if the attribute has been misplaced, or you can let
> the compiler suggest to you where these attribute would make sense. But what
> would be the diagnos
Hi Paul,
> ATTRIBUTE_NONNULL is not merely about compiler diagnostics; it's also
> about optimization. Similarly for ATTRIBUTE_RETURNS_NONNULL (which I think was
> primarily motivated by optimization).
OK, let me tweak the comment (patch below).
> Conversely, ATTRIBUTE_PURE,
> ATTRIBUTE_CONST an
On 5/10/20 10:20 AM, Bruno Haible wrote:
> Let me try to reinstante the answer to 1. "Why, when", by grouping the macros
> according to their use-case.
Sure, that's OK. Some quibbles, though.
The distinction between compiler diagnostics and the other sections is somewhat
confusing. ATTRIBUTE_NON
Hi Paul,
> I went through
> the comments and tweaked them in a way that I hope makes them even clearer.
In doing so, unfortunately, in several places you removed the first sentence,
which answered the question "What is its use-case?".
Generally, it's a good guideline to structure the technical d