
94 Ill.2d 28 (1983)
445 N.E.2d 298
THE PEOPLE OF THE STATE OF ILLINOIS, Appellant and Appellee,
v.
LARRY McCARTY, Appellee and Appellant.
Nos. 55923, 55971 cons.
Supreme Court of Illinois.
Opinion filed January 24, 1983.
*29 *30 Tyrone C. Fahner, Attorney General, of Springfield, and L. Patrick Power, State's Attorney, of Kankakee (John X. Breslin and Gerry R. Arnold, of the State's Attorneys Appellate Service Commission, of Ottawa, of counsel), for the People.
Robert Agostinelli, Deputy Defender, and Peter A. Carusona, Assistant Defender, of the Office of the State Appellate Defender, of Ottawa, for Larry McCarty.
Appellate court affirmed in part and reversed in part; circuit court reversed.
JUSTICE SIMON delivered the opinion of the court:
This is a consolidated appeal from a decision of the appellate court reversing the revocation of defendant *31 Larry McCarty's probation by the circuit court of Kankakee County.
In December 1978 defendant was charged with felony theft and tampering with a motor vehicle in connection with allegations that he stole an automobile battery. The theft of the battery would ordinarily have been a Class A misdemeanor only (Ill. Rev. Stat. 1977, ch. 38, par. 16-1(e)(1)), but the information charged defendant with Class 4 felony theft based on the theft statute's recidivist provision (Ill. Rev. Stat. 1977, ch. 38, par. 16-1(e)(1)). The charge was enhanced to a felony because of defendant's conviction in Illinois in 1970 for armed robbery. Misdemeanor theft was not charged. The defendant did not challenge the enhancement of the theft charge at the time, but pleaded guilty to felony theft in exchange for dropping the charge of tampering with a motor vehicle. The circuit court of Kankakee County accepted defendant's guilty plea on January 12, 1979, fined him $300, and sentenced him to 30 months' probation. While on probation, however, he was charged with attempted retail theft of a package of cigarettes. He pleaded guilty to this charge without assistance of counsel and on October 16, 1980, was fined $50 and sentenced to three days in jail. Four days later, the State filed a petition to revoke defendant's probation on the basis of his retail theft conviction. The circuit court heard evidence on this petition and on January 26, 1981, entered an order revoking defendant's probation. A sentencing hearing was held, and on February 26, 1981, the court imposed a sentence of two years in prison.
On appeal, defendant contended that his sentence of imprisonment was void for two reasons: first, because robbery was not a "type of theft" that can be used to enhance a misdemeanor theft to a felony theft, thus rendering void the conviction for felony theft on which his probation was based, and second, because an uncounseled *32 guilty plea could not be used to revoke a defendant's probation. The appellate court held that robbery could be used to enhance a misdemeanor theft to a felony, and noted also that even if it could not be so used, defendant waived his right to object by not appealing his felony-theft conviction when that judgment was entered in January 1979. However, it agreed with defendant that his probation could not be revoked on the basis of a guilty plea entered without the assistance of counsel absent a knowing waiver of the right to counsel, which the record, silent as to such a waiver, did not reveal. The court remanded the cause accordingly. (101 Ill. App.3d 355.) Both sides filed petitions for leave to appeal, defendant seeking to void his sentence of probation as well as the sentence of imprisonment. Both petitions were allowed.
The enhancement provision of the Illinois theft statute reads:
"(e) Sentence.
(1) Theft of property, other than a firearm, not from the person and not exceeding $150 in value is a Class A misdemeanor. A second or subsequent offense after a conviction of any type of theft, including retail theft, other than theft of a firearm, is a Class 4 felony." (Emphasis added.) (Ill. Rev. Stat. 1977, ch. 38, par. 16-1(e)(1).)
To be eligible for enhancement to a felony, a misdemeanor theft must occur after the defendant has been convicted of "any type of theft." Theft, like all crimes recognized by the law of this State, is a term of art which is specifically defined by a statute (see, e.g., section 1-3 of the Criminal Code of 1961 (Ill. Rev. Stat. 1977, ch. 38, par. 1-3)).
Part C of title III of the Criminal Code of 1961 covers various enumerated "Offenses Directed Against Property." Article 16 under part C, which is entitled "Theft and Related Offenses," defines various types of theft along with article 16A, which defines retail theft. The enhancement provision involved in this case appears in article 16. Deception, *33 robbery, burglary, arson, damage and trespass to property, residential picketing, and interference with a public institution of higher education, all offenses against property, are defined in sections of part C subsequent to those entitled theft (see articles 17 through 21 and articles 21.1 and 21.2). Article 16 defines theft as occurring when one "knowingly" obtains or exerts unauthorized control over property of the owner, obtains control of such property by deception or by threat, or obtains control of property which he knows to be stolen and intends to keep from its owner. Article 18 defines robbery as occurring when one "takes property from the person or presence of another by the use of force or by threatening the imminent use of force" (Ill. Rev. Stat. 1977, ch. 38, par. 18-1); armed robbery, the initial crime in this case, is the commission of robbery while "armed with a dangerous weapon" (Ill. Rev. Stat. 1977, ch. 38, par. 18-2). Theft and robbery are defined in two different articles of the "Offenses Directed Against Property" section of the Criminal Code of 1961, and they are two different crimes as defined. Theft requires knowledge that the taking is unauthorized and an intent to permanently deprive the owner of the use or benefit of the property (e.g., People v. Hargrave (1975), 29 Ill. App.3d 89; People v. Wilson (1974), 23 Ill. App.3d 457, 460), while robbery requires no similar showing of intent (People v. Banks (1979), 75 Ill.2d 383, 388-92; People v. Tyllas (1981), 96 Ill. App.3d 1, 3). The essence of the one crime is not the essence of the other: theft is an intended, unauthorized deprivation of the benefit or use of property, while robbery is the use of force in the taking of property, regardless of intent or the anticipated duration of the taking.
Further support for the view that the Criminal Code of 1961 does not include robbery as a "type of theft" emerges from the committee comments to article 16. These reveal that article 16 was meant to place under one *34 heading the various offenses against property which were essentially so similar that their coexistence served only to confuse litigants.
"Formerly, in Illinois, there were some seventy-four separate sections which dealt in one form or another with the obtaining of property of another with the intent to permanently deprive such other or the true owner of the property or its beneficial use. All lawyers and judges are too familiar with the highly technical differences between larceny, larceny by trick, embezzlement, false pretenses, confidence game, and the many variations to require detailed comment. Suffice to say that, with the exception of robbery, burglary, arson, and criminal damage and trespass to property, which are covered respectively in Articles 18, 19, 20 and 21, the Committee intended to codify the entire range of offenses against property into Articles 16 and 17, and to abolish completely the labels and highly technical distinctions which had developed through centuries of case law and statutory amendments. * * *
Because of the special characteristics of the stolen commodity, and the practical problems of knowledge and intent involved, the theft of lost or mislaid property, and of labor, services or the use of property, are dealt with separately in sections 16-2 and 16-3. However, it should be noted that these offenses are also Theft.

