[clang] [clang] Fix crashes when initializing constexpr int* with floating-point (PR #180376)
Mariya Podchishchaeva via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 9 04:39:48 PST 2026
================
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 -std=c23 -fsyntax-only -verify %s
+
+// PR180313: Fix crashes when initializing constexpr int* with a floating-point value
+
+constexpr int *p = 0.0; // expected-error {{initializing 'int *const' with an expression of incompatible type 'double'}}
----------------
Fznamznon wrote:
Could you please just add the case to the existing `Sema/test/constexpr.c`?
https://github.com/llvm/llvm-project/pull/180376
More information about the cfe-commits
mailing list