My interpretation of “subsequent” is that it should be possible to preserve the existing behaviour without the issue of undefined derivatives by setting a flag for differing signs then performing the discard at the end of the shader (or at least after the point where the derivatives are computed).
Makes sense. As it stands, a discard statement has two quite distinct effects. One is to abort processing, the other is to “mask” framebuffer updates for that fragment. You can obtain the first effect without the second by just using return instead, but there’s no straightforward way to obtain the second without the first. In the compatibility profile you can enable alpha testing and have the fragment shader output zero alpha. For the core profile: would clearing gl_SampleMask have the desired effect?