
22 Cal.App.4th 1305 (1994)
28 Cal. Rptr.2d 172
THE PEOPLE, Plaintiff and Respondent,
v.
VERNON F. MUSTAFAA, Defendant and Appellant.
Docket No. D018683.
Court of Appeals of California, Fourth District, Division One.
February 23, 1994.
*1308 COUNSEL
Anna M. Hitchcock, under appointment by the Court of Appeal, for Defendant and Appellant.
Daniel E. Lungren, Attorney General, George Williamson, Chief Assistant Attorney General, Gary W. Schons, Assistant Attorney General, Garrett Beaumont and Janelle B. Davis, Deputy Attorneys General, for Plaintiff and Respondent.
*1309 OPINION
FROEHLICH, J.
Vernon F. Mustafaa (Mustafaa) pleaded guilty to three counts of robbery (Pen. Code,[1] § 211) while personally armed with a firearm (§ 12022.5, subd. (a)) and admitted that he had been three times in possession of a firearm while a convicted ex-felon (§ 12021.1, subd. (a)). He also admitted suffering prior felony convictions of rape while armed with a firearm (§§ 261, 12022, subd. (a), 667.5, subd. (a)), robbery (§§ 211, 667.5, subd. (b)) and unlawful taking of a vehicle (Veh. Code, § 10851, subd. (a), § 667.5, subd. (b)). At the time of his plea Mustafaa stated he understood that his maximum penalty could be 25 years in prison and a $10,000 fine. The court sentenced him to a total term of 17 years, 4 months. Mustafaa appeals, claiming sentencing error.

FACTUAL AND PROCEDURAL BACKGROUND
About 4 a.m. on August 31, 1992, Mustafaa, displaying a gun, robbed a 7-Eleven store on La Jolla Boulevard.
At 7 p.m. on September 5, 1992, Mustafaa entered the Hillcrest Furniture Store, asked salesman Sau Vo about financing, then pulled out a gun and asked for money. Vo gave Mustafaa about $300 from the store, some of his own money and his credit cards. When Vo said he had no more money, Mustafaa yelled at him, then Vo ran and Mustafaa fired a shot.
At 6 a.m. on September 6, 1992, Mustafaa robbed the clerk at Phil's Chevron Foodmart, then fled, leaving his wallet behind. Mustafaa was arrested later the same day in possession of a handgun.

