Re: MSVC and GCC compilation warnings
Jure Bagić <[email protected]> Fri, 1 May 2026 07:32:59 +0200
| Newsgroups | gmane.comp.lang.lua.general |
|---|---|
| Message-ID | <afQ60jYvdhMJVNbI@archlinux> |
> Can anyone explain this warning? The recursive call is guarded by two > if's, and it calls the function with a different argument (L in the > original call, mainth in the recursive call). How can the compiler decide > that the recursion is infinite? > > More exactly: the recursive call only happens if L->errorJmp is nil. > But then it is done with a new L (mainth) which errorJmp field is not > nil. So, it seems quite easy to prove that the recursive call happens at > most once. Or am I missing something? > > -- Roberto A bug, no other way to explain it. Clang compiles without producing that warning. For anyone interested, the file responsible for this warning (I think) in the gcc source is the 'gcc/gimple-warn-recursion.cc', and in there the 'find_function_exit'. Sorry for the private email Roberto, I meant to reply in this list, I recently changed my email client and everything is broken. -- Jure -- You received this message because you are subscribed to the Google Groups "lua-l" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/lua-l/afQ60jYvdhMJVNbI%40archlinux.
signature.asc
(application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQTilOnPIAgk+VLLAS+FaQJ4QtXaNQUCafQ7CwAKCRCFaQJ4QtXa NW7NAP0e2I5W3zGbtO+b6phZKA+xByvG9HI6on/ZenmO+99KTAEA5zBVRtQw4PU0 GlS3y6mvjA8RFvOEb5YwkSFP5ewmWA8= =9b/B -----END PGP SIGNATURE-----