
245 S.E.2d 258 (1978)
Calvin Lane GIBSON
v.
Sheriff Lee BECHTOLD.
No. 14148.
Supreme Court of Appeals of West Virginia.
June 6, 1978.
David M. Finnerin, Parkersburg, for relator.
Chauncey H. Browning, Jr., Atty. Gen., William D. Highland, Asst. Atty. Gen., Charleston, for respondent.
McGRAW, Justice:
The sole question presented by this habeas corpus proceeding is whether the 1977 amendments to our juvenile law relating to the juvenile jurisdiction of circuit *259 courts[1] are applicable to acts allegedly committed prior to the effective date of such amendments. We conclude they are and reverse.
The principal facts are not in dispute and can be briefly summarized. Relator was indicted on July 11, 1977, on a charge of armed robbery allegedly committed in February of 1977. At the arraignment on July 15, 1977, relator moved the circuit court to assume juvenile jurisdiction of the case on the ground that relator was a child and only 15 years of age. The circuit court overruled the motion on the theory that the juvenile court has no jurisdiction over a capital offense such as armed robbery and exceptions were duly taken. Relator then entered a plea of not guilty, the case was set for trial, and the relator was remanded to jail. On November 15, 1977, the circuit court granted relator's motion to withdraw his former plea, accepted a guilty plea to a reduced charge of grand larceny, and relator moved for probation. On December 12, 1977, the relator appeared before the circuit court for sentencing and renewed his motion to remand the case to the juvenile division, which motion was again denied subject to an exception on the ground that the 1977 amendments to the juvenile law, which became effective subsequent to the date of the alleged offense but prior to indictment, did not apply "retroactively" to the relator. Thereupon, the court deferred judgment and ordered the relator committed to the Department of Corrections for diagnostic evaluation and granted a 90-day stay of execution of the commitment order to permit the relator to seek relief in this Court.
On February 20, 1978, this Court granted relator's pro se application for a writ of habeas corpus and appointed counsel to represent the relator in this proceeding. Thereafter, an amended petition was filed containing as an exhibit a birth certificate of the relator supporting the claim that at the time of the alleged offense relator was only 15 years of age. Relator contends he has a right to be treated as a juvenile, because the jurisdictional amendments to the juvenile laws of this state are applicable to pending cases.
The respondent, in its answer to the amended petition, admits the allegations contained therein and confesses error. While confessions of error by the state do not automatically entitle a party to a reversal, State v. Cokeley, W.Va., 226 S.E.2d 40 *260 (1976), we are convinced that the error confessed in this proceeding is supported by law and constitutes grounds for relief.
In the 1977 regular session of the Legislature, substantial revisions were made in this state's juvenile delinquency law, in many instances providing increased protection for children charged with acts which, if committed by an adult, would be subject to punishment by the criminal law. The particular sections of the law under review here, when read in pari materia, made drastic alterations in the responsibility of children for the commission of capital offenses. Under prior law, it was settled that juveniles were subject to criminal liability for capital offenses; that is, crimes punishable by either death or life imprisonment, and that once a circuit court obtained jurisdiction over such a case, there was no requirement that it be certified to the juvenile division because the juvenile court was expressly denied jurisdiction over capital offenses. Lycans v. Bordenkircher, W.Va., 222 S.E.2d 14 (1975); State ex rel. Campbell v. Wood, 151 W.Va. 807, 155 S.E.2d 893 (1967); State ex rel. Hinkle v. Skeen, 138 W.Va. 116, 75 S.E.2d 223 (1953). But as suggested by an earlier pronouncement of this Court,[2] under the 1977 amendments a child under the age of 16 cannot be punished as an adult for the commission of a capital offense.
Relator contends that this state's savings statute for criminal offenses[3] is applicable to the present factual circumstance. We disagree. First, this statute was designed to change the common law rule that once a criminal law was repealed it no longer existed and no further convictions could be had under it. There has been no revision to the armed robbery statute of this state under which relator was charged nor has it been repealed. Secondly, this statute was enacted long before this state first enacted child welfare laws. This, without more, is sufficiently persuasive to warrant the conclusion that this statute was not intended to and has no bearing on this case.
One of the decisions of this Court applying this statute, however, sets forth and adopts principles which at least indicate if not compel the conclusion that the relator is entitled to the benefits of the new juvenile law. In State v. Strauder, 8 W.Va. 686 (1874), the defendant was indicted for murder but prior to trial a new law was enacted affording persons charged with a felony the right to a preliminary hearing before the county court. This legislation stated, in pertinent part, that "Before any person, charged with a felony, is tried . . . he shall be examined. . . ." The defendant's motion for an examination before the county court was overruled, and the case proceeded to trial wherein the defendant was convicted and sentenced to death.
The Strauder court, finding the language of the act to be clear and unambiguous and by its terms applicable to any person charged with a felony regardless of when the offense was committed, reversed the conviction for the denial of the statutory right to a preliminary hearing. That court also relied on decisions of Virginia's highest court. The first case held that a statute regulating the summoning of jurors for criminal trials was applicable to all trials occurring after its passage,[4] while the *261 second case held that a rule providing for complete discharge of a prisoner for the failure of the government to try him within three terms of court was applicable to all criminal cases even those involving offenses committed prior to the enactment of such rule.[5]
In each of the foregoing decisions, important statutory protections and benefits enacted into law after an alleged criminal act was committed were held applicable to criminal defendants. We apprehend no sufficient reason in law that dictates withholding the manifold protections contained in the 1977 juvenile law from this relator. A "child" is defined in the 1977 revisions to the child welfare law as meaning "any person under eighteen years of age." W.Va. Code § 49-1-2 [1977]. This and other broad provisions set forth in footnote 1 literally apply to any child. The language therein clearly applies to all persons under eighteen years at the time of the alleged offense and is not limited to children who allegedly committed criminal offenses after the 1977 provisions became law.
There is a further and equally important reason why the 1977 amendments to our juvenile laws are applicable to this relator. As discussed earlier, the responsibility of children for the commission of capital crimes has been significantly altered.[6] The juvenile jurisdiction of circuit courts over juvenile delinquents under sixteen years of age is now essentially exclusive. Children under sixteen years of age can no longer be punished as an adult but must be protected and rehabilitated. So it is that, although the 1977 changes in the juvenile law relating to jurisdictional matters did not expressly repeal the existing provisions, they are wholly inconsistent therewith. In addition, it is manifest that the 1977 revisions effected fundamental changes in juvenile proceedings and was intended as a substitute for all previous law pertaining to this subject matter. Several rights accorded juveniles by these provisions are of constitutional magnitude. We thus conclude that the legal effect of the 1977 amendments was to repeal our prior law with respect to juvenile delinquency proceedings under the well-established rule that "[A] subsequent statute, which revises the entire subject matter of a former statute and which is evidently intended as a substitute for such former statute, operates to repeal the former statute, even though such subsequent statute does not contain express words to that effect." Syl. pt. 3, Woodring v. Whyte, W.Va., 242 S.E.2d 238 (1978), quoting, syl. pt. 1, State v. General Daniel Morgan Post No. 548, Veterans of Foreign Wars, 144 W.Va. 137, 107 S.E.2d 353 (1959).
Accordingly, the 1977 law governs, and the circuit court was without jurisdiction to proceed against the relator. Objections going to the jurisdiction of the circuit court were timely and sufficiently advanced, and a guilty plea does not constitute a waiver of jurisdictional defects. Call v. McKenzie, W.Va., 220 S.E.2d 665 (1975). Since the circuit court was without criminal jurisdiction over the relator, he is being illegally restrained of his liberty and is to be released from confinement forthwith.
Writ awarded.
NOTES
[1]  The statutory provisions governing the juvenile jurisdiction of circuit courts, effective 90 days from passage on April 5, 1977, are as follows:

