diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2015-06-30 14:48:17 +0200 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 2015-06-30 14:48:17 +0200 |
commit | bdbf444704c031a37039d4aeb2f19d05550afbd6 (patch) | |
tree | ec101477946f1be805aa0e200bb5b7d82a45b1f3 /test/regression/ptrs3.c | |
parent | ff62587774f6ca437c887cc3ff5d079895c5e214 (diff) | |
download | compcert-bdbf444704c031a37039d4aeb2f19d05550afbd6.tar.gz compcert-bdbf444704c031a37039d4aeb2f19d05550afbd6.zip |
Signedness issue in specification of subtraction between two pointers.
Diffstat (limited to 'test/regression/ptrs3.c')
-rw-r--r-- | test/regression/ptrs3.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/regression/ptrs3.c b/test/regression/ptrs3.c new file mode 100644 index 00000000..e0425af4 --- /dev/null +++ b/test/regression/ptrs3.c @@ -0,0 +1,10 @@ +#include <stdio.h> + +int main() { + int a[10]; + int *p = &a[0]; + int *q = &a[9]; + printf("p - q = %d\n", (int)(p - q)); + printf("q - p = %d\n", (int)(q - p)); + return 0; +} |