From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 468013858298; Thu, 8 Feb 2024 01:35:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 468013858298 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707356108; bh=t463tBk3mJcNVFGKFTK6BWj3MZMaklOk/JtaVg7YHWk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gbFhafgDRtyjImEpH1rCmVvDlUHFCjsbIw1Xr1Nc8A3UcP9fowNE6o69b28hUX+k2 ioQYP2+f0SlF0xQJggW88mIFfZm1eK4R+wCWs85EzZdWvoBp0FZ3QJjvv3MZNfCCSJ 8Gcfhv3bsj5LpJwEXaGEvuxlgzR2pkukwnd7F3EU= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/113776] [14 regression] postgresql-16.1 build failure with -Werror=vla in configure test since r14-8641 Date: Thu, 08 Feb 2024 01:35:07 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: jsm28 at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 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=3D113776 --- Comment #4 from GCC Commits --- The master branch has been updated by Joseph Myers : https://gcc.gnu.org/g:bfd72bb44eca83b0db2b0bab895f27a8a44247a2 commit r14-8874-gbfd72bb44eca83b0db2b0bab895f27a8a44247a2 Author: Joseph Myers Date: Thu Feb 8 01:34:09 2024 +0000 c: Fix boolean conversion of floating constant as integer constant expression [PR113776] My fix for bug 111059 and bug 111911 caused a conversion of a floating constant to boolean to wrongly no longer be considered an integer constant expression, because logic to insert a NOP_EXPR in c_objc_common_truthvalue_conversion for an argument not an integer constant expression itself now took place after rather than before the conversion to bool. In the specific case of casting a floating constant to bool, the result is an integer constant expression even though the argument isn't (build_c_cast deals with ensuring that casts to integer type of anything of floating type more complicated than a single floating constant don't get wrongly treated as integer constant expressions even if they fold to constants), so fix the logic in c_objc_common_truthvalue_conversion to handle that special case. Bootstrapped with no regressions for x86_64-pc-linux-gnu. PR c/113776 gcc/c * c-typeck.cc (c_objc_common_truthvalue_conversion): Return an integer constant expression for boolean conversion of floating constant. gcc/testsuite/ * gcc.dg/pr113776-1.c, gcc.dg/pr113776-2.c, gcc.dg/pr113776-3.c, gcc.dg/pr113776-4.c: New tests.=