← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Enable floating point exceptions in Debug, disable in Release

 

On 6/3/19 5:30 PM, Seth Hillbrand wrote:
> On 2019-05-28 10:51, Simon Richter wrote:
>> Hi,
>>
>> this enables FP exceptions everywhere in Debug mode, and disables them in
>> Release mode. This is for testing only, and should *not* yet go into
>> mainline.
>>
>> Still needed:
>>
>>  - signal handler that complains and allows continuing
>>  - context library handling
>>  - tests
>>
> 
> Hi Simon-
> 
> It looks like you are using the gcc extensions here.  Any reason not to
> use std::fesetenv?
> 
> -Seth
> 

Hey Seth,

According to the man page[1], fedisableexcept() and feenableexcept() are
C99 although I don't know if they are supported by msvc.  Given that
KiCad is a C++ 11 project, we probably should use std::fesetenv().

Wayne

[1]: https://linux.die.net/man/3/feenableexcept


References