Judgment unanimously affirmed. Memorandum: Defendant appeals from a judgment entered on a plea of guilty to second degree murder. Prior to entering the plea, defendant filed a notice of intent to assert the defense of mental disease or defect (Penal Law, § 30.05). Defense counsel subsequently sought a ruling on the admissibility of statements made by defendant during a psychiatric examination in the event that the insanity defense was abandoned and defendant chose to testify. The court held that defendant’s statements could be used for impeachment purposes only, as prior inconsistent statements. Defendant now attempts to challenge that ruling. Defendant is precluded from raising this issue on appeal since his guilty plea, intelligently and voluntarily entered, operated as a waiver of all nonjurisdictional defects (People v Thill, 52 NY2d 1020; People v Gilliam, 65 AD2d 533). (Appeal from judgment of Supreme Court, Erie County, Armer, J. — murder, second degree.) Present — Hancock, Jr., J. P., Doerr, Denman, Boomer and O’Donnell, JJ.