[MacPorts] #70351: legacy-support implementation of sincos does not work correctly: implicit declaration of function 'sincos'

MacPorts noreply at macports.org
Wed Jul 10 14:58:12 UTC 2024


#70351: legacy-support implementation of sincos does not work correctly: implicit
declaration of function 'sincos'
--------------------------+----------------------------
 Reporter:  barracuda156  |      Owner:  (none)
     Type:  defect        |     Status:  new
 Priority:  Normal        |  Milestone:
Component:  ports         |    Version:  2.9.3
 Keywords:                |       Port:  legacy-support
--------------------------+----------------------------
 It appeared working earlier apparently due to a compiler being fine with
 implicit function declarations. With `gcc14` it just errs out, with
 `gcc13` it only complains.

 This is from `gtk3` build, which now fails with `gcc14`, despite we patch
 `math.h` in (gcc still advises it, because our header did not work):
 {{{
 ../gtk+-3.24.42/tests/gtkgears.c: In function 'create_gear':
 ../gtk+-3.24.42/tests/gtkgears.c:309:5: warning: implicit declaration of
 function 'sincos' [-Wimplicit-function-declaration]
   309 |     sincos(i * 2.0 * G_PI / teeth + da * 0, &s[0], &c[0]);
       |     ^~~~~~
 ../gtk+-3.24.42/tests/gtkgears.c:46:1: note: include '<math.h>' or provide
 a declaration of 'sincos'
    45 | #include "gtkgears.h"
   +++ |+#include <math.h>
    46 |
 ../gtk+-3.24.42/tests/gtkgears.c:309:5: warning: incompatible implicit
 declaration of built-in function 'sincos' [-Wbuiltin-declaration-mismatch]
   309 |     sincos(i * 2.0 * G_PI / teeth + da * 0, &s[0], &c[0]);
       |     ^~~~~~
 }}}

 Maybe because it is declared as `extern` in `legacy-support`, but there is
 no external provision for it?

-- 
Ticket URL: <https://trac.macports.org/ticket/70351>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list