Growth scan

I went in for a growth scan yesterday I should be 29w3d but I was measuring 31 weeks and the baby is 3.9 lbs, my doctor said if I gain any more weight I will have to possibly have a c-section anyone else experience this?