This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/46926] Paired sin() cos() calls optimized to sincos() call.
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 13 Dec 2010 18:48:23 +0000
- Subject: [Bug c/46926] Paired sin() cos() calls optimized to sincos() call.
- Auto-submitted: auto-generated
- References: <bug-46926-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46926
--- Comment #3 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2010-12-13 18:48:22 UTC ---
On Mon, 13 Dec 2010, pinskia at gcc dot gnu.org wrote:
> I think this is invalid as GNU/Linux defaults to including sincos as a
> builtin. If you want to disable the builtin then use
> -fno-builtin-sincos.
It seems valid to me. The options specified included -ansi (i.e.
-std=c90) which implies -fno-builtin-sincos.
Whether GCC *generates* calls to a function when that function does not
appear in the source code is independent of how it *handles* calls to a
function in the source code, and -fno-builtin-* deals with the latter
only. It's always OK to generate calls to C90 function such as memcpy
(standards.texi list the subset that may be used in freestanding mode) or
to C99 functions when in C99 mode or to reserved-namespace functions in
libgcc. It's not OK to generate calls to non-reserved-namespace libc/libm
functions, when in a strict conformance mode such as -std=c90/-std=c99, if
those functions are outside the language version specified and the calls
do not appear in the source code. This includes sincos.