diff --git a/gcc/cp/cvt.cc b/gcc/cp/cvt.cc
index db086c017e8..ebff6db2ea9 100644
--- a/gcc/cp/cvt.cc
+++ b/gcc/cp/cvt.cc
@@ -1664,6 +1664,7 @@ convert_to_void (tree expr, impl_conv_void implicit, tsubst_flags_t complain)
 	      if (tclass == tcc_comparison
 		  || tclass == tcc_unary
 		  || tclass == tcc_binary
+		  || code == TRUTH_NOT_EXPR
 		  || code == VEC_PERM_EXPR
 		  || code == VEC_COND_EXPR)
 		warn_if_unused_value (e, loc);
diff --git a/gcc/testsuite/g++.dg/warn/Wunused-20.C b/gcc/testsuite/g++.dg/warn/Wunused-20.C
new file mode 100644
index 00000000000..6d7838fab13
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wunused-20.C
@@ -0,0 +1,17 @@
+// PR c++/114104
+// { dg-additional-options "-Wunused-value" }
+
+bool f();
+
+void g() {
+  !f(); // { dg-warning "value computed is not used" }
+}
+
+#if  __cplusplus >= 202002L
+struct A { };
+[[nodiscard]] bool operator==(A, int);
+
+void g(A a) {
+  a != 0; // { dg-warning "value computed is not used" "" { target c++20 } }
+}
+#endif
