The IDF revealed on Friday, what it described as intelligence showing a Hamas command center located under a the Shifa Hospital in Gaza City. In a briefing, Rear Admiral Daniel Hagari told members of the foreign press corps that there are areas in the hospitals that are used by Hamas to direct its military operations.
By the rules of war? Yes, absolutely. You could even make an argument that the Geneva Convention would encourage the bombing of this hospital as a way to deter future actors from attempting a similar war crime.