C++ function without return results in endless loop of main()

Problem description:
C++: if I create a function that should return an int (or string and probably others) but has no return statement, main is executed in an endless loop

Expected behavior:
Compiler error

Actual behavior:
Endless loop

Steps to reproduce:
Click Run

Bug appears at this link:
https://replit.com/@DavidHayes3/WelllitWingedObservation#main.cpp

Browser/OS/Device:
Chrome Version 111.0.5563.65 (Official Build) (64-bit)
Windows 11 Pro

Should throw a compiler “warning”, not “error” (I believe)

hmm after a lot of testing I can confirm that it seems that the program will rerun main everytime there’s a function that doesn’t return something. Can’t tell what’s causing that