Le dimanche 6 janvier 2013 11:28:39, Didier Barvaux a écrit : > > === Build of TCC GIT with Clang 3.2 === > > Build OK (with some warnings, I can provide them to you if you want). >
[SNIP]
>
>
> With the 'return' statement removed from the cmp_comparison_test()
> function, tests seem to be still KO. Example with 'test1':
>
> ------------ test1 ------------
> ../tcc -B.. -DTCC_TARGET_I386 -run tcctest.c > test.out1
> --- test.ref 2013-01-06 10:59:06.000000000 +0100
> +++ test.out1 2013-01-06 10:59:06.000000000 +0100
> @@ -299,7 +299,7 @@
> sizeof(+(char)'a') = 4
> sizeof(-(char)'a') = 4
> sizeof(~(char)'a') = 4
> --66 -66 -66 -66 4294967230 4294967230
> +-66 -66 -66 -66 -66 -66
> 0x1 0xf0f0 (nil) 0xfffffff0
> bitfield_test:sizeof(st1) = 8
> 3 -1 15 -8 121
>
> I can do other tests and/or try patches to fix that problem if you want.
Interesting. I misread that first but the line with -- is the output of clang.
It seems clang and gcc disagree:
$ cat long_long.c
#include <stdio.h>
int main(void)
{
char *p = NULL;
p -= 0x700000000042;
/* from pointer to integer types */
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);
return 0;
}
$ gcc -o long_long long_long.c && ./long_long
[SNIP gcc warnings]
-66 -66 -66 -66 -66 -66
$ clang -o long_long long_long.c && ./long_long
-66 -66 -66 -66 4294967230 4294967230
So at least tcc is consistent to gcc. I'm not sure what the correct value (if
any) should be though.
Best regards,
Thomas Preud'homme
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
