https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103848
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P2 |P3
Target Milestone|11.0 |11.3
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This is not a bug.
Firstly, there's no testcase provided (as https://gcc.gnu.org/bugs says is
needed). Here's the missing testcase:
#include <deque>
std::deque<int> d;
auto n = d.begin() - d.begin();
Secondly, the command to reproduce the error is not provided, as the link also
says is needed. This "error" only happens with
-Werror=zero-as-null-pointer-constant -Wsystem-headers, so don't do that. This
is not even a warning unless you explicitly ask for it (it's not in -Wall or
-Wextra) and if you choose to make it an error, that's your fault.
We can't nullptr because the code needs to compile as C++98. We could use NULL
or __null, or Jakub suggested just _Map_pointer. I find all of those inferior
to 0 but I suppose we can change it.