GPWS takes precedence over RA. If you get a GPWS pullup you will follow that instead of the TCAS (not that smart to follow a TCAS down into the terrain.) The other aircraft will probably get an increased climb instruction to aviod the traffic. The same goes with windshear which also takes precedence!