How does TurboTax handle 529 withdrawals that are: 1. Not for educational purposes, but 2. Not penalized because the plan beneficiary attends a US Service Academy?

How does TurboTax handle withdrawals from 529 Plans that are: (1) not for educational purposes, but (2) not subject to the 10% tax penalty because the plan beneficiary is (a) attending a US Service Academy, and (b) the amount withdrawn does not exceed the cost of advanced education?  Statutory references are:
26 USC 529(c)(6)
26 USC 530(d)(4)(B(iv))
10 USC 2005(d)(3)