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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|DUPLICATE                   |---

--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
This is not a duplicate of pr101374.  Constant addresses are often the result
of null pointer arithmetic and not considered valid (point to an object of zero
size).  When they're deliberate the code needs to suppress the warning somehow.
 It can be done via #pragma GCC diagnostic or by making the pointer variable
volatile (or otherwise obscuring its constness).

Reply via email to