"It is disrespectful to shout at him" = "To shout at him is disrespectful."
"Don't be so stupid as to jump off that bridge." (Don't reach the level of stupidity that would allow you to jump off that bridge)
"Don't be so careless as to lose your gloves.
"Don't be so disrespectful to people as to shout at them."