http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56373
--- Comment #2 from Akim Demaille <akim.demaille at gmail dot com> 2013-02-18 12:52:46 UTC --- Thanks a lot for the detailed answer. > The warning isn't issued when 0 converts to std::nullptr_t, only when it > converts to a pointer type. And shouldn't it? >> It's also a bit sad that only d is diagnosed as useless, although I do >> understand that the shared_ptr has a constructor and a destructor that use >> it. > It's necessary, because otherwise you get bogus warnings from ScopeGuard-style > RAII types. In which case the constructor and destructor would be meaningful, which is not the case here. But again, thanks for explaining!