|
From: | Paul Eggert |
Subject: | Re: Autoconf protype breaks GCC builtin inlining |
Date: | Wed, 24 Jan 2018 15:11:41 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 |
On 01/24/2018 01:36 PM, Ferenc Wágner wrote:
in the actual code where math.h is #included, the above warning does not happen, ceil is inlined and I unnecessarily link with -lm. How could I overcome this?
I don't see an easy workaround at the autoconf level. The compiler makes the decision whether to inline, and this decision can depend on a lot of things. The compiler's decision for the Autoconf-generated snippet might disagree with the compiler's decision in the rest of your code, so this is not something that one can safely test for at 'configure'-time.
To some extent you've lucked out because for you 'configure' tells 'make' to use -lm, so the worst that can happen for you is linking a library unnecessarily. If it made the opposite mistake, the program wouldn't link at all.
[Prev in Thread] | Current Thread | [Next in Thread] |