modula-2: Remove uses of scalb*() and significand*() [PR107631]
authorIain Sandoe <iain@sandoe.co.uk>
Wed, 4 Jan 2023 21:03:24 +0000 (21:03 +0000)
committerIain Sandoe <iain@sandoe.co.uk>
Thu, 5 Jan 2023 16:55:30 +0000 (16:55 +0000)
commit4413365616e8c6024d1ff4e23309e5012ee33b9f
tree7a78aa715239f0da417222414d4c2238553e9980
parent80ff207da6d8784e227eb93f75c4ac5a300c8420
modula-2: Remove uses of scalb*() and significand*() [PR107631]

The scalb*() functions are obsolete in Posix from 2004 and removed in
2008.

The significand*() functions are glibc-only and considered there to be
obsolescent (not supported for types such as _Float128).

We can remove them from Modula-2 since they are not required for ISO
support, but we need to provide an implementation of significand* for
the "fraction()" functions.

PR modula2/107631

gcc/m2/ChangeLog:

* gm2-gcc/m2builtins.cc: Remove scalb, scalbf, scalbl,
significand, significandf, significandl.
* gm2-libs/Builtins.def (significand): Likewise.
* gm2-libs/Builtins.mod: Likewise.
* target-independent/Builtins.texi: Likewise.
* gm2-libs-iso/LowLong.mod: Implement fraction with scalbn*() and
ilogb*().
* gm2-libs-iso/LowReal.mod: Likewise.
* gm2-libs-iso/LowShort.mod: Likewise.
gcc/m2/gm2-gcc/m2builtins.cc
gcc/m2/gm2-libs-iso/LowLong.mod
gcc/m2/gm2-libs-iso/LowReal.mod
gcc/m2/gm2-libs-iso/LowShort.mod
gcc/m2/gm2-libs/Builtins.def
gcc/m2/gm2-libs/Builtins.mod
gcc/m2/target-independent/Builtins.texi