Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
runtime: emit better errors from checkptr #37488
Currently, checkptr checks for four different kinds of mistakes; two of them concerning alignment, two of them concerning pointer arithmetic. However, it only emits two different kinds of errors, one per class of mistakes. It would be helpful to know which specific kind of mistake I made. Did I ignore alignment, or did I straddle multiple objects?
Furthermore, the errors themselves can be confusing.
All good points. I'm open to improving the error messages.
I'm also wondering if "checkptr:" should change to "unsafe:" for consistency with warnings about packages runtime and sync, or if it should stay "checkptr" to make the compiler flag connection clearer.
I'm torn between the two prefixes, both have their advantage; I'm slightly leaning towards "checkptr:", because then people might not wonder as much why
Your suggestions definitely improve upon the current messages, and we'll have a whole cycle to bikeshed them to death :-)