DISCUSSION
(1a) Mustafaa asserts the trial court erred in imposing consecutive terms for the gun-use enhancements in counts I and V, while imposing concurrent terms for the robbery convictions in the same counts. He is correct.
The sentencing court selected as the principal term the eight-year term consisting of the three-year midterm for the robbery conviction in count III plus the five-year upper term personal gun-use enhancement attached to that count. The court then considered the terms it had imposed for the convictions in counts I and V and determined to impose the terms for these robbery convictions concurrently, but to impose the terms for the corresponding personal gun-use enhancements attached to those counts consecutively. This was error.
*1310 Enhancements are defined in California Rules of Court, rule 405(c) as additional terms of imprisonment added to the base term. (2) Enhancements are of two types: those which specifically attach to the term of imprisonment imposed for an underlying offense and those which add generally to the aggregate term of imprisonment. A finding under section 12022.5, subdivision (a) that the defendant personally used a firearm in the commission of a felony is of the former type. An enhancement for personal gun use is imposed in addition and consecutive to the punishment for the specific felony of which the defendant has been convicted. Section 12022.5, subdivision (a) states in pertinent part: "... any person who personally uses a firearm in the commission or attempted commission of a felony shall, upon conviction of such felony or attempted felony, in addition and consecutive to the punishment prescribed for the felony or attempted felony of which he or she has been convicted, be punished by an additional term of imprisonment in the state prison for three, four or five years, unless use of a firearm is an element of the offense of which he or she was convicted." (Italics added.)
(1b) The procedure for sentencing a person convicted of two or more felonies does not contemplate imposing an enhancement separately from the underlying crime. Section 1170.1, subdivision (a) directs that when a court imposes consecutive terms of imprisonment for convictions of two or more felonies, the aggregate term of imprisonment for all of the convictions shall be the sum of the principal term, the subordinate term and any additional term imposed under the enhancements which add generally to the aggregate term of imprisonment: section 667, 667.5, 667.6 or 12022.1 and Health and Safety Code section 11370.2. The principal term consists of the greatest term imposed including the enhancements which attach to that particular offense: section 667.15, 667.8, 667.85, 12022, 12022.2, 12022.3, 12022.4, 12022.5, 12022.55, 12022.6, 12022.7, 12022.75, 12022.8 or 12022.9, or Health and Safety Code section 11370.4 or 11379.8. There are two types of subordinate terms. A subordinate term for each consecutive offense which is not a violent felony consists of one-third the midterm for each conviction for which a consecutive term has been imposed excluding any enhancements. The subordinate term for a violent felony offense includes one-third the midterm of imprisonment prescribed for each other such felony conviction for which a consecutive term of imprisonment is imposed plus one-third any enhancement imposed under section 667.15, 667.8, 667.85, 12022, 12022.2, 12022.4, 12022.5, 12022.55, 12022.7, 12022.75 or 12022.9.
(3) Subordinate terms include only those terms for felony convictions which have been imposed consecutively; subordinate terms for violent felonies include the terms plus their attached enhancements which have been imposed consecutively. Under the sentencing scheme an enhancement may not be imposed as a subordinate term on its own.
*1311 (1c) Mustafaa pleaded guilty to three counts of robbery and admitted that he personally used a firearm during each robbery. The personal gun-use enhancements to which he admitted were not separate crimes and cannot stand alone. Each one is dependent upon and necessarily attached to its underlying felony. In separating the felony and its attendant enhancement by imposing a concurrent term for the felony conviction and a consecutive term for the enhancement the court fashioned Mustafaa's sentence in an unauthorized manner under the sentencing procedure. We must therefore remand for resentencing.
(4) The Attorney General argues that by failing to object Mustafaa waived review of this issue on appeal. We agree with the view that a defendant waives review of error, such as a sentencing court's reasons or asserted lack of reasons for imposing an upper or consecutive term, by failing to object at the time of sentencing. (People v. Neal (1993) 19 Cal. App.4th 1114 [24 Cal. Rptr.2d 129]; People v. Scott (1993) 21 Cal. App.4th 383, 394-403 [26 Cal. Rptr.2d 501].) However, fashioning a sentence in a manner which is unauthorized by law exceeds the jurisdiction of the court and may be the subject of later review even though no objection was made in the trial court. (People v. Neal, supra, 19 Cal. App.4th at p. 1120.)
(5) The prohibition against double jeopardy, California Constitution, article I, section 15, generally prohibits the court from imposing a greater sentence on remand following an appeal. (People v. Price (1986) 184 Cal. App.3d 1405, 1408 [229 Cal. Rptr. 550].) In People v. Serrato (1973) 9 Cal.3d 753, 764 [109 Cal. Rptr. 65, 512 P.2d 289] (overruled on other grounds in People v. Fosselman (1983) 33 Cal.3d 572, 583, fn. 1 [189 Cal. Rptr. 855, 659 P.2d 1144]), our Supreme Court set out an exception to this general rule as follows: "The rule is otherwise when a trial court pronounces an unauthorized sentence. Such a sentence is subject to being set aside judicially and is no bar to the imposition of a proper judgment thereafter, even though it is more severe than the original unauthorized pronouncement." Examples of unauthorized sentences include the failure to characterize an offense and apply a permissible term of confinement (In re Ricky H. (1981) 30 Cal.3d 176, 190-192 [178 Cal. Rptr. 324, 636 P.2d 13]); the imposition of concurrent terms when the statute required consecutive terms (In re Sandel (1966) 64 Cal.2d 412, 418 [50 Cal. Rptr. 462, 412 P.2d 806]); and the failure to strike or impose an enhancement (People v. Irvin (1991) 230 Cal. App.3d 180, 192-193 [281 Cal. Rptr. 195]; see People v. Welch (1993) 5 Cal.4th 228, 235 [19 Cal. Rptr.2d 520, 851 P.2d 802]).
(6) In Mustafaa's case the rule against double jeopardy applies because the court imposed a legal aggregate sentence, only fashioning it in an *1312 unauthorized manner. The court's error in separating the convictions from their attendant enhancements, though unauthorized by law, does not make the total sentence illegal. On remand the court may not impose a total sentence more severe than the sentence originally imposed.
Because we remand for resentencing, we need not discuss Mustafaa's other claims of sentencing error. (7) However, we note that, contrary to Mustafaa's assertion, the court based the upper term for the personal firearm-use enhancement attached to count III on the valid factor that Mustafaa fired the gun. The court's reference to this factor as a basis for a consecutive term does not invalidate its use as a reason for the upper term. We reiterate our view, however, that review of this issue is waived by the failure to object in the trial court. (People v. Scott, supra, 21 Cal. App.4th at pp. 394-403; People v. Neal, supra, 19 Cal. App.4th 1114.)
(8) We also observe that the consecutive eight-month term imposed for Mustafaa's being a convicted violent ex-felon in possession of a firearm (§ 12021.1, subd. (a)) appears to be based on the same conduct as that on which the term for the personal gun-use enhancement in count V (§ 12022.5, subd. (a)) was based. At the change of plea hearing the court referred to Mustafaa's gun possession only as part of the robbery incident and not to his gun possession at the time of his arrest. Because there was no stipulation that the plea was based on the preliminary hearing or police reports, the sentence under section 12021.1, subdivision (a) violates section 654's proscription against multiple punishments for the same act or omission.[2]

DISPOSITION
The judgment is affirmed. The cause is remanded for resentencing in accordance with the views expressed in this opinion. On remand, the court shall not impose a sentence longer than 17 years, 4 months. After resentencing, the trial court shall prepare a new abstract of judgment and send a certified copy thereof to the Department of Corrections.
Kremer, P.J., and Nares, J., concurred.
NOTES
[1]  All statutory references are to the Penal Code unless otherwise specified.
[2]  The waiver doctrine does not apply to questions involving section 654. (People v. Perez (1979) 23 Cal.3d 545, 549-550, fn. 3 [153 Cal. Rptr. 40, 591 P.2d 63].)
