My brother used to drive for ARC Thrift stores. They get a fair bit of canned goods and other food donated. THey discard anything past the date stamp on the can or packages.
My brother accumulates some of the and while working on the house and wanting to lessen the clutter I started using its. My recollection wat that canned goods wad a three year shelf life past the date stamp.. When I told my sister-in-law about it she did a websearch – its 7 years these days.
And amazingly last last year those Canadian and Danish canned hams from 2010 were just fine. I did heat up a can of pears from 2012 this spring and they turned gray and had a metallic taste – those went bye bye – tin form the can lining.
Glass is better – just finished a jar of peaches last Thursday my mother canned in 1979.
The flavor was definitely not what it would have been twenty years ago and they were a bit brownish but no digestive tract problems and I've eaten worse from cans (and not 7 ear old cans).
As to the OP, smell and appearance are the guidelines on whether non-canned goods are still edible. Flavor and texture may have deteriorated, but the food can still be edible.
Heaven help the general public if there is an EMP attack or something of a similar nature occurs they won't have the experience to actually know what is edible or not.
P.S. When my niece was 5 or 6 she would hide food items she didn't wish to finish in some out of sight place. Cleaning up I once found a half eaten chicken drumstick under the buffet. Had been there long enough to mummify – air was dry enough that there was no mold or decay (of course mold isn't a particular health threat – blue cheese). I ate it without any ill effects – chicken jerky.
As long as a food item dries out quickly enough you don't get rot – takes moisture to enable decay. Some can even be re-hydrated if desired.
P.P.S. Only time I ever got food poisoning was from a seafood dish at a restaurant…