In my experience, ATC may say something along the lines of: "Traffic 11 o'clock, 3 miles, indicating 2400 feet unverified".
I take this to mean they are not in comms with the other aircraft and are merely reading off his Mode C indication. All encoding altimeters use 1013 as the datum so if necessary I might dial in 1013 mb on my second altimeter to check how his altitude compares to my own. Not difficult and is normally enough to help spot and ensure separation from him.
It is important to realise that his transponder may be giving a false readout; it would not have been confirmed in real time by the other pilot, due to the lack of ATC comms with him.
I also have the benefit of a TCAS; my readout should match the ATC report. However, as it also relies on his (the other pilot's) transponder being correct, it isn't completely infallible (in reality a transponder is only seldom very far out, it is checked at least annually, as part of the C of A airtest).