Associate Justice Clarence Thomas wrote the Supreme Court's 5-4 opinion upholding a criminal defendant's enhanced sentence for a gun crime.