From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 73A3D3857C44; Wed, 28 Sep 2022 15:33:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 73A3D3857C44 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664379223; bh=t79+DQJ+4dPSzpsXok2JBWPoDFjxffUDmDjNSl2pdHA=; h=From:To:Subject:Date:From; b=sGTwZkvFSybFw8Di18lbF5V6fQcGgOBXC5GJYUyoOaAU2kAaDNgVXIPTbkXzt2ASo H+Zd4k7fMjHNGr1vUMG6kryPZSF1Xh5UeK+qE6wk/TW/S3YVPymqLl0is8PCeBOfbJ H2s3uP3qpgGEaN2QleUu0MhlfPjF+kZTdz3jz+Zk= From: "nir.livne at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107070] New: GCC thinks !!b is an lvalue (bool b;) Date: Wed, 28 Sep 2022 15:33:43 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: nir.livne at gmail dot com X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D107070 Bug ID: 107070 Summary: GCC thinks !!b is an lvalue (bool b;) Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: nir.livne at gmail dot com Target Milestone: --- #include // gcc result: 0 1=20 // clang result: 1 1 // msvc result: 1 1 int main() { bool b =3D true; // #1 GCC result with 0 while it should be 1 std::cout << std::is_same::value << "\n"; auto bb =3D (!(!b)); std::cout << std::is_same::value << "\n"; // #2 this should not compile // !!b =3D true; }=