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

trigger error if an array of unknown size is being returned #190

Merged
merged 2 commits into from
Oct 7, 2017
Merged

trigger error if an array of unknown size is being returned #190

merged 2 commits into from
Oct 7, 2017

Conversation

YashasSamaga
Copy link
Member

@YashasSamaga YashasSamaga commented Sep 29, 2017

Related issues: #154 #161 #177

This PR adds code to send an error message when a user tries to return an array of unknown size in a function.

As shown in the aforementioned issues, returning arrays of unknown size can give unexpected results. This is the case as it is practically impossible to move contents of one array into another without knowing the size of the arrays.

The compiler aborts (due to a failed assertion) when an array of unknown size is being returned (unless a release build of the compiler is being used). This PR changes it to an error message.

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