If you restrict the set of your data and apply a transformation like the log-transform, then the transformed variable for data which do not fulfill the restricting condition are set to missing. I think that this feature is odd and does not make much sense. I easily can become a problem for the user.
Knowing about this mode of Gretl, one can create the transformed variables before restricting the sample. Or, not to forget to repeat the transformation process in the full sample (in case one would like to work with transformed variable(s) in the full sample).
Why not applying the transformation on the whole data set???