Skip to content

Fix possible division by zero when using -verbose #906

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

Merged
merged 1 commit into from
Jan 2, 2024

Conversation

oriyadid
Copy link
Contributor

@oriyadid oriyadid commented Dec 23, 2023

I encountered an issue where using -verbose on a pure cpp2 file causes a floating point exception, as there are zero cpp1 lines, this PR fixes it.

To reproduce you may compile this simple file (or any other pure cpp2 file) with -verbose, other flags don't matter:

main: () -> int = {
  return 0;
}

@hsutter
Copy link
Owner

hsutter commented Dec 29, 2023

Thanks for your pull request! It looks like this may be your first contribution to cppfront. I've sent the Contributor License Agreement (CLA) to your email, and once it's signed I can look at your pull request. Thanks again for your contribution.

@oriyadid
Copy link
Contributor Author

I've now signed the CLA, thanks.

@hsutter
Copy link
Owner

hsutter commented Jan 2, 2024

Thanks!

@hsutter hsutter merged commit 30c892a into hsutter:main Jan 2, 2024
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.

2 participants