
57 Ill.2d 285 (1974)
312 N.E.2d 263
THE PEOPLE OF THE STATE OF ILLINOIS, Appellee,
v.
RUTH WALLACE et al., Appellants.
No. 45817.
Supreme Court of Illinois.
Opinion filed May 29, 1974.
*286 Robert S. Bailey, Arthur E. Engelland, and James R. Bellmann, all of Chicago, for appellants.
*287 William J. Scott, Attorney General, of Springfield, and Bernard Carey, State's Attorney, of Chicago (James B. Zagel, Assistant Attorney General, Patrick T. Driscoll, Jr., and Dennis J. O'Hara, Assistant State's Attorneys, and Frank DeBoni (Senior Law Student), of counsel), for the People.
Judgment affirmed.
MR. JUSTICE KLUCZYNSKI delivered the opinion of the court:
Following a jury trial in the circuit court of Cook County defendants, Ruth Wallace and Katie Holloway, were convicted of attempting to bribe two police officers. (Ill. Rev. Stat. 1963, ch. 38, par. 8-4.) Mrs. Wallace was sentenced to three years probation conditioned upon the first three months being served in the county jail. Miss Holloway was sentenced to the penitentiary for a term of one to two years. A privately retained counsel then filed a "Section 72 motion to void judgment and sentence" (Ill. Rev. Stat. 1967, ch. 110, par. 72) contending that the indictment was void. The circuit court denied the petition and the appellate court affirmed. (People v. Wallace, 10 Ill. App.3d 580.) We granted leave to appeal.
Two Chicago police officers seized a large sum of money from defendants and placed them in custody. As they were being transported to the police station, they proffered the money to the officers in return for their release. Their offer was rejected and defendants were charged with attempted bribery. In their section 72 petition defendants asserted that the offense of attempted bribery did not exist and, even if the offer of money had been refused, as in this case, that act constituted bribery. (Ill. Rev. Stat. 1963, ch. 38, par. 33-1.) In effect they argued that the indictment failed to charge a criminal offense. The appellate court rejected their contention reasoning that the offense of attempted bribery was statutorily recognized prior to the adoption of the statutory provisions now at issue. The appellate court held *288 that in the absence of contrary legislative intent, it would not construe section 8-4 (par. 8-4) as inapplicable to cases involving bribery. 10 Ill. App.3d at 582.
Several questions regarding the method of defendants' challenge to the validity of their indictment might exist although no party to this appeal has raised any issue related thereto. The appellate court reached the merits of defendants' contention, and possible defects in their petition will not be considered. Cf. People v. Sarelli, 55 Ill.2d 169, 171.
It is well settled that an indictment which fails to charge a criminal offense is void. (People v. Furman, 26 Ill.2d 334, 335.) As such, it does not confer jurisdiction upon a court (People ex rel. Kelley v. Frye, 41 Ill.2d 287, 290), and a conviction resulting therefrom may not be sustained (People v. Harris, 394 Ill. 325, 327; People v. Nickols, 391 Ill. 565, 571; People v. Fore, 384 Ill. 455, 458). A convicted defendant may challenge the validity of an indictment for failure to allege a criminal violation either by direct review or in collateral proceedings. People v. Edge, 406 Ill. 490, 494; People v. Buffo, 318 Ill. 380, 384.
People v. Peters, 265 Ill. 122, involved a bribery conviction under former law in which the defendant was arrested after he gave money to an agent of a State's Attorney in order to influence the conduct of a pending case. The official arranged to have the transaction witnessed and the arrest made after transfer of the funds. Defendant contended on appeal that his bribery conviction (section 31) could not be sustained under the facts and, at most, his actions constituted attempted bribery (section 32). (Hurd's Stat. 1911, ch. 38, pars. 31 and 32.) The court reasoned that enactment of the aforesaid provisions indicated that the legislature "did not intend that a person should be guilty of the offense of bribery unless the bribe was accepted." (265 Ill. at 130.) It reversed the bribery conviction because the State's Attorney had not truly accepted the money.
*289 The Peters decision was overruled in People v. Lyons, 4 Ill.2d 396. That case involved facts similar to Peters, and the statutory provisions pertaining to bribery offenses were unchanged from those considered in Peters. (Ill. Rev. Stat. 1951, ch. 38, pars. 78 and 79.) In upholding the bribery conviction under section 31 (par. 78), the court in Lyons stated at page 399, "A reasonable construction of the provisions in the light of their evident purpose requires that any person who corruptly engages in such a transaction is guilty of bribery, regardless of the motive of the other party thereto."
In 1961 our present Criminal Code was adopted. Section 8-4, in pertinent part, provides:
"A person commits an attempt when, with intent to commit a specific offense, he does any act which constitutes a substantial step toward the commission of that offense." Ill. Rev. Stat. 1963, ch. 38, par. 8-4(a).
Section 33-1 provides:
"A person commits bribery when:
(a) With intent to influence the performance of any act related to the employment or function of any public officer, public employee or juror, he promises or tenders to that person any property or personal advantage which he is not authorized by law to accept; or
*   *   *
(c) With intent to cause any person to influence the performance of any act related to the employment or function of any public officer, public employee or juror, he promises or tenders to that person any property or personal advantage which he is not authorized by law to accept." Ill. Rev. Stat. 1963, ch. 38, par. 33-1(a), (c).
Defendants contend that the general attempt provision is used in situations involving potential but incompleted violations of any section of the Criminal Code, and it has no application to cases involving a consummated offense. We do not agree.
In construing a statute the primary function is to give effect to the intent of the legislature. (People ex rel. Hanrahan v. White, 52 Ill.2d 70, 73.) Each section of the Criminal Code is to be considered in making this determination. *290 (People v. Hairston, 46 Ill.2d 348, 356, cert. denied, 402 U.S. 972, 29 L.Ed.2d 136, 91 S.Ct. 1658.) It has been further held that the Committee Comments may be an aid in ascertaining this intent. People v. Hairston, 46 Ill.2d 348, 356; People v. Touhy, 31 Ill.2d 236, 239; People v. Billingsley, 67 Ill. App.2d 292, 297.
Section 33-1 of the Criminal Code is a comprehensive statute which details various situations involving bribery. As applicable to this appeal, the offeror violates the bribery provisions of section 33-1 when he promises or tenders to a public official property the official is unauthorized to accept, with intent to influence the conduct of that official, or he promises or tenders such property to any person with the intent to have that person influence the official. (Ill. Rev. Stat. 1963, ch. 38, par. 33-1(a) and (c).) There is no explicit statutory requirement that the official accept the property in order to charge the offeror with bribery. The mere offer or promise with the requisite intent is sufficient to constitute the completed offense of bribery. This is in accord with the Lyons decision. The defendants' conduct in this case, which is comparable to the conduct in Lyons and Peters, is squarely within the prohibition of section 33-1(a).
Prior to the adoption of the present Criminal Code, conviction for an attempt necessitated that the defendant fail in his completion of the offense. (People v. Lardner, 300 Ill. 264, 267; People v. Shapiro, 299 Ill. App. 255, 259.) This requirement was established by statute. See Ill. Rev. Stat. 1959, ch. 38, par. 581.
However, it has been recognized in various jurisdictions that one may be convicted of an attempt to commit an offense even if the evidence indicates that the crime has been completed. (42 C.J.S., Indictments and Informations, sec. 299(b).) The committee commentary (par. 8-4) shows the legislative intent to abrogate the necessity that the criminal act fail as a prerequisite to prosecution for attempt. (S.H.A. (1972), ch. 38, par. 8-4, Committee *291 Comments, p. 512; see also People v. Watson, 36 Ill.2d 228, 235.) As stated in Perkins, Criminal Law (1969), at page 557, "Under the sound view an attempt to commit a crime is punishable whether the effort resulted in failure or success, although the charge and the conviction should normally be for the offense itself if evidence of consummation is clear. But since the attempt is a part of the offense itself, and the whole of necessity includes every part, it follows that one successful attempt cannot possibly support two convictions  one for the part (attempt) and the other for the whole (offense)."
The aforesaid authorities are supported by section 8-5 of the Criminal Code (Ill. Rev. Stat. 1963, ch. 38, par. 8-5), which provides that "No person shall be convicted of both the inchoate and the principal offense." The comments to this provision state that "on a trial for the successful principal offense the defendant may be found guilty, convicted and punished for either the principal offense or the lesser included offense of attempt, but not for both." (S.H.A. (1972), ch. 38, par. 8-5, Committee Comments, p. 579.) We are of the opinion that even if the evidence presented might establish the completion of the offense, as here, conviction for the lesser included offense of attempt is permissible. United States v. Fleming (D.C. Ct. App. 1966), 215 A.2d 839, 840-42.
Defendants have urged that the attempt provision (par. 8-4) does not pertain to the offense of bribery. In explaining the general attempt section it is stated, "Another point to be noted in regard to attempts is that the general attempt section (8-4) is designed to govern attempts to commit all offenses and the special attempt provisions as to individual offenses previously in the law (see Ill. Rev. Stat. 1961, ch. 38, * * * sec. [par.] 79  attempted bribery * * *) are eliminated in the Code." (S.H.A. (1972), ch. 38, par. 8-4, Committee Comments, p. 513.) This explication is clearly designed to pertain to attempts involving all offenses.
*292 We have defined an attempt as requiring the intent to commit a specific offense and some overt act which comprises a substantial step toward the commission of the offense. (People v. Elmore, 50 Ill.2d 10, 12; People v. Eveland, 43 Ill.2d 90, 93.) As recognized in the discussion of the general attempt provision, the activity that may be characterized as a substantial step is dependent upon the facts of each case. (S.H.A. (1972), ch. 38, par. 8-4, Committee Comments, p. 512.) There may exist factual situations in which the conduct of a defendant does not amount to the unlawful tender or promise of property to a public official under the bribery section (par. 33-1), yet such activity might be construed as a substantial step toward the completion of the offense. In the absence of manifest legislative intent to exclude bribery from the purview of the general attempt provision of the Criminal Code, we hold that the indictment in this instance was valid.
Accordingly, the judgment of the appellate court is affirmed.
Judgment affirmed.
