
163 Cal.App.3d 908 (1985)
210 Cal. Rptr. 43
THE PEOPLE, Plaintiff and Respondent,
v.
LELAND SMITH, Defendant and Appellant.
Docket No. 13351.
Court of Appeals of California, Third District.
January 18, 1985.
*909 COUNSEL
Mark Hagiya, under appointment by the Court of Appeal, and Richard K. Uno for Defendant and Appellant.
John K. Van de Kamp, Attorney General, Eddie T. Keller and Raymond L. Brosterhous II, Deputy Attorneys General, for Plaintiff and Respondent.
[Opinion certified for partial publication.[*]]
*910 OPINION
ROBIE, J.[*] 

INTRODUCTION
A jury found the defendant guilty of robbery (Pen. Code, § 211)[1] and burglary (§ 459); the jury also found true a special allegation that defendant was armed with a firearm (§ 12022, subd. (a)) during the commission of the burglary. The jury found that defendant did not use a firearm during the commission of robbery, as alleged. (§ 12022.5.) The court imposed the upper term of five years for robbery. The court also imposed the middle term of two years for burglary and one year for its enhancement, both to run concurrent to the robbery sentence. The aggregate term was five years. The defendant appeals contending: (1) the court erred in failing to grant his motion to suppress certain evidence (§ 1538.5); (2) the evidence is insufficient to support the verdicts; (3) the punishment for being armed with a firearm is barred by section 654; and (4) the court erred in imposing the upper term for robbery. We agree with (3) and shall direct the judgment be modified. As to the other contentions, we disagree and shall affirm.

TESTIMONY AT THE SUPPRESSION HEARING[]
.... .... .... .... .... .... .

EVIDENCE PRESENTED AT TRIAL
Jose Hernandez was working as a bartender in Ortega's Bar in Sacramento during the early morning hours of May 18, 1982. A young Hispanic male and two male Indians entered; the younger individual had a hunting knife. Codefendant Lewis carried a handgun.[2] After the three men entered the defendant demanded money in English and Spanish. Lewis held the gun to the victim's head and the defendant pointed his gun at a customer's back. The young man with the knife took about $500 from the register and a bottle of Bacardi rum.
*911 The victim described the defendant as wearing blue clothes, woman's nylon hose over his face and a blue handkerchief with white specks tied around his head. The victim had seen the defendant and Lewis in the bar the previous evening. When the robbers left, the victim did not hear any cars drive away; the victim then immediately called his employer.
The initial broadcast reporting the robbery, heard by Officer Garner, included a description of the robbers. Garner saw a trio that matched the description broadcast enter the apartment building at 609 14th Street. The youngest of the three was detained and a bottle of rum in his possession was confiscated, three-quarters full. Other officers joined Garner to attempt to locate the suspects. Finally, a number of officers gathered at the door of apartment number 6. After loudly knocking on the door without response, and after hearing scuffling noises inside, the officers kicked in the door.
Inside the apartment officers found the defendant, codefendant Lewis and a juvenile, as well as a levi jacket, rolled and loose coins, and a clip from a .25 caliber automatic; hanging from the jacket was a woman's nylon stocking. They also discovered three live .25 caliber cartridges. A .25 caliber automatic handgun was found under a mattress in the bedroom. The victim was brought to the scene and identified Lewis after the search.
The victim identified the automatic pistol used by Lewis, the levi jacket, a roll of coins bearing bank identification, and the nylon stocking found in the apartment with the defendant.
It was stipulated that the fingerprints of the Hispanic juvenile found in the apartment matched those found on the till of Ortega's Bar.

DISCUSSION

I[*]
.... .... .... .... .... .... .

