build: make passing an incorrect pointer type a hard error
The build system change was already reviewed, and I was about to push it, but I decided to send it through the CI one more time, and r600
failed to build, so this MR is mostly about this.
@daenzer can you check if casting the problem away is the right thing to do, or if that code is actually broken and should be fixed?