This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/64313] [5 Regression] gcc.dg/torture/builtin-explog-1.c fails on bare-metal targets
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 16 Dec 2014 17:37:56 +0000
- Subject: [Bug middle-end/64313] [5 Regression] gcc.dg/torture/builtin-explog-1.c fails on bare-metal targets
- Auto-submitted: auto-generated
- References: <bug-64313-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64313
--- Comment #3 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
In the case of expf, if it's used or known to be available in a linked
library then it can be assumed to have the required semantics (since it's
reserved by ISO C90). If it's used it can also be assumed to be available
(if not used, its availability depends on targetm.libc_has_function).
In the case of exp10, a function exp10 can only be assumed to have the
required semantics if either (a) -std=gnu* is used, so exp10 (not just
__builtin_exp10) is built in, or (b) exp10 is declared in system headers
(e.g. -std=c99 -D_GNU_SOURCE). Availability can be assumed if, in
addition to the conditions for the semantics, (a) it is used or (b)
targetm.libc_has_function says it's available (well, except that there is
no relevant enum function_class value for exp10).
(log10 is standard C90. exp10 would be defined by draft TS 18661-4 to be
available if __STDC_WANT_IEC_60559_FUNCS_EXT__.)