public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-113776-4-DexFZa1SxI@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113776-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Joseph Myers <jsm28@gcc.gnu.org>:

https://gcc.gnu.org/g:bfd72bb44eca83b0db2b0bab895f27a8a44247a2

commit r14-8874-gbfd72bb44eca83b0db2b0bab895f27a8a44247a2
Author: Joseph Myers <josmyers@redhat.com>
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.

  parent reply	other threads:[~2024-02-08  1:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-05 19:51 [Bug c/113776] New: [14 regression] postgresql-16.1 build failure with -Werror=vla in configure test sjames at gcc dot gnu.org
2024-02-05 19:51 ` [Bug c/113776] " sjames at gcc dot gnu.org
2024-02-05 20:05 ` [Bug c/113776] [14 regression] postgresql-16.1 build failure with -Werror=vla in configure test since r14-8641 jakub at gcc dot gnu.org
2024-02-07 22:19 ` jsm28 at gcc dot gnu.org
2024-02-08  1:35 ` cvs-commit at gcc dot gnu.org [this message]
2024-02-08  1:40 ` jsm28 at gcc dot gnu.org
2024-02-08  4:38 ` sjames at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-113776-4-DexFZa1SxI@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).