Jimmy Carter actually said...
I want to be sure that if any other country is tempted to attack the United States, that they will realize that they are committing military suicide.
Context
Dolton, Illinois Remarks and a Question-and-Answer Session at a Townhall Meeting
10/15/1979