From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 958EB3858426; Fri, 12 May 2023 10:48:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 958EB3858426 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683888526; bh=SpmRTwsr9nwc+Q2PU84pUVtnb9zvdYWef2vHz16LBoI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=WXf7ya2HeuoswfAR6x6eI2hi/UB/XRQBa9UW2QmG6XrpDrQRTQfXSUP8mgDxGWh2u 9t+hanNVDvPrXnSzOtHb23dGQtZCWacDfnEa5PIXQvMmVzadDDTMwccASuLamnY8DT pWH7/zwhDRtluuPmqlPJ6218XkRIC1E5S0ZCX7wA= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/109818] std::trunc() requires a hack after building DJGPP Date: Fri, 12 May 2023 10:48:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 13.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109818 --- Comment #15 from Jonathan Wakely --- 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: >=20 > #ifdef _GLIBCXX_USE_C99_MATH_TR1 >=20 > 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 ma= cro 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 m= ean '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 me= an 'scalbnf'? config.cc6:19: error: 'scalblnl' was not declared in this scope; did you me= an '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 t= o be more fine-grained, so that we use the subset of functions that are supporte= d, instead of all or nothing.=