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

Document our use of attribute((cleanup)), and clean up code. #8

Closed
stefwalter opened this issue Nov 4, 2013 · 1 comment
Closed

Comments

@stefwalter
Copy link
Contributor

We allow ourselves the use of GCC extensions, such as attribute((cleanup)) to simplify control flow due to temporary allocations.

This should be documented, including the replacement of the common "if (error) goto out;" idiom with "if (error) return;"

Then all code should be cleaned up to use this pattern. This might need extensions to libgsystem, or a more local approach.

@stefwalter
Copy link
Contributor Author

I don't think rewriting everything to be consistent is going to happen. The use of the cleanup attribute is primarily a coding style in the backend.

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

No branches or pull requests

1 participant