At least with recent Clang trunk towards 6.0: > $ cat test.cc > struct B {}; > struct Ref { Ref(B *); }; > struct D: B { operator Ref() { return this; } }; > void f() { Ref(*new D); } > > $ clang++ -std=c++14 -fsyntax-only test.cc > > $ clang++ -std=c++17 -fsyntax-only test.cc > test.cc:4:12: warning: expression result unused [-Wunused-value] > void f() { Ref(*new D); } > ^ ~~~~~~ > 1 warning generated.