hmm.. something i forgot: outside battle, if you try to cast Remedy on somebody with no ailments, or Dispel on somebody with no positive/misc statuses, you'll be prevented. so in the spirit of that, yeah, the makers probably would have wanted spell prevention in the cases Deathlike2 mentioned.
To follow up on this, it doesn't stop you in battle from trying to inflict/remove blocked status in battle, and I believe the same code is called between the menu and battles.
i think C2/4730 partially handles out-of-battle spellcasts and Item usage. my guess is the other bank's code uses the "statuses to set" variables returned by C2/447F, and if they're null and no damage/healing is done either, it "prevents" the spellcast. if they're non-null, the spell proceeds. because immunities are factored out sometime later, even a spell that tries to set or remove only statuses you're immune to won't be thwarted.
i can't find *where* the hell outside battle castings account for immunities, even though they obviously do.