III
(1a) The defendant contends that the court violated section 654[5] in imposing a one-year term as an enhancement pursuant to section 12022, subdivision *912 (a), for being armed with a firearm during the commission of the burglary. The defendant argues that robbery was the felony upon which the burglary was predicated and that being armed with a firearm is an element of robbery.
(2) We find no merit in the defendant's argument because we have not the slightest doubt that being armed with a firearm is not an element of robbery. (In re Anthony H. (1980) 108 Cal. App.3d 494, 499 [166 Cal. Rptr. 607].)
However, the Attorney General conceded in oral argument that punishment for both robbery and burglary is inappropriate because "[this] robbery is simply an assaultive version of theft with the same underlying intent...." (People v. Prysock (1982) 127 Cal. App.3d 972, 1004 [180 Cal. Rptr. 15].) (3) It is settled law that section 654 bars punishment for both burglary and robbery where the sole purpose of the burglary was to effectuate the robbery. (People v. Jones (1962) 211 Cal. App.2d 63, 73, 74 [27 Cal. Rptr. 429]; Downs v. State of California (1962) 202 Cal. App.2d 609, 614-615 [20 Cal. Rptr. 922]; and see People v. McFarland (1962) 58 Cal.2d 748, 760 [26 Cal. Rptr. 473, 376 P.2d 449].) We believe the facts of the instant case fall squarely within the rule.
(1b) Nevertheless, the Attorney General contended in oral argument that the stay to be imposed by application of section 654 should not include the burglary enhancement.
In addressing this contention, we first shall discuss the nature of the enhancement provided in section 12022, subdivision (a).[6] The roots of this statute go back to enactment of the "Deadly Weapons Act." (Stats. 1923, ch. 339, p. 695.) The original statute provided, in part: "If any person shall commit or attempt to commit any felony within this state while armed with any ... pistol, revolver or other firearm capable of being concealed upon the person, ... upon conviction of such felony or of an attempt to commit such felony, he shall in addition to the punishment prescribed for the crime of which he has been convicted, be punishable by imprisonment in a state prison for not less than five nor for more than ten years. Such additional period of imprisonment shall commence upon the expiration or other termination of the sentence imposed for the crime of which he stands convicted and shall not run concurrently with such sentence."
*913 Our Supreme Court considered this statute in 1944 in In re Shull (23 Cal.2d 745 [146 P.2d 417]). In that case, the court held that the increased punishment (which is now included in § 12022)[7] was not applicable to a conviction of assault with a deadly weapon (§ 245) where being armed was a "necessary element of the offense." It reasoned that the assault statute "... defines and determines the punishment for a specific kind of a crime, ... On the other hand, [the] section ... which imposes the additional penalty refers to no particular crime, but purports to require an added punishment for felonies generally where the one committing the same is armed...." "It is not unreasonable to suppose that the Legislature believed that for felonies in which the use of a gun was not one of the essential factors, such as rape, larceny, and the like, an added penalty should be imposed by reason of the fact that the defendant being armed with such a weapon would probably be more dangerous because of the probability of death or physical injury being inflicted by the weapon. Hence, such a condition would be reasonable grounds for increasing the penalty .... Thus, using the illustration of burglary, it relates to the offense of burglary for which the defendant is arrested, prosecuted and convicted." (Id., at pp. 750-751; italics added.)
(4), (1c) The same reasoning has been applied to a similar enhancement in section 12022.5.[8] As our Supreme Court recently observed, "California courts have consistently stated that `section 12022.5 does not prescribe a new offense but merely additional punishment for an offense in which a firearm is used'." (People v. Wolcott (1983) 34 Cal.3d 92, 100 [192 Cal. Rptr. 748, 665 P.2d 520].) The only essential difference between the two enhancement statutes is that one deals with a defendant "armed" with a firearm and the other deals with a defendant who "uses" a firearm.
We conclude that section 12022, subdivision (a), does not set forth a separate offense but rather constitutes additional punishment for an offense for which a person is convicted and to which it applies.
We next must examine section 1170.1, subdivision (d), relating to the imposition of enhancements.[9] Under this subsection, the "additional term" *914 provided in section 12022 (and which, in fact, is "punishment" for the underlying offense) shall be imposed when the court "imposes a prison sentence" for a felony. Thus, one cannot be punished for the enhancement separately from the underlying offense.
The effect of section 654 is to limit the "punishment" for an act subject to its provisions and, thus, in the instant case, the defendant may not be punished for burglary.[10] When the sentence for the underlying offense of burglary is stayed, no "punishment" is imposed. (People v. Avila, supra, 138 Cal. App.3d at p. 877.) Therefore, in this case, the defendant may not be "punished" for the enhancement. It also must be stayed. We shall direct the trial court to appropriately modify the judgment.

IV[*]
.... .... .... .... .... .... .

DISPOSITION
The trial court is directed to modify the judgment so that the sentence for burglary and the additional term provided in section 12022 are stayed pursuant to section 654.
In all other respects, the judgment is affirmed.
Blease, Acting P.J., and Sims, J., concurred.
NOTES
[*]   Pursuant to rule 976.1 of the California Rules of Court, all portions of this opinion shall be published except "Testimony at the Suppression Hearing" and issues I, II and IV.
[*]   Assigned by the Chairperson of the Judicial Council.
[1]  Further statutory references are to the Penal Code.
[]   See footnote, ante, page 908.
[2]  The victim testified that defendant eventually pulled out a handgun (.25 automatic) and held it to the back of a customer. The jury found defendant was armed with a firearm during the burglary, but that he did not use the gun during the robbery.
[*]   See footnote, ante, page 908.
[5]  This statute reads: "An act or omission which is made punishable in different ways by different provisions of this code may be punished under either of such provisions, but in no case can it be punished under more than one; an acquittal or conviction and sentence under either one bars a prosecution for the same act or omission under any other."
[6]  This subdivision provides, in part: "(a) Any person who is armed with 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 has been convicted, be punished by an additional term of one year, unless such arming is an element of the offense of which he was convicted."
[7]  The current section 12022, subdivision (a) includes minor changes made over the years but its basic elements remain the same as the original and this analysis of its predecessors can properly be applied to it. (See fn. 6, ante.)
[8]  This section provides, in 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 two years, unless use of a firearm is an element of the offense of which he or she was convicted."
[9]  This subdivision provides: "When the court imposes a prison sentence for a felony pursuant to Section 1170 the court shall also impose the additional terms provided in Sections 667.5, 12022, 12022.5, 12022.6, and 12022.7, unless the additional punishment therefore is stricken pursuant to subdivision (g). The court shall also impose any other additional term which the court determines in its discretion or as required by law shall run consecutive to the term imposed under Section 1170. In considering the imposition of such additional term, the court shall apply the sentencing rules of the Judicial Council."
[10]  "Although the usual practice when confronted with offenses within the ambit of Penal Code section 654 is to impose sentence on the offense with the most severe punishment, the trial court has discretion to sentence on a less serious offense. [Citations.] In either event, the procedure is to stay the execution of sentence on all but one of the offenses subject to section 654. (See Cal. Rules of Court, rule 449.)" (People v. Avila (1982) 138 Cal. App.3d 873, 879 [188 Cal. Rptr. 754].) In this case we choose to follow the usual practice.
