We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4201 - libm: Mismatch types for __ieee754_rem_pio2 and __kernel_rem_pio2
Summary: libm: Mismatch types for __ieee754_rem_pio2 and __kernel_rem_pio2
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: HG 2.1
Hardware: All All
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-15 08:54 UTC by exjam
Modified: 2018-08-03 21:22 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description exjam 2018-06-15 08:54:02 UTC
In src/libm/e_rem_pio2.c the function __ieee754_rem_pio2 is defined with a return type of int32_t, yet in src/libm/math_private.h it is declared with a return type of int.

In src/libm/k_rem_pio2.c the function __kernel_rem_pio2 is defined with the last argument as const int32_t *ipio2, yet in src/libm/math_private.h it is declared with the type int.

An example fix might be to update the declarations to match the definitions:

src/libm/math_private.h
-     extern int __ieee754_rem_pio2(double, double *) attribute_hidden;
+     extern int32_t __ieee754_rem_pio2(double, double *) attribute_hidden;

      extern int __kernel_rem_pio2(double *, double *, int, int, int,
-                                  const int *) attribute_hidden;
+                                  const int32_t *) attribute_hidden;
Comment 1 Ryan C. Gordon 2018-08-03 21:22:08 UTC
Fixed in https://hg.libsdl.org/SDL/rev/ce88faaf8bd2, thanks!

--ryan.