[ECOS] Re: Dividing by zero does NOT generate exception
Fri Mar 4 22:41:00 GMT 2011
On 2011-03-04, Quanren Xiong <email@example.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.
> The platform is at91rm9200. I double and triple checked the following
> options are on:
> And CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS is disabled.
> I would like an exception being generated.
Exceptions are run-time events triggered by code that is executing on
That snippet _doesn't_generate_any_executable_code_.
> What am I doing wrong?
You're expecting a run-time exception from something that doesn't
actually execute at runtime.
Grant Edwards grant.b.edwards Yow! Kids, don't gross me
at off ... "Adventures with
gmail.com MENTAL HYGIENE" can be
carried too FAR!
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss