This is the right answer.
Offer a breath mint!

If none are available, you must wait
Wait this not part of the urinal code. Not taking the place next to someone else when there is another available is just common decency. But if not, no one is expected to wait when there is a free urinal (or a space at the trough if its an old school setup). There is a whole pub full of people who will need to pee, get over your hang ups.

use the stall.
This is a debatable point, what if someone needs a crap?

Wait this not part of the urinal code. Not taking the place next to someone else when there is another available is just common decency. But if not, no one is expected to wait when there is a free urinal (or a space at the trough if its an old school setup). There is a whole pub full of people who will need to pee, get over your hang ups.
If you have 3 urinals, labeled A B and C from left to right, it’s ok to use B if A and C are already in use. Just like it’s ok to use the kid urinal (or the handicapped toilet) if the rest are already in use.
But it’s weird to use B if you’re the only person using a urinal, or to use B if someone’s already using A or C; in that case you should use whichever of A or C is NOT in use. Both trip the wire of “I want to pee right next to someone”, which is strange.

I’m sure homophobia may enter into it for many men.
you left out the “l”.

If you have 3 urinals, labeled A B and C from left to right, it’s ok to use B if A and C are already in use.
Yes, but…you pick B and right then A is done and leaves. Now you are in violation!
Violations are only valid at the time of choosing; subsequent changes don’t leave you in violation.
In other words, your intentions count!
As far as the “homophobia” thing goes. I went to a gay bar once and noticed they still followed the “code”.

Just like it’s ok to use the kid urinal (or the handicapped toilet) if the rest are already in use.
Are you just itching for a scolding from Ambivalid ?

This is a debatable point, what if someone needs a crap?
The sink is another option.

Yes, but…you pick B and right then A is done and leaves. Now you are in violation!
No. Unless someone is waiting, you just pinch it off and slide-over to A, then resume. No flag, no foul.

If none are available, you must wait or use the stall. Do you think this will fade as generations pass? Or has it already?
If there is a free urinal, you may use it, even if it means standing next to someone. The code applies only when you have a CHOICE of not standing next to someone. If there is a line, people don’t let an unused urinal remain unused.
Seems like a fair response to me.
Even in women’s loos, you generally don’t take the one right next to a stranger if there’s an unlocked one two stalls away.

Offer a breath mint!
There’s usually a big pink one, right there in the urinal.
I have, in fact, seen men waiting in line when there were vacant urinals between the ones in use. Not always, but it definitely happens.
It happens much less when there’s some defined external event that’s synchronizing a lot of men going at once, like a break or end of an entertainment event.
has anyone else used a “tub” urinal? i came across these at a county fair at one time …it looked like a bathtub with water in it and had a pipe running along the back you just walked overdid what you had to do and it had timed flushes with the water coming down from the pipe on the back …the advantage was 8-10 people could use it at the same time …

Not for nothing do they call it “the abominable snowman of toilets.”
This Vancouver urinal has zero privacy and 100 years of history | CBC News
You’ve planned a beautiful, fancy wedding at a gorgeous historic building, spent months choosing the caterers, the music, the centerpieces, made sure that every single detail is a perfect expression of your special day.
And the only thing that people remember about it is the urinal from hell.
Oh yes. I have used these “trough” style devices. Sometimes they have them filled with ice, for some reason. I would hazard a guess to somehow reduce the odors. The code would not be in place in this situation, however, you must keep your eyes pointed forward, and be sure there is enough room so you don’t bump your neighbor’s shoulder as you enter the line.
Billy Connolly tells a story of when he was an apprentice in a Glasgow shipyard. The toilets were a row of holes in a board over a trough of running water. Apparently a common arrangement at the time.
For their own amusement, apprentices would fold a paper boat from newspaper, set fire to it, and float it down the stream. You can imagine the reaction of anyone sitting on the toilet at the time.
It’s much funnier when he tells it: Billy Connolly - Shipyards Toilet Tale - YouTube
My workplace has several thousand employees. Most of the men’s rooms only have 1 stall and 1 urinal, if they work. So that eliminates the issue. However there is one bigger restroom with 2 urinals and 2 stalls, and 2 bigger breakrooms with 5-6 urinals and stalls.
At my workplace this “code” has never been allowed to exist because when you gotta go you gotta go and most men go during shift changes or breaks with several dozen to a couple hundred others going at the same time. With less than a dozen options in the large restrooms, men are not leaving half of them unused.
Also, did no one ever go to a baseball or football game in the 80s? I clearly remember as a child lining up to the trough.