Skip to content

Conversation

@michael-schwarz
Copy link
Member

It seems like there was a mistake in the specification of the library function for assert as it was marked to dereference its argument. This caused the warnings in #765.

@sim642 does this fix makes sense like this? Are there other library functions that need to be fixed as well?

Closes #765

@michael-schwarz
Copy link
Member Author

I attempted to have a test for this, but working with //NOWARN as I wanted to did not help here, as the succeeding assert produces a "warning" in itself.

Copy link
Member

@sim642 sim642 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This absolutely makes sense. I guess I must've still been in the mindset of the old specifications.
Other uses of r in these descriptions seem appropriate on actual pointer arguments.

@sim642
Copy link
Member

sim642 commented Jul 12, 2022

I attempted to have a test for this, but working with //NOWARN as I wanted to did not help here, as the succeeding assert produces a "warning" in itself.

Might be able to work around this by disabling warn.assert in this test.

@michael-schwarz michael-schwarz merged commit 95f1834 into master Jul 13, 2022
@michael-schwarz michael-schwarz deleted the issue_765 branch July 13, 2022 05:39
@sim642 sim642 added this to the v2.0.0 milestone Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spurious warning Write to unknown address: privatization is unsound. even though no write occurs

2 participants