From unknown Wed Jun 18 23:16:59 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#76090 <76090@debbugs.gnu.org> To: bug#76090 <76090@debbugs.gnu.org> Subject: Status: Regression in gcc-toolchain version 14: C++ header cfenv Reply-To: bug#76090 <76090@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:16:59 +0000 retitle 76090 Regression in gcc-toolchain version 14: C++ header cfenv reassign 76090 guix submitter 76090 Jake severity 76090 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 06 03:05:51 2025 Received: (at submit) by debbugs.gnu.org; 6 Feb 2025 08:05:51 +0000 Received: from localhost ([127.0.0.1]:54165 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tfwtS-0002RV-Fr for submit@debbugs.gnu.org; Thu, 06 Feb 2025 03:05:50 -0500 Received: from lists.gnu.org ([2001:470:142::17]:34224) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tfwtQ-0002R9-PP for submit@debbugs.gnu.org; Thu, 06 Feb 2025 03:05:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tfwtL-0005pL-AW for bug-guix@gnu.org; Thu, 06 Feb 2025 03:05:43 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tfwtJ-0002rR-2k; Thu, 06 Feb 2025 03:05:42 -0500 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-38dada77686so464695f8f.0; Thu, 06 Feb 2025 00:05:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738829137; x=1739433937; darn=gnu.org; h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=ZM+scfaWt8DnJf351eOEaXiBDPVklFm8BI5p7/pxaEA=; b=B38Bk4EbLlTORioNa2uwrgy4DyrrW55t3AZDY0JMuyf55KVYdC12JaXpFx8G0GvzH1 xkRcvOL7lRIm/abX3dirXo4jfmyY43FQ+EiEGxW+dGW6cYoYkTCuREEdQcbKWLKU5Nih mMigGMyOTrduO3DCmFcUbZ7foGLg0U2WfjmBGYhDB3jLKV/Fmoz8G2PFg4r03QYK/EyL RBGGsNwrIH4V5oEfcnh5muf3lSqSLvb5q1NnBRAd9jUw95uXfREduf6td1rRqHGpvwoW MqXUscYVuRyALYja/ewn2iV7SIAJmOtS6to0MSg9MuvHCk8mY9ZyF7bcjMxH4yIQeUwa HxMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738829137; x=1739433937; h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ZM+scfaWt8DnJf351eOEaXiBDPVklFm8BI5p7/pxaEA=; b=T6Y4HvWWdP+xQ0/YKHMckCkr6lFc6NbRtBFvplMN9yuT8wOtTswUuSHaHAnrHxoPDL GZI4wrVoZSkGU8Qm6fhckAKj0pQPp/S13zF1P3zOBqjTI1VyUmJPUgbc8g26o3fXZmVM uqh8T0oq2JloTLUcaKMOC9nllE0nTBmluykSchlM2P/iZpeeqgmyUnY7RUxCB19rDDaw hYGO2naKFF7ChXvu9GSDgIw4+HqJdZ70FywFgAZO17wuqPJ/0oZjnkBXayGMXl02Zf1r 4hcyn6ToUq5cngo5a8sI0ppgFwu1uVFu8w+NgrGxWJIrpL/5TD6DrXX5EIMxHNqnHROO Q+HA== X-Forwarded-Encrypted: i=1; AJvYcCWlmfTo8cD/8kPY43wX0UJ73lK5rUkJb8+X7dy/Fa38ovXIeWvD3JrcY9IrRJrRhH39if7f3w==@gnu.org, AJvYcCXzr+HzxoVfxWDjzheV7hANtT130rHBUXUtk2l8elVHkNA98xIZSBP2/RCIOa86L3gGvcvgplC1@gnu.org X-Gm-Message-State: AOJu0YyDvQ5VchlmeTqZnsByWXWB52BYm3JXfbwbZtgqH96O8Z0mhxxr 6g4YTDq/ZZr6xxUUsmDbilYbrmw3HUHhWE/JrGluIpUZueuGhH9Qh2X2Z//MBH/S59aMqqqvD8Y rsNyz5+mwnmOz57gToDUrEOyi3oW0j+9x X-Gm-Gg: ASbGncvH8ZoOmM2W/ihcTXZxTgSs9SlmdXsGBtR4n8lwD4huNJPtKz3+1TzjltY4TYD xvfzsF4/Nqm8XNDfs3W3bSb7JwLbBgBD6Md/Pj2OQp3BoMcu1Vd6HX3pMG0ptv9MnIct1Wb03 X-Google-Smtp-Source: AGHT+IG/ME29CHg5/deEuyqGjXC0ayGdv2MkawtsegZ/jXot38yGDa52A5dTIxSgGPQav6+ym8vSfKSbMdfggVWQ4ek= X-Received: by 2002:a05:6000:178a:b0:38b:e32a:109f with SMTP id ffacd0b85a97d-38db4881043mr5005391f8f.12.1738829137004; Thu, 06 Feb 2025 00:05:37 -0800 (PST) MIME-Version: 1.0 From: Jake Date: Thu, 6 Feb 2025 08:05:25 +0000 X-Gm-Features: AWEUYZkrVc1GEHxQae8sQORRZkgAt5rBc8-XRzJg-XGnGqGBvKvDC4zfHYQAbcM Message-ID: Subject: Regression in gcc-toolchain version 14: C++ header cfenv To: bug-guix@gnu.org Content-Type: multipart/alternative; boundary="000000000000095204062d74b552" Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=jforst.mailman@gmail.com; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit Cc: skalman@riseup.net, andreas@enge.fr, ludo@gnu.org, janneke@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --000000000000095204062d74b552 Content-Type: text/plain; charset="UTF-8" Hello With the latest version of gcc-toolchain in Guix (14.2.0), macros from the 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 #include 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@14 -- g++ test.cpp && ./a.out FE_DIVBYZERO is NOT defined $ guix shell -C gcc-toolchain@13 -- g++ test.cpp && ./a.out FE_DIVBYZERO is defined If we include the C equivalent instead of , again g++ finds it in version 13 but not in version 14 of gcc-toolchain. Note that gcc from gcc-toolchain@14 does find the macro from (provided the source file has .c extension). Other macros from 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 --000000000000095204062d74b552 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello

With the latest versio= n of gcc-toolchain in Guix (14.2.0), macros from the <cfenv> header a= ren't defined during compilation with g++.=C2=A0 Version 13 of gcc-tool= chain doesn't have this problem.

Reproducer:

Create a f= ile called test.cpp with contents:

=C2=A0 =C2=A0 #include <stdio.= h>
=C2=A0 =C2=A0 #include <cfenv>

=C2=A0 =C2=A0 int main= () {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 #ifdef FE_DIVBYZERO
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 printf("FE_DIVBYZERO is defined\n");<= br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 #else
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 printf("FE_DIVBYZERO is NOT defined\n");
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 #endif

=C2=A0 =C2=A0 =C2=A0 =C2=A0 return 0;
=C2=A0= =C2=A0 }

$ guix shell -C gcc-toolchain@14 -- g++ test.cpp &&= ; ./a.out
FE_DIVBYZERO is NOT defined

$ guix shell -C gcc-toolcha= in@13 -- g++ test.cpp && ./a.out
FE_DIVBYZERO is defined

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

Other macros from <cf= env> are also affected with g++, including FE_OVERFLOW, FE_UNDERFLOW, FE= _INEXACT, and FE_INVALID.

This bug is probably the same as 43579 (fe= clearexcept with g++)

I've copied in the memb= ers of core-packages team.

guix a53bd6f

Thanks!
Jake
--000000000000095204062d74b552--