aboutsummaryrefslogtreecommitdiff
path: root/tcctest.c
diff options
context:
space:
mode:
authorShinichiro Hamaji <shinichiro.hamaji _at_ gmail.com>2009-04-16 02:34:59 +0900
committergrischka <grischka>2009-04-18 15:08:01 +0200
commit83fd36333a691050663a15c07b385bdf554bf01d (patch)
tree062bf6d4eb06e488b05439ca2040a178b15d3a27 /tcctest.c
parentbe43c8e0ed22faa6c89c6e551f2a07512673d60d (diff)
downloadtinycc-83fd36333a691050663a15c07b385bdf554bf01d.tar.gz
tinycc-83fd36333a691050663a15c07b385bdf554bf01d.tar.bz2
Fixes for issues I've just found/introduced to x86 TCC.
- Cast from pointer to long long makes TCC output an error. Use cast to int before we apply shift operation for a pointer value. - Removed test cases for casts from pointer to char/short because they produce warning.
Diffstat (limited to 'tcctest.c')
-rw-r--r--tcctest.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tcctest.c b/tcctest.c
index 8ef322e..f8b3a35 100644
--- a/tcctest.c
+++ b/tcctest.c
@@ -1154,9 +1154,7 @@ void cast_test()
printf("sizeof(~(char)'a') = %d\n", sizeof(-(char)'a'));
/* from pointer to integer types */
- printf("%d %d %d %d %d %d %ld %ld %lld %lld\n",
- (char)p, (unsigned char)p,
- (short)p, (unsigned short)p,
+ printf("%d %d %ld %ld %lld %lld\n",
(int)p, (unsigned int)p,
(long)p, (unsigned long)p,
(long long)p, (unsigned long long)p);