Re: atoi error
In <cgcv6r$fdk$1@p c-news.cogsci.ed. ac.uk> richard@cogsci. ed.ac.uk (Richard Tobin) writes:
[color=blue]
>In article <cgcso4$n4p$1@s unnews.cern.ch> , Dan Pop <Dan.Pop@cern.c h> wrote:
>[color=green]
>>There is little point in speculating about the actual effects of signed
>>arithmetic overflow or about the possible tests the implementor may
>>have used in order to avoid it hapenning.[/color]
>
>This is, supposedly, someone having problems with a real program. If
>the result he gets is not one plausibly caused by overflow, then he
>may have another error, and to ignore it would be unwise.[/color]
How do you know overflow actually did happen?
[color=blue]
>The fact that nature of undefined behaviour is often quite predictable
>is of great value in debugging.[/color]
Indeed, if you have access to the actual code and know the exact effect
of that particular instance of undefined behaviour on that particular
platform. Which is not the case here. Without seeing the actual atoi
code, there is no way to predict the result of the code in question.
Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Dan.Pop@ifh.de
In <cgcv6r$fdk$1@p c-news.cogsci.ed. ac.uk> richard@cogsci. ed.ac.uk (Richard Tobin) writes:
[color=blue]
>In article <cgcso4$n4p$1@s unnews.cern.ch> , Dan Pop <Dan.Pop@cern.c h> wrote:
>[color=green]
>>There is little point in speculating about the actual effects of signed
>>arithmetic overflow or about the possible tests the implementor may
>>have used in order to avoid it hapenning.[/color]
>
>This is, supposedly, someone having problems with a real program. If
>the result he gets is not one plausibly caused by overflow, then he
>may have another error, and to ignore it would be unwise.[/color]
How do you know overflow actually did happen?
[color=blue]
>The fact that nature of undefined behaviour is often quite predictable
>is of great value in debugging.[/color]
Indeed, if you have access to the actual code and know the exact effect
of that particular instance of undefined behaviour on that particular
platform. Which is not the case here. Without seeing the actual atoi
code, there is no way to predict the result of the code in question.
Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Dan.Pop@ifh.de
Comment