it isn't at all simple
Here's just some of the details I have come across.
.223 Remington was originally developed from the .222 Remington and .223 Remington Magnum varmint rounds, adopted to military service as 5.56 NATO and gradually replacing .222 Rem and .222 Rem Magnum in civilian popularity at least in the US.
Barrels marked .223 tend to be chambered and rifled for bullets in the original 45gr to 55gr weight range.
Barrels marked 5.56 tend to be chambered and rifled for bullets in 55 gr and heavier weight range.
Firing 5.56 rounds with bullets heavier than 55gr in a barrel marked .223 may raise the pressure due the chambering or may give bad accuracy due to the rate of twist for short varmint bullets not stabilising the longer, heavier bullets loaded in 5.56 rounds.
Also while original .223 sporting rounds were in the 40gr - 55gr range, custom made .223 rifles have been made for deer hunting and chambered and rifled to accept bullet weights up to 90gr. So not all .223 rifles are chambered and rifled the same.
Some foreign countries don't allow civilian ownership of military caliber firearms, so some military firearms are offered in .223 rather than 5.56. Sometimes the civilian marked .223 rifle actually is chambered and rifled for .223 bullet weights; sometimes tho' they are just 5.56 barrels marked .223 in compliance with the law and some foreign enforcement authorities don't care as long as the letter of the law is complied with.
Wikipedia citing Accurate Powder on .223 Remington
http://www.accuratepowder.com/data/...al(5.56mm)/223 Remington pages 185 to 187.pdf
....while .223 Remington ammunition can be safely fired in a 5.56 mm chambered gun, firing 5.56 mm ammunition in a .223 Remington chamber
may produce pressures in excess of even the 5.56 mm specifications due to the shorter throat.
I added
May emphasis since some .223 Remington barrels are chambered to 5.56 NATO spex. (The problem there is, it would take a qualified gunsmith to confirm it.)
Jungle #5 has the best advice: "The answer is: it varies by maker, and it is hard to determine without careful measurement. To be on the safe side keep military spec ammo out of non milspec chambers."