I used to get that at times. It hurt to take deep breaths. Another thing that made it hurt was bending forward from the waist. They took a lung function test when I was first diagnosed. My lung capacity was over 100%
But... happily pretty much all these symptoms have left me since going gluten/dairy and grain free.

I don't know if my AS diagnosis was a misdiagnosis or whether the dietary changes are what did it.