aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/linear
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-08-15 10:09:24 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-06-23 07:46:40 +0200
commit756b6133e7f6605d86d0d74fd939991b11aeb1e4 (patch)
treebfd46e192f1a6091b4aa846f96022a377811bebd /validation/linear
parentc8fac68af94b9d23b64e844a283f16b9bed2f9e0 (diff)
downloadsparse-dev-756b6133e7f6605d86d0d74fd939991b11aeb1e4.tar.gz
cast: add support for -Wpointer-to-int-cast
It's relatively common to cast a pointer to an unsigned long, for example to make some bit operations. It's much less sensical to cast a pointer to an integer smaller (or bigger) than a pointer is. So, emit a diagnostic for this, under the control of a new warning flag: -Wpointer-to-int-cast. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/linear')
-rw-r--r--validation/linear/cast-kinds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/validation/linear/cast-kinds.c b/validation/linear/cast-kinds.c
index 6683ea93..fb16d335 100644
--- a/validation/linear/cast-kinds.c
+++ b/validation/linear/cast-kinds.c
@@ -55,7 +55,7 @@ static double double_2_double(double a) { return a; }
/*
* check-name: cast-kinds
- * check-command: test-linearize -Wno-int-to-pointer-cast -m64 $file
+ * check-command: test-linearize -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast -m64 $file
*
* check-output-start
uint_2_int: