If I'm going to pass close, for example within a wider bike path where there's room to pass within the path, I ring my bell and I may call out "on your left". If there is an opportunity to pull out into the main traffic lane to pass, I don't warn them, since in that case I'm no different than a car passing them. If they're approaching a red light and I want to pass on the left and then make a legal right turn, I always hang back 'til they're fully stopped, because frequently I see bicyclists swerve left into the pedestrian crosswalk without shoulder checking.
If someone passes me on the right, I scorn them as a fool.