[clang] [clang] Don't warn on zero literals with -std=c2y (PR #149688)
A. Jiang via cfe-commits
cfe-commits at lists.llvm.org
Sun Jul 20 07:40:26 PDT 2025
================
@@ -44,7 +44,9 @@ static const void *ptr = 0o0; /* ext-warning {{octal integer literals are a C2y
#endif
// 0 by itself is not deprecated, of course.
-int k = 0;
+int k1 = 0;
+long k2 = 0l;
+unsigned long long k3 = 0ull;
----------------
frederick-vs-ja wrote:
Let's check them all.
```suggestion
int k1 = 0;
unsigned int k2 = 0u;
long k3 = 0l;
unsigned long k4 = 0ul;
long long k5 = 0ll;
unsigned long long k6 = 0ull;
```
https://github.com/llvm/llvm-project/pull/149688
More information about the cfe-commits
mailing list