This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C6678 FAUCR not showing DIV0 set in test program

Hi,

I had a test program to check for DIV0 in my c++ program below:

 

extern __cregister volatile unsigned int FAUCR;

 

void testDIV0(void)

{

  double a = 1, b = 1, c = 0;

  c = 0;

  b = 1 / c;

  printf("\nFAUCR = 0x%x", FAUCR);

}

I expect to see DIV0 in FAUCR set, but the output I get is:

 

FAUCR = 0x800000

Why is FAUCR not showing  DIV0? How do I perform tests to enable FAUCR to flag out the exceptions such as

underflow or overflow, the rounding mode, NaNs, denormalized numbers, and inexact results? Thanks!