This is the mail archive of the
mailing list for the GCC project.
Re: Some __builtin_round and cast subtleties
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Kyrill Tkachov <kyrylo dot tkachov at arm dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Mon, 21 Jul 2014 17:55:20 +0000
- Subject: Re: Some __builtin_round and cast subtleties
- Authentication-results: sourceware.org; auth=none
- References: <53B668A1 dot 7060108 at arm dot com>
On Fri, 4 Jul 2014, Kyrill Tkachov wrote:
> These end up taking different codepaths through the compiler () because
> __builtin_lround has to take -fmath-errno into account and does not end up
> getting inlined (generating a call to the library lround).
That suggests this transformation is buggy unless -fno-math-errno is used
(given the existence of cases where round + cast must not set errno, but
lround may). A bug should be filed in Bugzilla for this.
Joseph S. Myers