Search Unity

  1. How can our website serve you better? Give us your feedback. Take our survey and let us know.
    Dismiss Notice

"checked" compiler option ignored

Discussion in 'Scripting' started by JAKJ, Dec 24, 2015.

  1. JAKJ


    Aug 17, 2014
    I have confirmed the compiler should support this, because running "smcs.exe" in the Unity installation lists "-checked" as an option. I have created both smcs.rsp and gmcs.rsp with "-unsafe" which works (error without "-unsafe", success with "-unsafe"), but "-unsafe -checked" does not cause integer operations to be checked, no matter what I do. If I put the code in a "checked{}" block, I do get an exception.

    Why does the compiler not respect "-checked" project-wide when it does respect "-unsafe"?