Re: Autoconf protype breaks GCC builtin inlining

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux