My best guess is that the copy of jpeglib.h bundled with gd is out of step with the jpeglib.h from libjpeg.
Yes, I think so. I suspect that gd-2.0.35 might want something later than jpeg-6b (which is about 13 years old). So I might first try upgrading jpeg rather than downgrading gd.
I'll post again when I get it sorted ... might take a while.
Building GD-2.46 against gd-2.0.35 and jpeg-8c gets rid of the errors I was concerned about.
Of course, then I get slugged with this GD-2.46 test suite bug, but I'm not concerned about that. Now it's just a matter of trying to work out why my static x64 build of GD-2.46 has suddenly decided it has to be built against a dynamic zlib library, instead of the static one that was fine last week.
UPDATE: I didn't exactly work out why it kept wanting to build against a dynamic zlib library. Eventually I realised that I'd added quite a few extra directories to the msys shell's path during the course of the day - when I reduced the path to simply what was needed to build gd-2.0.35, the problem went away.