Re: low-level question
- From: Mark McIntyre <markmcintyre@xxxxxxxxxxx>
- Date: Tue, 30 Aug 2005 16:14:04 +0100
On 30 Aug 2005 06:46:57 -0700, in comp.lang.c , "jesso"
<jesso1607@xxxxxxxxxx> wrote:
> Why does the following program output a 0?
Because of how that particular compiler or OS or hardware implements
undefined behaviour, vis writing off the end of an array.
>Explain in detail.
This isn't a C question, its a hardware / OS / compiler question.
>How could you prevent this outcome without changing the code?
Run on different hw/sw which handles the UB differently.
Compile with special "don't allow UB" options.
Don't run the app at all - it has a serious bug.
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
.
- References:
- low-level question
- From: jesso
- Re: low-level question
- From: Gordon Burditt
- Re: low-level question
- From: jesso
- Re: low-level question
- From: jesso
- low-level question
- Prev by Date: Re: understanding format specifiers
- Next by Date: Re: understanding format specifiers
- Previous by thread: Re: low-level question
- Next by thread: Re: low-level question
- Index(es):
Relevant Pages
|