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

            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=53734&action=edit
This triggers the -Winfinite-recursion warning

When I compile the attached program with -Winfinite-recursion, GCC 12.2.1 warns
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().
  • [Bug c/107334] New: In... hugo_musso_gualandi at hotmail dot com via Gcc-bugs

Reply via email to