https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64631
Bug ID: 64631 Summary: error: ‘lgammal_r’ was not declared in this scope Product: gcc Version: 4.9.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mathieu.malaterre at gmail dot com Created attachment 34464 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34464&action=edit demo I cannot compile the following pseudo code (see attachment) it fails with: $ g++ -ffast-math foo.cxx In file included from /usr/include/math.h:432:0, from foo.cxx:3: /usr/include/x86_64-linux-gnu/bits/math-finite.h: In function ‘double lgamma(double)’: /usr/include/x86_64-linux-gnu/bits/math-finite.h:260:41: error: ‘lgamma_r’ was not declared in this scope return lgamma_r (__d, &__local_signgam); ^ /usr/include/x86_64-linux-gnu/bits/math-finite.h: In function ‘float lgammaf(float)’: /usr/include/x86_64-linux-gnu/bits/math-finite.h:269:42: error: ‘lgammaf_r’ was not declared in this scope return lgammaf_r (__d, &__local_signgam); ^ /usr/include/x86_64-linux-gnu/bits/math-finite.h: In function ‘long double lgammal(long double)’: /usr/include/x86_64-linux-gnu/bits/math-finite.h:279:42: error: ‘lgammal_r’ was not declared in this scope return lgammal_r (__d, &__local_signgam); ^ /usr/include/x86_64-linux-gnu/bits/math-finite.h: In function ‘double gamma(double)’: /usr/include/x86_64-linux-gnu/bits/math-finite.h:293:41: error: ‘lgamma_r’ was not declared in this scope return lgamma_r (__d, &__local_signgam); ^ /usr/include/x86_64-linux-gnu/bits/math-finite.h: In function ‘float gammaf(float)’: /usr/include/x86_64-linux-gnu/bits/math-finite.h:302:42: error: ‘lgammaf_r’ was not declared in this scope return lgammaf_r (__d, &__local_signgam); ^ /usr/include/x86_64-linux-gnu/bits/math-finite.h: In function ‘long double gammal(long double)’: /usr/include/x86_64-linux-gnu/bits/math-finite.h:312:42: error: ‘lgammal_r’ was not declared in this scope return lgammal_r (__d, &__local_signgam);