From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0CDDE384D154; Thu, 20 Oct 2022 18:03:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0CDDE384D154 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666289008; bh=nIYbhvMexhw1S4wW4S2jLRvD1n1dR0sNAu9evhv0Rbs=; h=From:To:Subject:Date:From; b=q29tM7/m7Fj6KHN6vIz52Uqxy+gNlFq2SuckjMPLu2z/jUzYuedc2ZyYDhDEj5G1R NyaglNhCHjo9/rb2Lc5LiKb8bdiJKOy//jXESgT1ilphdWyfHevfWem+xAlNpufVtr h8DWh44w8ADn1iNrzJPzTQy7gwCYxRcsZ2CKj7AI= From: "hugo_musso_gualandi at hotmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/107334] New: Incorrect "infinite recursion detected" warning if base case aborts Date: Thu, 20 Oct 2022 18:03:27 +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: 12.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hugo_musso_gualandi at hotmail 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 attachments.created 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=3D107334 Bug ID: 107334 Summary: Incorrect "infinite recursion detected" warning if base case aborts Product: gcc Version: 12.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: hugo_musso_gualandi at hotmail dot com Target Milestone: --- Created attachment 53734 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D53734&action=3Dedit This triggers the -Winfinite-recursion warning When I compile the attached program with -Winfinite-recursion, GCC 12.2.1 w= arns that there is infinite recursion. I expected that it should compile without warnings. I suspect that the confusion happens because the base case of the recursive function calls abort().=