GNOME Bugzilla – Bug 614788
warning: incompatible implicit declaration of built-in function pow10
Last modified: 2018-02-26 16:12:41 UTC
Attempting to use Math.pow10 causes this compiler warning: warning: incompatible implicit declaration of built-in function ‘pow10’ To reproduce: -------------------- using Math; int main(string[] args) { Math.pow10(1.23); return 0; } ------------------- This is on Ubuntu 9.10 with Vala 0.7.10. My guess is that these functions are GNU only? /usr/include/bits/mathcalls.h declares them: #ifdef __USE_GNU /* A function missing in all standards: compute exponent to base ten. */ __MATHCALL (exp10,, (_Mdouble_ __x)); /* Another name occasionally used. */ __MATHCALL (pow10,, (_Mdouble_ __x)); #endif
I'm seeing this too. Yes, pow10 is a GNU extension. When valac generates C code, it should insert this line before including math.h: #define _GNU_SOURCE That will prevent the warning.
commit 908b2663f2c98542c037a41141a52dbb3b018373 (HEAD -> staging, origin/staging) Author: Dr. Michael Lauer <mickey@vanille-media.de> Date: Mon Feb 26 17:11:50 2018 +0100 posix: add feature test macro _GNU_SOURCE for exp10(3) and exp10f(3) commit 2c9e89d0a771ed42d46a28cffbf047790714c216 Author: Dr. Michael Lauer <mickey@vanille-media.de> Date: Mon Feb 26 17:11:39 2018 +0100 glib-2.0: add feature test macro _GNU_SOURCE for exp10(3) and exp10f(3) commit 5ea9b2127a6b47fb6aa3d99fe8ab9806072b6ff7 Author: Dr. Michael Lauer <mickey@vanille-media.de> Date: Mon Feb 26 17:02:36 2018 +0100 posix: add feature test macro _GNU_SOURCE for pow10(3) and pow10f(3) commit a16e1627fa963982949dfbd7ffa3acc0671c3fc6 Author: Dr. Michael Lauer <mickey@vanille-media.de> Date: Mon Feb 26 17:02:00 2018 +0100 glib-2.0: add feature test macro _GNU_SOURCE for pow10(3) and pow10f(3)