[clang] [Clang] Suppress mismatch warning for same-size pointer/integer casts (PR #203955)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 24 08:38:47 PDT 2026


================
@@ -1057,6 +1057,12 @@ class TargetInfo : public TransferrableTargetInfo,
   /// idea to avoid optimizing based on that undef behavior.
   virtual bool isCLZForZeroUndef() const { return true; }
 
+  /// Returns whether pointers and integers of the same size are considered
+  /// ABI-compatible on this target. Defaults to true; targets with separate
+  /// register files for pointers and integers (e.g., m68k) should override
+  /// to return false.
+  virtual bool arePointersAndIntegersABICompatible() const { return true; }
----------------
AaronBallman wrote:

Have you done an analysis of the targets Clang supports to determine that only m68k is problematic?

https://github.com/llvm/llvm-project/pull/203955


More information about the cfe-commits mailing list