All other forms of theft are included in section 16-1 except the special deceptive practices proscribed by Article 17." (Emphasis added.) (Ill. Ann. Stat., ch. 38, art. 16, Committee Comments, at 18 (Smith-Hurd 1977).)
Thus while theft and robbery have the common element of a wrongful taking of property and may be viewed by laymen as different forms of the same crime, "robbery" as defined by the legislature is not a "type of theft," but a separate crime against property. To construe robbery as a "type of theft" for the purposes of enhancement under section 16-1(e)(1) would ignore this definition and the various cases mentioned earlier, which view robbery and theft as involving different states of mind. At the very least, it would violate the principle that ambiguities in penal statutes, *35 particularly in the case of enhancement provisions, must be resolved in favor of the defendant (People v. Hobbs (1981), 86 Ill.2d 242; People v. Haron (1981), 85 Ill.2d 261, 277-78; People v. Lund (1943), 382 Ill. 213, 215-16; People v. Carlock (1981), 102 Ill. App.3d 1100).
We acknowledge that Illinois courts have held that robbery is a "type of theft" for purposes of the enhancement provision of section 16-1(e)(1) of the Criminal Code of 1961. In People v. Ferrara (1969), 111 Ill. App.2d 472, cert. denied (1970), 398 U.S. 927, 26 L.Ed.2d 89, 90 S.Ct. 1815, the appellate court held that robbery was an enhancing crime of theft inasmuch as it was viewed as an aggravated form of theft and "may also" be regarded as a crime of which theft is a lesser included offense (111 Ill. App.2d 472, 479). However, the continuing validity of Ferrara is questionable in light of subsequent developments in the law. Theft is not generally viewed as a lesser included offense of robbery in this State. (See People v. Kimble (1980), 90 Ill. App.3d 999 (stressing the fact that a person without the required mental state can be guilty of robbery but not of theft); People v. Baker (1979), 72 Ill. App.3d 682; People v. Yanders (1975), 32 Ill. App.3d 599; contra, People v. Romo (1980), 85 Ill. App.3d 886; People v. Beck (1976), 42 Ill. App.3d 923.) More importantly, People v. Banks (1979), 75 Ill.2d 383, decided by this court 10 years after Ferrara, culminated a period of uncertainty as to the mental state required for robbery. (See, e.g., People v. Berlin (1971), 132 Ill. App.2d 697 (specific intent not an element of robbery); People v. Marshall (1968), 96 Ill. App.2d 124 (same); People v. Bray (1964), 52 Ill. App.2d 384 (same); contra, People v. White (1977), 67 Ill.2d 107 (intent to deprive is an element of robbery); People v. Howell (1973), 11 Ill. App.3d 391, 393 (same); People v. Ware (1961), 23 Ill.2d 59 ("felonious" intent is required for robbery).) People v. White, the first case in this court to address the question of whether robbery as defined by the *36 Criminal Code of 1961 required the specific intent to deprive the owner or possessor of property, held that it did. Two years later, this holding was overruled in People v. Banks (1979), 75 Ill.2d 383, 392; the rule of the Banks case is that the State need not show intent to deprive in prosecuting for robbery, as it must in prosecuting for theft. Had the definitive pronouncement of Banks been available to the court in Ferrara, that court could not plausibly have concluded that robbery is a "type of theft," aggravated or otherwise. We therefore conclude that the appellate court erred insofar as it held, relying upon Ferrara, that robbery is an aggravated form of theft capable of enhancing a misdemeanor theft to a felony.
The State argues that it is anomalous for a recidivist statute to use crimes such as larceny and retail theft for enhancement purposes but ignore "more serious" crimes such as armed robbery. To the contrary, we find nothing strange in such a scheme. The legislature may very well have considered repeat offenders whose crimes increase in seriousness or are simply repeated to be more of a threat to society than offenders whose crimes become less serious or less violent with time. Although the legislature could rationally have held a different view, a court's power is limited to interpreting the effect of the recidivist provision as it is written; it should not rewrite it to include what is not in it. See, e.g., People v. Haron (1981), 85 Ill.2d 261, 266-68; People v. Lund (1943), 382 Ill. 213, 215-16; Belfield v. Coop (1956), 8 Ill.2d 293, 307.
The State contends, and the appellate court held, that even if armed robbery is not a "type of theft" for enhancement purposes, defendant waived his right to raise that point in this proceeding by his failure to object to the sentence for felony theft when it was imposed (People v. Stueve (1977), 66 Ill.2d 174). The Stueve line of cases recognizes that certain irregularities at trial or sentencing are not waived by failure to object in timely or procedurally *37 correct fashion. (See, e.g., People v. Roberts (1979), 75 Ill.2d 1, 11 (citing Supreme Court Rule 451(c) (73 Ill.2d R. 451(c)), which provides that "substantial defects [in jury instructions in criminal cases] are not waived by failure to make timely objections thereto if the interests of justice require"); People v. Pickett (1973), 54 Ill.2d 280, 283 (court may consider errors not properly preserved for review if the evidence is closely balanced).) In Stueve the court ruled that since the question of the propriety of two judgments entered by the trial court had not been properly presented to the appellate court, that court could not review them "unless they were void" (66 Ill.2d 174, 178). Recent decisions of this court have held to be void, and hence not waived by failure to object in proper fashion, a conviction that occurred pursuant to a statute later ruled unconstitutional (People v. Wagner (1982), 89 Ill.2d 308, 311), an order of probation which did not specify the duration of the probation (In re T.E. (1981), 85 Ill.2d 326), and an order of supervision which failed to specify its duration (In re R.R. (1982), 92 Ill.2d 423). See also People v. Edge (1950), 406 Ill. 490 (conviction based on indictment which failed to allege facts sufficient to charge any offense at all held void).
The basis for the plain-error holdings in Wagner, T.E., R.R., and Edge was that a conviction or an order significantly restricting the liberty of a defendant must have statutory authorization and is a nullity otherwise. (See, e.g., In re T.E. (1981), 85 Ill.2d 326, 336.) In this case the existence of statutory authority for a conviction for felony theft depended on whether armed robbery is an enhancing crime of theft under section 16-1(e)(1) of the Criminal Code of 1961. Since we hold that it is not, this case falls within the rule of Wagner, T.E., R.R., and Edge. The sentence of probation based on a charge of felony theft was void and could be attacked collaterally, as in those cases.
The State maintains that defendant nonetheless waived *38 his defense to the felony-theft charge because he voluntarily and intelligently pleaded guilty to the charge and received the dismissal of a second, misdemeanor count as the benefit of his bargain. It cites People v. Stanley (1972), 50 Ill.2d 320, for the proposition that a voluntary guilty plea waives all irregularities in the information, conviction, or sentencing that are not jurisdictional in nature, and People v. Bettice (1975), 34 Ill. App.3d 689, and People ex rel. Bassin v. Isreal (1975), 31 Ill. App.3d 744, for the rule that a defendant who enters a negotiated guilty plea loses the power to attack the charge to which he has pleaded guilty once he receives the benefit of his bargain.
Perhaps, as the State suggests, there is nothing jurisdictionally deficient about a judgment of conviction which is entered despite the failure of the information or indictment to allege all the elements of the offense charged where the same offense could have been validly charged on the facts alleged and all that remained for the State to do was to specify the details of the accusation. (See People v. Rege (1976), 64 Ill.2d 473, 478; People v. Gilmore (1976), 63 Ill.2d 23, 26; but see People v. Barker (1980), 83 Ill.2d 319, 333, 339 (Moran, J., dissenting); People v. Pankey (1983), 94 Ill.2d 12, 20 (Moran, J., specially concurring).) However, that is not the issue before us. There can be no doubt that jurisdiction is lacking where the circumstances alleged do not constitute the offense charged as it is defined in the statute and nothing short of alleging entirely different facts could cure the defect. In this case nothing the State could have changed in the technical wording of the information would have produced a valid charge of felony theft. A conviction entered in such a case exceeds the statutory and constitutional authority which determine the subject matter jurisdiction of a court in a criminal case. (See Ill. Rev. Stat. 1977, ch. 38, par. 1-5(a) (a person is subject to prosecution for an "offense" which he commits within the State); Ill. Rev. Stat. 1977, ch. 38, par. 1-3 (no *39 conduct except criminal contempt constitutes an offense unless it is described as such in a statute of this State); People v. Gilmore (1976), 63 Ill.2d 23, 26-27.) Subject matter jurisdiction cannot be conferred by a guilty plea if it does not otherwise exist.
The guilty plea must confess some punishable offense to form the basis of a sentence. "`The effect of a plea of guilty is a record admission of whatever is well alleged in the indictment. If the latter is insufficient [the plea] confesses nothing.'" Klawanski v. People (1905), 218 Ill. 481, 484; see also People v. Gregory (1974), 59 Ill.2d 111, 112; People v. Wallace (1974), 57 Ill.2d 285, 288; People v. Furman (1962), 26 Ill.2d 334, 335; People v. Nickols (1945), 391 Ill. 565, 570-71.
Again, we stress that the error complained of here is not a procedural irregularity, as in Gilmore, Stanley, and People v. Brown (1969), 41 Ill.2d 503, but an error of law by the trial court involving the substantive reach of the criminal statute invoked in the information. The record reveals that the trial judge informed the defendant that he had found a factual basis for the felony-theft charge, and that in a colloquy the defense counsel informed the trial judge that, because of the judge's ruling in another case, he was satisfied that any challenge to using robbery as an enhancing offense for theft would be unsuccessful. Nowhere did the trial judge appear to question whether there was a factual basis for the statutory charge, as "substantial compliance" with Supreme Court Rule 402(c) (73 Ill.2d R. 402(c)) demands. The fact that robbery is set forth in a different section from theft and the enhancement provision which is a part of the theft section should have put him on notice that at the very least there was an ambiguity in the enhancement provision which would have to be resolved in defendant's favor. Failure to make any such inquiry as to the legal basis for the charge was an error affecting substantial rights of the defendant, and it should remain open *40 for review. 73 Ill.2d R. 615(a).
For similar reasons, we cannot say that because defendant has received the "benefit" of his plea bargain he has forfeited his right to challenge the legal foundation of the charge to which he pleaded guilty. Negotiations between the State and a defendant cannot confer jurisdiction where none exists, as we have already noted, even though the defendant may gain some advantage from those negotiations. In In re T.E. we held that where original probation orders are void, they "are subject to collateral attack in a later appeal from the order of revocation." (85 Ill.2d 326, 335.) It is our opinion that defendants have the right to raise collaterally, at least in appeals from orders revoking probation, the question of the propriety of the order of probation when it was imposed on a guilty plea which was accepted because of a mistake of law on the part of the trial judge as to the basis of the charge to be admitted.
Since defendant could not have been convicted of felony theft for taking the automobile battery, the order of probation based on the conviction was void; the two-year prison sentence based on revocation of this probation was likewise of no effect. In re R.R. (1982), 92 Ill.2d 423, 430; People v. Williams (1981), 87 Ill.2d 161, 167.
Accordingly, the appellate court is affirmed insofar as it reversed the circuit court. In view of our conclusions, we need not consider whether defendant was denied the right to counsel, and no remand to the circuit court is necessary. The appellate court is reversed insofar as it remanded the cause. The judgment of the circuit court is reversed.
Appellate court affirmed in part and reversed in part; circuit court reversed.
