No, international law is very clear that if you have combatants in a typical civilian structure, you can attack it. Some civilian structures are more sensitive than others (like hospitals), and so it requires a military firing out of the hospital to be justified in attacking the hospital. For more, see the links in this article: https://medium.com/non-violence/the-critical-failure-of-the-law-of-war-the-geneva-conventions-valuing-civilians-on-both-sides-20880831710b