Working with a fusa RTX safety compiler.
Compiling , .__i files shows the flags which can be sourced to the uvprojx file.
Except for ONE flag that appears from nowhere : -fno-exceptions
I searched the entire project, there is no mention in any keil uvision files for that flag. How does he then being added ?This is a major issue when trying to export the project , the flag will not show up as it is not in the uvproj file !!Looking for explanation/ solutionthanks
The -fno-exceptions is added by the uVision IDE by default for C++ files. The reason was the different default behavior regarding exception handling options. Arm Compiler 5 defaults to "--no_exceptions":
https://developer.arm.com/documentation/dui0375/g/Compiler-Command-line-Options/--exceptions----no-exceptions
while Arm Compiler 6, for C++ code, defaults to "-fexceptions":
https://developer.arm.com/documentation/102284/6-16-2LTS/armclang-Reference/armclang-Command-line-Options/-fexceptions---fno-exceptions?lang=en
When porting projects from Arm Compiler 5 to Arm Compiler 6 without considering this, the resulting code size did increase dramatically due to the enabled exception handling. Users did complain about this.
That is why -fno-exceptions was added as default. It can still be overruled by adding -fexceptions in the C/C++ Misc Options field.