(a) W.Va.Code § 49-1-2 [1977] defines the term "Child" to mean "any person under eighteen years of age."
(b) W.Va.Code § 49-1-4(1) [1977] defines "Delinquent child" as a child, "Who commits an act which would be a crime under state law or a municipal ordinance if committed by an adult punishable by confinement in the county jail or imprisonment;"
(c) W.Va.Code § 49-5-1(a) [1977] provides that:
The circuit court of the county shall have original jurisdiction in proceedings brought under this article.
If during a criminal proceeding against a person in any other court it shall be ascertained or shall appear that the person was under the age of eighteen years at the time of the alleged offense, such court, judge or magistrate shall immediately certify the case to the circuit court by transferring it with all the papers, documents and testimony connected, and the circuit court shall assume jurisdiction of the case in the same manner as cases originally instituted in the circuit court by petition . . . .
(d) W.Va.Code § 49-5-2 [1977] states, in pertinent part:
A person subject to the provisions of this article may be brought before the circuit court by the following means and no others:
(a) By juvenile petition praying that the child be adjudged neglected or delinquent;
(b) By certification from any other court before which such child is brought charged with the commission of a crime, as provided in section one [§ 49-5-1] of this article; or
(c) By warrant issued by a judge or referee returnable to the circuit court, charging a child with an act of delinquency.
See also W.Va.Code §§ 49-5-9, 10 [1977] which set forth the procedures to be followed in transferring a child over the age of sixteen years, charged with what would be a felony offense if committed by an adult, to the criminal jurisdiction of the circuit court. No provision is provided for transferring a child under the age of sixteen from the juvenile jurisdiction to the criminal jurisdiction of the circuit court.
[2]  Footnote 2 of State ex rel. Smith v. Scott, W.Va., 238 S.E.2d 223 (1977).
[3]  W.Va.Code § 2-2-8, saving the right of the state to proceed against persons who allegedly committed offenses under a law subsequently repealed, Carlton v. Herndon, 81 W.Va. 219, 94 S.E. 131 (1917):

The repeal of a law, or its expiration by virtue of any provision contained therein, shall not affect any offense committed, or penalty or punishment incurred, before the repeal took effect, or the law expired, save only that the proceedings thereafter had shall conform as far as practicable to the laws in force at the time such proceedings take place, unless otherwise specially provided; and that if any penalty or punishment be mitigated by the new law, such new law may, with the consent of the party affected thereby, be applied to any judgment pronounced after it has taken effect. 1849 W.Va. Acts, ch. 16 § 18.
[4]  Perry v. Commonwealth, 44 Va. (3 Grat.) 632 (1846).
[5]  Commonwealth v. Adcock, 49 Va. (8 Grat.) 661 (1851).
[6]  We are aware that the Sixty-Third Legislature at its regular session made substantial revisions to the law governing the juvenile jurisdiction of circuit courts by amending and reenacting several sections of Chapter 49, Article 5 of the W.Va.Code on March 11, 1978, effective ninety days from passage. 1978 W.Va. Acts ch. 14.
