https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109818

--- Comment #15 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The reason that std::trunc is not provided is because (In reply to Jonathan
Wakely from comment #11)
> The problem is more likely to be that this macro is not defined for djgpp:
> 
> #ifdef _GLIBCXX_USE_C99_MATH_TR1
> 
> And if djgpp doesn't have a full C99 math library then that would explain
> why you don't have std::trunc (or any of the other C99 math functions).

I've confirmed this is the problem. The configure test that defines that macro
fails because these are missing:

config.cc7:9: error: 'double_t' does not name a type; did you mean 'double'?
config.cc8:27: error: 'float_t' does not name a type; did you mean 'float'?
config.cc1:19: error: 'acoshl' was not declared in this scope; did you mean
'acoshf'?
config.cc4:19: error: 'asinhl' was not declared in this scope; did you mean
'asinhf'?
config.cc7:19: error: 'atanhl' was not declared in this scope; did you mean
'atanhf'?
config.cc0:19: error: 'cbrtl' was not declared in this scope; did you mean
'cbrtf'?
config.cc3:19: error: 'copysignl' was not declared in this scope; did you mean
'copysignf'?
config.cc6:19: error: 'erfl' was not declared in this scope; did you mean
'erff'?
config.cc9:19: error: 'erfcl' was not declared in this scope; did you mean
'erfcf'?
config.cc1:19: error: 'exp2f' was not declared in this scope; did you mean
'expf'?
config.cc2:19: error: 'exp2l' was not declared in this scope; did you mean
'exp2'?
config.cc5:19: error: 'expm1l' was not declared in this scope; did you mean
'expm1f'?
config.cc6:19: error: 'fdim' was not declared in this scope
config.cc7:19: error: 'fdimf' was not declared in this scope
config.cc8:19: error: 'fdiml' was not declared in this scope
config.cc9:19: error: 'fma' was not declared in this scope
config.cc0:19: error: 'fmaf' was not declared in this scope
config.cc1:19: error: 'fmal' was not declared in this scope
config.cc2:19: error: 'fmax' was not declared in this scope
config.cc3:19: error: 'fmaxf' was not declared in this scope
config.cc4:19: error: 'fmaxl' was not declared in this scope
config.cc5:19: error: 'fmin' was not declared in this scope
config.cc6:19: error: 'fminf' was not declared in this scope
config.cc7:19: error: 'fminl' was not declared in this scope
config.cc0:19: error: 'hypotl' was not declared in this scope; did you mean
'hypotf'?
config.cc3:19: error: 'ilogbl' was not declared in this scope; did you mean
'ilogbf'?
config.cc6:19: error: 'lgammal' was not declared in this scope; did you mean
'lgammaf'?
config.cc7:19: error: 'log1pl' was not declared in this scope; did you mean
'log1pf'?
config.cc0:19: error: 'log2l' was not declared in this scope; did you mean
'log2f'?
config.cc3:19: error: 'logbl' was not declared in this scope; did you mean
'logbf'?
config.cc3:19: error: 'nearbyint' was not declared in this scope
config.cc4:19: error: 'nearbyintf' was not declared in this scope
config.cc5:19: error: 'nearbyintl' was not declared in this scope
config.cc8:19: error: 'nextafterl' was not declared in this scope; did you mean
'nextafterf'?
config.cc9:19: error: 'nexttoward' was not declared in this scope
config.cc0:19: error: 'nexttowardf' was not declared in this scope
config.cc1:19: error: 'nexttowardl' was not declared in this scope
config.cc4:19: error: 'remainderl' was not declared in this scope; did you mean
'remainderf'?
config.cc5:19: error: 'remquo' was not declared in this scope
config.cc6:19: error: 'remquof' was not declared in this scope
config.cc7:19: error: 'remquol' was not declared in this scope
config.cc4:19: error: 'scalbln' was not declared in this scope; did you mean
'scalbn'?
config.cc5:19: error: 'scalblnf' was not declared in this scope; did you mean
'scalbnf'?
config.cc6:19: error: 'scalblnl' was not declared in this scope; did you mean
'scalbnf'?
config.cc9:19: error: 'scalbnl' was not declared in this scope; did you mean
'scalbnf'?
config.cc0:19: error: 'tgamma' was not declared in this scope; did you mean
'lgamma'?
config.cc1:19: error: 'tgammaf' was not declared in this scope; did you mean
'lgammaf'?
config.cc2:19: error: 'tgammal' was not declared in this scope; did you mean
'lgammaf'?

A proper fix would be to split up the configure test for USE_C99_MATH_TR1 to be
more fine-grained, so that we use the subset of functions that are supported,
instead of all or nothing.

Reply via email to