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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> ---
Yes, but you still haven't explained why you think it's invalid.

The warning is by design as documented in the manual

Wmaybe-uninitialized
    ...
    In addition, passing a pointer (or in C++, a reference) to an uninitialized
object to a const-qualified function argument is also diagnosed by this
warning. (-Wuninitialized is issued for built-in functions known to read the
object.) Annotating the function with attribute access (none) indicates that
the argument isn’t used to access the object and avoids the warning (see Common
Function Attributes).

Reply via email to