https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91127

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2019-07-10
                 CC|                            |msebor at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I hate hate hate the fact that the nonnull attribute counts implicit arguments.
The 'this' pointer must always be nonnull, so there's no benefit to including
it, and other implicit arguments (like the int here for an in-charge
constructor?) just complicate things and require users to understand details of
a leaky abstraction.

This bug should just be fixed to ignore the int, but counting the 'this'
pointer can't be fixed without introducing a new attribute with sensible
behaviour for member functions and constructors.

</rant>

I'll let Martin comment on whether changing handle_nonnull_attribute from
giving an error to a warning was intended.

Reply via email to