Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

ILLEGAL_SHADOW error in C, casting NaN to unsigned int

 
SOLVED
Go to solution
Craig A Berry
Honored Contributor

Re: ILLEGAL_SHADOW error in C, casting NaN to unsigned int

John R.,

Thanks for the additional insight and for checking into what the compiler is doing and why. Note that the illegal shadow error only appears when operating on a NaN -- it may be the optimization is kosher for other values but not when one of the operands is a NaN.
John Reagan
Respected Contributor

Re: ILLEGAL_SHADOW error in C, casting NaN to unsigned int

For those of you keeping score at home, I've done some archaeology and decided that:

1) the compiler is correct.

2) the OpenVMS IEEE handler is broken when it comes to validating instructions in the trap shadow.

3) the Alpha SRM section on Trap Shadows was actually written by the GEM team to capture the implementation details, not the other way around.

I've entered a problem report against the code, but the authors are long gone. That makes me the "expert" based on my 15 minutes of looking (to be honest, the code in question isn't that large, just ugly). I guess that means I should fix it myself when I can suppress my gag reflex for 30 minutes.