This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Dividing by zero does NOT generate exception
On 2011-03-04, Grant Edwards <grant.b.edwards@gmail.com> wrote:
> On 2011-03-04, Quanren Xiong <xiongqr@gmail.com> wrote:
>
>> I am using ECOS 2.0.33. To my suprise, the following code does NOT
>> generate an exception.
>>
>> "int b=1; int c=b/0;" The value in variable c will be 0.
> You're expecting a run-time exception from something that doesn't
> actually execute at runtime.
I think I got that one wrong. For some reason I convinced myself you
were talking about static variables, but the second initialize isn't
lebal for a static initializer.
Perhaps your processor doesn't generate an exception for integer
divide by zero?
--
Grant Edwards grant.b.edwards Yow! The PINK SOCKS were
at ORIGINALLY from 1952!!
gmail.com But they went to MARS
around 1953!!
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss