From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 38CCA394C070; Thu, 16 Apr 2020 20:50:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 38CCA394C070 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587070217; bh=UIVZfKa2JYIMOelPQXk4hnrwTn452Q2ef2CMzXO8L4k=; h=From:To:Subject:Date:From; b=L0/Wd9hy+XteKNbPfbxM9KKSRApRIMJgW+Njs0w+77MOtV2tNt4FonXuzHeD0ErbT 3f+AjZOXreniJhouoimSVhG5s/PPz4LDBh8iFpfC8rJwo5IfcI3IJTJSetx27Y7hq7 Hsl7xH86sUbw3MNz5hap3RwOhCgyM9AYKd+jAJao= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/94627] New: [9/10 Regression] std::match_results equality comparisons should not be noexcept Date: Thu, 16 Apr 2020 20:50:17 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Apr 2020 20:50:17 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94627 Bug ID: 94627 Summary: [9/10 Regression] std::match_results equality comparisons should not be noexcept Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- This should exit cleanly: #include struct iterator { using value_type =3D char; using difference_type =3D std::ptrdiff_t; using reference =3D char&; using pointer =3D char*; using iterator_category =3D std::bidirectional_iterator_tag; iterator() : ptr() { } explicit iterator(pointer p) : ptr(p) { } iterator& operator++() { if (bang) throw 1; ++ptr; return *this; } iterator operator++(int) { auto copy =3D *this; ++*this; return copy; } iterator& operator--() { if (bang) throw 1; --ptr; return *this; } iterator operator--(int) { auto copy =3D *this; --*this; return copy; } reference operator*() const noexcept { return *ptr; } pointer operator->() const noexcept { return ptr; } bool operator=3D=3D(iterator rhs) const noexcept { return ptr =3D=3D rhs.= ptr; } bool operator!=3D(iterator rhs) const noexcept { return ptr !=3D rhs.ptr;= } static bool bang; private: pointer ptr; }; bool iterator::bang =3D false; int main() { char str[] =3D "abc"; std::regex r(str); std::match_results m; std::regex_match(iterator(str), iterator(str+3), m, r); iterator::bang =3D true; try { m =3D=3D m; } catch (int) { } } Since g:c962b2c36f12 it terninates because I incorrectly added noexcept to = the operator=3D=3D and operator!=3D for std::match_results=