https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78851
--- Comment #5 from Marc Glisse <glisse at gcc dot gnu.org> --- (In reply to Vadim Zeitlin from comment #4) > Thanks for the explanation! I didn't realize the template function below was > smart enough to select __builtin_powil() automatically, The template selects __builtin_powl, but gcc's optimizers know that when the second argument has an integer value (in type long double), they can replace it with __builtin_powil. One might complain that it only does this transformation when the second argument is a constant, not for casts of integer variables to long double. > thought the comment was temporary because of the question in it: "What > should the return type of pow(float,int) be?", which seemed to require an > answer ("double"), but maybe it's just a figure of style I didn't understand. I think that's the title of the DR (question mark included), check the issue list to make sure. > In practice, I definitely do not want to use -ffast-math (if anything, I'd > rather use -fexcess-precision=standard but it's, unfortunately, not > available for C++). And I can't change my (well, MinGW-w64's) libm. So, > again, in this particular case, if I understand you correctly, it seems like > I simply will have to live with the (very small, admittedly) loss of > precision after migrating the existing code base from C++98 to C++11, right? I think so.