I've seen signs saying "trespassers will be shot", and never felt the need to test them. The fact that the shooter was doing something illegal doesn't change the possibility that you may no longer be alive.
There's a requirement for "no trespassing" signs to be posted around property but the "will be shot" verbiage could be construed as premeditation since non government land owners aren't allowed to kill trespassers merely for the act of trespassing itself. It literally suggests that the property owner is waiting to shoot anyone who trespasses, which isn't kosher.
Trespassing on government land such as a military base could result in the trespasser being shot accidentally or otherwise and there are typically warning signs posted that will say things like "Use of deadly force authorized".