aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/constant-suffix-32.c
diff options
Diffstat (limited to 'validation/constant-suffix-32.c')
-rw-r--r--validation/constant-suffix-32.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/validation/constant-suffix-32.c b/validation/constant-suffix-32.c
new file mode 100644
index 00000000..dc063a07
--- /dev/null
+++ b/validation/constant-suffix-32.c
@@ -0,0 +1,15 @@
+#define BIGU 0xfffff00000000000U
+#define BIGULL 0xfffff00000000000ULL
+
+static unsigned long long a = BIGU;
+static unsigned long long b = BIGULL;
+
+/*
+ * check-name: constant-suffix
+ * check-command: sparse -m32 -Wconstant-suffix $file
+ *
+ * check-error-start
+constant-suffix-32.c:4:31: warning: constant 0xfffff00000000000U is so big it is unsigned long long
+ * check-error-end
+ */
+