In the computation of compressible fluid flows, numerical boundary conditions are always necessary for all physical variables at computational boundaries while just partial physical variables are often prescribed as physical boundary conditions. Certain extrapolation technique or ghost cells are often employed traditionally for this issue but spurious wave reflections often arise to cause numerical instability. In this paper, we associate this issue with the one-sided generalized Riemann problem (GRP) solver motivated by the accelerated piston problem in gas dynamics so that the extrapolation technique can be actually avoided. In fact, the compatibility arguments naturally require to formulate the one-sided generalized Riemann problem and incorporate it into the numerical procedure of boundary conditions. Once the corresponding solver is available, the boundary control volume is treated in the same way as the usual interior control volume. As far as the interaction of nonlinear waves with physical boundaries, such a one-sided GRP solver shows significant benefits, as numerical experiments demonstrate, on avoiding spurious wave reflections at the computational boundaries.