Ticket #476 (Fixed)Wed Nov 27 13:04:41 UTC 2019
cc 5.79 fpclassify fails with const double
Reported by: | Stuart Swales (1481) | Severity: | Normal |
Part: | RISC OS: C/C++ toolchain | Release: | |
Milestone: | Status | Fixed |
Details by Stuart Swales (1481):
The following example gives
Norcroft RISC OS ARM C vsn 5.79 [09 Sep 2019]
“filename”, line 6: Serious error: ___assert(0, ‘“Illegal type used with classification macro”’)
<code>
#include <math.h>
static double
func(const double f)
{
if(isfinite(f))
return(f + 1.0);
}
</code>
due to too strict __typeof() checking (some masking required?)
Changelog:
Modified by Stuart Swales (1481) Wed, December 04 2019 - 11:40:55 GMT
I suppose that example looks rather artificial, but it does fail on real-world constructs such as when accessing a double member of a structure via a pointer-to-const
Modified by Stuart Swales (1481) Fri, December 20 2019 - 13:25:30 GMT
- Status changed from Open to Fixed
Fixed in cc5.80 – thanks