[PATCH] D150875: Make dereferencing a void* a hard-error instead of warn-as-error

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 18 10:28:23 PDT 2023


rsmith added a comment.

In D150875#4353384 <https://reviews.llvm.org/D150875#4353384>, @erichkeane wrote:

> We are the only of the major compilers with this "extension" (I hesitate to call it that, as I'm not sure this FITS in the 'extension's permitted by standard)

I'm not objecting to removing this extension, but... do you have reason to doubt that it's conforming, or just a lack of confidence that it is? (If the `SFINAEFailure` change wasn't enough, then it's not clear to me why this change would be. We use a `SFINAEFailure` diagnostic for other extensions, and if that's not sufficient for conformance then we probably have a lot of conformance gaps of this kind.)



================
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:6985
+def err_typecheck_indirection_through_void_pointer_cpp
+    : Error<"ISO C++ does not allow indirection on operand of type %0">;
 def warn_indirection_through_null : Warning<
----------------
We normally only use this "ISO C++ does not allow" phrasing for extensions (with the implication being that ISO C++ doesn't allow it, but Clang does). Can you rephrase the diagnostic too, to remove those unnecessary words?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150875/new/

https://reviews.llvm.org/D150875



More information about the cfe-commits mailing list