Re: pure64 & -ftrapv

2005-01-19 Thread Adam Warner
[As a followup to Kaare who demonstrated via email that `I think we safely can assume that "-ftrapv" might not be our most reliable tool right now...'] Here's one example of how overflow can be detected via x86-32/64 inline assembly: Regards, A

Re: pure64 & -ftrapv

2005-01-17 Thread Adam Warner
On Mon, 17 Jan 2005 19: 26:51 +0100, Kurt Roeckx wrote: Hi Kurt Roeckx, On Mon, 17 Jan 2005 19:26:51 +0100, Kurt Roeckx wrote: > On Mon, Jan 17, 2005 at 07:37:37PM +1300, Adam Warner wrote: >> Hi all, >> >> I'm enjoying Debian pure64. It's astonishing how many applications have >> been correctly

Re: pure64 & -ftrapv

2005-01-17 Thread Kurt Roeckx
On Mon, Jan 17, 2005 at 07:37:37PM +1300, Adam Warner wrote: > Hi all, > > I'm enjoying Debian pure64. It's astonishing how many applications have > been correctly ported. Many thanks for all the fantastic work! > > #include > #include > > int32_t a=0x7FFF; > > int main(void) { > printf

Re: pure64 & -ftrapv

2005-01-17 Thread Adam Warner
On Mon, 17 Jan 2005 19: 37:37 +1300, Adam Warner wrote: On Mon, 17 Jan 2005 19:37:37 +1300, Adam Warner wrote: > I note that the outcome of signed integer overflow is already undefined > in portable C (as well as pointer arithmetic between different objects). xx

pure64 & -ftrapv

2005-01-16 Thread Adam Warner
Hi all, I'm enjoying Debian pure64. It's astonishing how many applications have been correctly ported. Many thanks for all the fantastic work! #include #include int32_t a=0x7FFF; int main(void) { printf("a+1=%i\n", a+1); return 0; } The above code compiled with gcc-3.3, gcc-3.4 and g