Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect undefined variables and return values with UVGs #720

Merged
merged 12 commits into from
Feb 5, 2025
Merged

Detect undefined variables and return values with UVGs #720

merged 12 commits into from
Feb 5, 2025

Conversation

Akuli
Copy link
Owner

@Akuli Akuli commented Feb 3, 2025

Fixes #3 (lol)
Fixes #566

Marking as draft for now, because compiling the compiler with itself creates a lot of warnings from correct code. The problem is that match statement doesn't invoke UB if you match over an enum that is out of range, so the compiler assumes it can happen every time you match over an enum.

@Akuli Akuli marked this pull request as ready for review February 5, 2025 01:27
tests/should_succeed/return_none.jou Outdated Show resolved Hide resolved
compiler/builders/uvg_builder.jou Outdated Show resolved Hide resolved
compiler/builders/uvg_builder.jou Outdated Show resolved Hide resolved
doc/compiler_internals/uvg.md Outdated Show resolved Hide resolved
@Akuli Akuli merged commit 839707c into main Feb 5, 2025
39 checks passed
@Akuli Akuli deleted the undef branch February 5, 2025 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Undefined value warnings/errors No compile error, if you forget return
1 participant