GNU bug report logs - #76090
Regression in gcc-toolchain version 14: C++ header cfenv

Previous Next

Package: guix;

Reported by: Jake <jforst.mailman <at> gmail.com>

Date: Thu, 6 Feb 2025 08:06:01 UTC

Severity: normal

To reply to this bug, email your comments to 76090 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#76090; Package guix. (Thu, 06 Feb 2025 08:06:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jake <jforst.mailman <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Thu, 06 Feb 2025 08:06:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jake <jforst.mailman <at> gmail.com>
To: bug-guix <at> gnu.org
Cc: skalman <at> riseup.net, andreas <at> enge.fr, ludo <at> gnu.org, janneke <at> gnu.org
Subject: Regression in gcc-toolchain version 14: C++ header cfenv
Date: Thu, 6 Feb 2025 08:05:25 +0000
[Message part 1 (text/plain, inline)]
Hello

With the latest version of gcc-toolchain in Guix (14.2.0), macros from the
<cfenv> header aren't defined during compilation with g++.  Version 13 of
gcc-toolchain doesn't have this problem.

Reproducer:

Create a file called test.cpp with contents:

    #include <stdio.h>
    #include <cfenv>

    int main() {
        #ifdef FE_DIVBYZERO
            printf("FE_DIVBYZERO is defined\n");
        #else
            printf("FE_DIVBYZERO is NOT defined\n");
        #endif

        return 0;
    }

$ guix shell -C gcc-toolchain <at> 14 -- g++ test.cpp && ./a.out
FE_DIVBYZERO is NOT defined

$ guix shell -C gcc-toolchain <at> 13 -- g++ test.cpp && ./a.out
FE_DIVBYZERO is defined

If we include the C equivalent <fenv.h> instead of <cfenv>, again g++ finds
it in version 13 but not in version 14 of gcc-toolchain.
Note that gcc from gcc-toolchain <at> 14 does find the macro from <fenv.h>
(provided the source file has .c extension).

Other macros from <cfenv> are also affected with g++, including
FE_OVERFLOW, FE_UNDERFLOW, FE_INEXACT, and FE_INVALID.

This bug is probably the same as 43579 (feclearexcept with g++)
https://issues.guix.gnu.org/43579

I've copied in the members of core-packages team.

guix a53bd6f

Thanks!
Jake
[Message part 2 (text/html, inline)]

This bug report was last modified 25 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.