For example, if I discover that a compiler has an error, would posting the question and answer to that question in the question section of the post be considered a bad thing to do in this site? Should I post the question and answer separately instead?
1 Answer
would posting the question and answer to that question in the question section of the post be considered a bad thing to do in this site?
Yes. The question is where you ask a question, not where you post an answer.
Should I post the question and answer separately instead?
Yes, just be sure that both the question and the answer are of high quality when evaluated independantly. It's not okay to ask a bad question just because you're answering it, and a bad answer isn't automatically good just because it's the question author that answered it.