We have measured by synchrotron powder diffraction the hydrostatic pressure dependence of the structural parameters of the SmFeAsO1−xFx for four doping values (from x = 0.0 to 0.17) in order to investigate lattice modifications that might be related to doping. The response of the lattice to the applied hydrostatic pressure is anisotropic with the linear compressibility kc, along the c-axis being a factor of 2.5 greater than the corresponding ka along the a-axis, while bulk modulus increases slightly in the optimally doped compound. The analysis of the data indicates that the anisotropic compressibility of the SmFeAsO1−xFx system is doping dependent, with an increasing deviation from a linear relation between the a- and c-axis with doping, which peaks in the x = 0.17 compound with the highest Tc value studied. The width of the superconducting FeAs4 layer in this compound exhibits a non-monotonic pressure dependence, which is not evident in the non-superconducting one. This unequal compression of the subunits of the cell apparently modifies the distribution of the carriers and affects the transition temperature. Our results agree with previous measurements for the highest doping level, and furthermore provide an indication about the connection of doping with lattice anomalies.